flutter_chat 0.1.4

  • Readme
  • Changelog
  • Example
  • Installing
  • new50

flutter_chat #

A Chat Helper for Flutter using Firebase as backend services.

Getting Started #

Use ChatData.dart for start building your chat.

You can use your own widget in Stateful Widget Class. Steps:

  1. add firebase in your android and ios project
  2. Create a Stateful widget class and call the method in body within initState(): -> ChatData.init("app name",context);
  3. and in body of Widget build: -> ChatData.widgetWelcomeScreen(context)

You can use common methods for your application:

Useful Methods: #

  1. Auth user from Google SignIn, if user is using app first time, then user data store in firestore in "users" document, send true if authenticated,else false authUsersGoogle() → Future

  2. check if user is loggedin with social isSignedIn() → Future

  3. Check user authentication, if authenticated then show dashboard screen, else login screen authUser(BuildContext context) → void

  4. used to create splash screen, shows splash for 2 sec and then call to check authentication startTime(BuildContext context) → Future

Now enjoy the chat.

version 0.1.4 widget class seprated #

version 0.1.2 example added #

version 0.1.1 add screen widgets #

version 0.1.0 flutter Chat android and iOS #

example/flutter_chat.dart

import 'package:flutter_chat/chatData.dart';
import 'package:flutter/material.dart';
import 'package:flutter_chat/chatWidget.dart';

class WelcomeScreen extends StatefulWidget {
  static const String id = "welcome_screen";
  @override
  _WelcomeScreenState createState() => _WelcomeScreenState();
}

class _WelcomeScreenState extends State<WelcomeScreen> {
  @override
  void initState() {
    super.initState();
    ChatData.init("Just Chat",context);
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: ChatWidget.getAppBar(),
        backgroundColor: Colors.white,
        body: ChatWidget.widgetWelcomeScreen(context));
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flutter_chat: ^0.1.4

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_chat/chatData.dart';
import 'package:flutter_chat/chatWidget.dart';
import 'package:flutter_chat/constants.dart';
import 'package:flutter_chat/hexColor.dart';
import 'package:flutter_chat/screens/chat.dart';
import 'package:flutter_chat/screens/dashboard_screen.dart';
import 'package:flutter_chat/screens/login_screen.dart';
import 'package:flutter_chat/screens/zoomImage.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
50
Learn more about scoring.

We analyzed this package on Jan 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
cached_network_image ^2.0.0-rc 2.0.0
cloud_firestore ^0.13.0+1 0.13.0+1
cupertino_icons ^0.1.2 0.1.3
firebase_analytics ^5.0.9 5.0.9
firebase_auth ^0.15.3 0.15.3+1
firebase_core ^0.4.3+1 0.4.3+2
firebase_messaging ^6.0.9 6.0.9
firebase_storage ^3.1.0 3.1.1
flutter 0.0.0
flutter_dialogflow ^0.1.3 0.1.3
flutter_native_image ^0.0.4 0.0.4
fluttertoast ^3.1.0 3.1.3
google_sign_in ^4.0.4 4.1.1
image_picker ^0.6.2+3 0.6.3+1
intl ^0.16.0 0.16.1
photo_view ^0.9.0 0.9.1
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.11 1.14.12
convert 2.1.1
crypto 2.1.4
firebase 7.2.0
firebase_auth_platform_interface 1.1.5
firebase_auth_web 0.1.1+4
firebase_core_platform_interface 1.0.2
firebase_core_web 0.1.1+2
flutter_cache_manager 1.1.3
flutter_plugin_android_lifecycle 1.0.4
flutter_web_plugins 0.0.0
google_sign_in_platform_interface 1.0.3
google_sign_in_web 0.8.3
googleapis_auth 0.2.11+1
http 0.12.0+4
http_parser 3.1.3
js 0.6.1+1
matcher 0.12.6
meta 1.1.8
path 1.6.4
path_provider 1.5.1
pedantic 1.9.0
platform 2.2.1
quiver 2.1.2+1
sky_engine 0.0.99
source_span 1.6.0
sqflite 1.2.0
stack_trace 1.9.3
string_scanner 1.0.5
synchronized 2.1.1
term_glyph 1.1.0
typed_data 1.1.6
uuid 2.0.4
vector_math 2.0.8
Dev dependencies
flutter_test