|
1 | 1 | # flutter_chat
|
2 | 2 |
|
3 |
| -A Chat Helper for Flutter using Firebase as backend services. |
4 |
| - |
5 |
| -## Getting Started |
6 |
| -Add this to your package's pubspec.yaml file:<br/> |
7 |
| -dependencies:<br/> |
8 |
| -## flutter_chat: ^0.1.5<br/> |
9 |
| - |
10 |
| -You can install packages from the command line:<br/> with Flutter:<br/> $ flutter pub get<br/> |
11 |
| - |
12 |
| -Use ChatData.dart for start building your chat. |
| 3 | +A Chat Helper for create chat application in Flutter using Firebase as backend services. |
13 | 4 |
|
14 | 5 | ## Features:
|
15 | 6 | 1. 1-1 chat
|
16 | 7 | 2. User online status
|
17 | 8 |
|
18 |
| -You can use your own widget in Stateful Widget Class. |
19 |
| -Steps: |
20 |
| -1. add firebase in your android and ios project |
21 |
| -2. Create a Stateful widget class and call the method in body |
22 |
| - within initState(): |
23 |
| - -> ChatData.init("app name",context); |
24 |
| -3. and in body of Widget build: |
25 |
| - -> ChatData.widgetWelcomeScreen(context) |
26 |
| - |
27 |
| -You can use common methods for your application: |
28 |
| -## Useful Methods: |
29 |
| -1. Auth user from Google SignIn, if user is using app first time, |
30 |
| -then user data store in firestore in "users" document, |
31 |
| -send true if authenticated,else false |
32 |
| -authUsersGoogle() → Future |
| 9 | +## Screenshots: |
33 | 10 |
|
34 |
| -2. check if user is loggedin with social |
35 |
| -isSignedIn() → Future |
| 11 | + |
| 12 | + |
| 13 | + |
36 | 14 |
|
37 |
| -3. Check user authentication, if authenticated then show dashboard screen, else login screen |
38 |
| -authUser(BuildContext context) → void |
| 15 | +## Getting Started |
| 16 | +* Add this to your package's pubspec.yaml file:<br/> |
| 17 | +dependencies:<br/>[flutter_chat](https://pub.dev/packages/flutter_chat) |
39 | 18 |
|
40 |
| -4. used to create splash screen, shows splash for 2 sec and then call to check authentication |
41 |
| -startTime(BuildContext context) → Future |
| 19 | +* add [firebase](https://firebase.google.com/) in your android and ios project. |
42 | 20 |
|
43 |
| -Now enjoy the chat. |
| 21 | +* Create a Stateful widget class and call the method in body (example can be found in Github repo),<br/> |
| 22 | + within initState():<br/> |
| 23 | + -> ChatData.init("app name",context); <br/> |
| 24 | + and in body of Widget build:<br/> |
| 25 | + -> ChatData.widgetWelcomeScreen(context) |
0 commit comments