add circularprogressindicator

This commit is contained in:
Salvatore Giordano
2021-02-10 09:58:11 +01:00
parent 221d6eb20f
commit dceff16e6c
2 changed files with 33 additions and 13 deletions
+1 -1
View File
@@ -1 +1 @@
15590bfc713ca5ccd71d79a75eb28980 c081df5f4486e48f68cf5c318dc003f2
+32 -12
View File
@@ -64,10 +64,29 @@ class MyApp extends StatelessWidget {
home: Container( home: Container(
alignment: Alignment.center, alignment: Alignment.center,
color: Colors.white, color: Colors.white,
child: Container( child: Column(
height: 80.0, mainAxisAlignment: MainAxisAlignment.center,
width: 80.0, children: [
child: SvgPicture.asset('assets/logo.svg'), Flexible(
flex: 4,
child: Container(
alignment: Alignment.center,
constraints: BoxConstraints.expand(),
child: SvgPicture.asset(
'assets/logo.svg',
height: 80.0,
width: 80.0,
alignment: Alignment.center,
),
),
),
Flexible(
flex: 1,
child: Center(
child: CircularProgressIndicator(),
),
),
],
), ),
), ),
); );
@@ -82,18 +101,18 @@ class MyApp extends StatelessWidget {
builder: (context, child) { builder: (context, child) {
return StreamChat( return StreamChat(
client: initData.data.client, client: initData.data.client,
onBackgroundEventReceived: (e) => onBackgroundEventReceived: (e) => showLocalNotification(
showLocalNotification(e, initData.data.client.state.user.id), e, initData.data.client.state.user.id),
child: Builder( child: Builder(
builder: (context) => AnnotatedRegion<SystemUiOverlayStyle>( builder: (context) => AnnotatedRegion<SystemUiOverlayStyle>(
child: child, child: child,
value: SystemUiOverlayStyle( value: SystemUiOverlayStyle(
systemNavigationBarColor: systemNavigationBarColor:
StreamChatTheme.of(context).colorTheme.white, StreamChatTheme.of(context).colorTheme.white,
systemNavigationBarIconBrightness: systemNavigationBarIconBrightness:
Theme.of(context).brightness == Brightness.dark Theme.of(context).brightness == Brightness.dark
? Brightness.light ? Brightness.light
: Brightness.dark, : Brightness.dark,
), ),
), ),
), ),
@@ -108,8 +127,9 @@ class MyApp extends StatelessWidget {
1: ThemeMode.light, 1: ThemeMode.light,
}[snapshot], }[snapshot],
onGenerateRoute: AppRoutes.generateRoute, onGenerateRoute: AppRoutes.generateRoute,
initialRoute: initialRoute: initData.data.client.state.user == null
initData.data.client.state.user == null ? Routes.CHOOSE_USER : Routes.HOME, ? Routes.CHOOSE_USER
: Routes.HOME,
), ),
); );
}, },