add streamchattheme.fromtheme

This commit is contained in:
Salvatore Giordano
2020-02-28 11:01:11 +01:00
parent 15c13a7dc9
commit a6d659f932
12 changed files with 452 additions and 273 deletions
+14 -4
View File
@@ -17,8 +17,18 @@ void main() async {
// ignore: unawaited_futures
channel.watch();
runApp(
MaterialApp(
runApp(MyApp(client, channel));
}
class MyApp extends StatelessWidget {
final Client client;
final Channel channel;
MyApp(this.client, this.channel);
@override
Widget build(BuildContext context) {
return MaterialApp(
home: StreamChat(
client: client,
child: StreamChannel(
@@ -26,8 +36,8 @@ void main() async {
child: ChannelPage(),
),
),
),
);
);
}
}
class ChannelPage extends StatelessWidget {
+6
View File
@@ -19,9 +19,15 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
final theme = ThemeData(
primarySwatch: Colors.orange,
);
return MaterialApp(
theme: theme,
home: Container(
child: StreamChat(
streamChatThemeData: StreamChatThemeData.fromTheme(theme),
client: client,
child: ChannelListPage(),
),