sop_cometchat 0.0.7
sop_cometchat: ^0.0.7 copied to clipboard
CometChat custom style & config specifically for my use case
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:sop_cometchat/sop_cometchat.dart';
import '/widgets/comet_chat_widget.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
MyApp({super.key});
final ChatUser user = ChatUser(
displayName: 'Ricky Brown',
photoUrl: 'https://firebasestorage.googleapis.com/v0/b/sop-cmh01.appspot.com/o/users%2FAxba7WJBXJdfd6kw21UHwYJ4JAs1%2Fuploads%2F1715113887944592.jpg?alt=media&token=f0836369-6aae-40f8-b3fe-6f0c1562e826',
email: 'ricky@sonsofprophets.co',
uid: 'Axba7WJBXJdfd6kw21UHwYJ4JAs1'
);
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'SOP Chat Demo',
theme: ThemeData(
// This is the theme of your application.
//
// TRY THIS: Try running your application with "flutter run". You'll see
// the application has a purple toolbar. Then, without quitting the app,
// try changing the seedColor in the colorScheme below to Colors.green
// and then invoke "hot reload" (save your changes or press the "hot
// reload" button in a Flutter-supported IDE, or press "r" if you used
// the command line to start the app).
//
// Notice that the counter didn't reset back to zero; the application
// state is not lost during the reload. To reset the state, use hot
// restart instead.
//
// This works for code too, not just values: Most code changes can be
// tested with just a hot reload.
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: CometChatWidget(user: user, leaveCallback: () async {}),
);
}
}