firebase_chat_services 0.0.1 copy "firebase_chat_services: ^0.0.1" to clipboard
firebase_chat_services: ^0.0.1 copied to clipboard

A powerful and easy-to-use Firebase Chat Services plugin for Flutter. It automatically handles all core chat functionalities including sending Supports text, image, video, and location messages out o [...]

example/lib/main.dart

import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:custom_styles_package/custom_styles_package.dart';
import 'package:custom_styles_package/navigation/custom_navigation_services.dart';
import 'package:custom_styles_package/theme/sized_box.dart';
import 'package:custom_styles_package/widgets/custom_appbar.dart';
import 'package:custom_styles_package/widgets/custom_scaffold.dart';
import 'package:firebase_chat_services/chat_services/chat_user_modal.dart';
import 'package:firebase_chat_services_example/chat_page/chat_list_screen.dart';

import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';



var firestoreInstance = FirebaseFirestore.instanceFor(
    app: Firebase.app(), databaseId: databaseID);
String databaseID = 'agreesplit-live';
void main() async{
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp();

  firestoreInstance.settings = const Settings(persistenceEnabled: true,ignoreUndefinedProperties: true);
  CustomStylesConfig.init(primary: Color(0xFF050A4B));
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}


Map<String, ChatUserModal> allusers = {
  'abcd': ChatUserModal(userId: 'abcd',
      name: 'Manish',
      profileImage: 'https://skdfj',
      fullData: {},
      deviceTokens: []),
  'raju': ChatUserModal(userId: 'raju',
      name: 'Raju',
      profileImage: 'https://skdfj',
      fullData: {},
      deviceTokens: []),
};

class _MyAppState extends State<MyApp> {
  // final _firebaseChatServicesPlugin = FirebaseChatServices();

  @override
  void initState() {
    super.initState();

  }






  @override
  Widget build(BuildContext context) {
    return CustomScreenUtil(
      designSize: const Size(390, 850),
      child: MaterialApp(
        home: HomePage(),
      ),
    );
  }
}


class HomePage extends StatelessWidget {
  const HomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return CustomScaffold(
      appBar: CustomAppBar(titleText: 'Hello world'),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            // CustomButton(
            //   text: 'Enter as Manish',
            //   onTap: (){
            //
            //
            //     // CustomNavigation.push(context, screen: ChatScreen(currentUser: allusers['abcd']!,allUsers: allusers,));
            //   },
            // ),
            // vSizedBox2,
            // CustomButton(
            //   text: 'Enter as Raju',
            //   onTap: (){
            //
            //     CustomNavigation.push(context, screen: ChatScreen(currentUser: allusers['raju']!,allUsers: allusers,));
            //   },
            // ),
            // vSizedBox2,
            CustomButton(
              text: 'Enter ChatList Screen as Manish',
              onTap: (){

                CustomNavigation.push(context, screen: ChatListScreenPage(currentUser: allusers['abcd']!,allUsers: allusers,));
              },
            ),
            vSizedBox2,
            CustomButton(
              text: 'Enter ChatList Screen as Raju',
              onTap: (){

                CustomNavigation.push(context, screen: ChatListScreenPage(currentUser: allusers['raju']!,allUsers: allusers,));
              },
            ),


          ],
        ),
      ),
    );
  }
}
0
likes
110
points
178
downloads

Publisher

unverified uploader

Weekly Downloads

A powerful and easy-to-use Firebase Chat Services plugin for Flutter. It automatically handles all core chat functionalities including sending Supports text, image, video, and location messages out of the box with smooth integration and minimal setup. Perfect for building robust, production-ready chat experiences powered by Firebase.

Homepage

Documentation

API reference

License

unknown (license)

Dependencies

audio_waveforms, audioplayers, cached_video_player_plus, camera, cloud_firestore, custom_api_services, custom_firebase_services, custom_styles_package, emoji_picker_flutter, firebase_core, firebase_messaging, flutter, flutter_easyloading, flutter_local_notifications, get_thumbnail_video, hive, hive_flutter, http, image_cropper, image_picker, path, path_provider, plugin_platform_interface, provider, share_plus, url_launcher, video_player

More

Packages that depend on firebase_chat_services

Packages that implement firebase_chat_services