add stream chat theme draft

This commit is contained in:
Salvatore Giordano
2020-02-27 17:09:20 +01:00
parent a1308fb380
commit 541cafb49f
17 changed files with 647 additions and 128 deletions
+18 -7
View File
@@ -9,14 +9,25 @@ void main() async {
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoid2lsZC1icmVlemUtNyJ9.VM2EX1EXOfgqa-bTH_3JzeY0T99ngWzWahSauP3dBMo',
);
runApp(
StreamChat(
client: client,
child: MaterialApp(
home: ChannelListPage(),
runApp(MyApp(client));
}
class MyApp extends StatelessWidget {
final Client client;
MyApp(this.client);
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Container(
child: StreamChat(
client: client,
child: ChannelListPage(),
),
),
),
);
);
}
}
class ChannelListPage extends StatelessWidget {
+18 -7
View File
@@ -9,14 +9,25 @@ void main() async {
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoid2lsZC1icmVlemUtNyJ9.VM2EX1EXOfgqa-bTH_3JzeY0T99ngWzWahSauP3dBMo',
);
runApp(
StreamChat(
client: client,
child: MaterialApp(
home: ChannelListPage(),
runApp(MyApp(client));
}
class MyApp extends StatelessWidget {
final Client client;
MyApp(this.client);
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Container(
child: StreamChat(
client: client,
child: ChannelListPage(),
),
),
),
);
);
}
}
class ChannelListPage extends StatelessWidget {
+18 -7
View File
@@ -9,14 +9,25 @@ void main() async {
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoid2lsZC1icmVlemUtNyJ9.VM2EX1EXOfgqa-bTH_3JzeY0T99ngWzWahSauP3dBMo',
);
runApp(
StreamChat(
client: client,
child: MaterialApp(
home: ChannelListPage(),
runApp(MyApp(client));
}
class MyApp extends StatelessWidget {
final Client client;
MyApp(this.client);
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Container(
child: StreamChat(
client: client,
child: ChannelListPage(),
),
),
),
);
);
}
}
class ChannelListPage extends StatelessWidget {
+4 -4
View File
@@ -18,10 +18,10 @@ void main() async {
channel.watch();
runApp(
StreamChat(
client: client,
child: MaterialApp(
home: StreamChannel(
MaterialApp(
home: StreamChat(
client: client,
child: StreamChannel(
channel: channel,
child: ChannelPage(),
),
+27 -7
View File
@@ -9,14 +9,34 @@ void main() async {
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoid2lsZC1icmVlemUtNyJ9.VM2EX1EXOfgqa-bTH_3JzeY0T99ngWzWahSauP3dBMo',
);
runApp(
StreamChat(
client: client,
child: MaterialApp(
home: ChannelListPage(),
runApp(MyApp(client));
}
class MyApp extends StatelessWidget {
final Client client;
MyApp(this.client);
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Container(
child: StreamChat(
streamChatThemeData: StreamChatThemeData(
accentColor: Colors.red,
channelTheme: ChannelTheme(
inputGradient: LinearGradient(colors: [
Colors.red,
Colors.yellow,
]),
),
),
client: client,
child: ChannelListPage(),
),
),
),
);
);
}
}
class ChannelListPage extends StatelessWidget {