create a new app and client for advanced options

This commit is contained in:
Salvatore Giordano
2020-11-10 16:05:51 +01:00
parent e8cb8fa49d
commit b1401a5f0c
3 changed files with 253 additions and 161 deletions
+19
View File
@@ -98,6 +98,24 @@ class ChooseUserPage extends StatelessWidget {
final user = entry.value;
return ListTile(
onTap: () async {
showDialog(
barrierDismissible: false,
context: context,
builder: (context) => Center(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
color: Colors.white,
),
height: 100,
width: 100,
child: Center(
child: CircularProgressIndicator(),
),
),
),
);
final client = StreamChat.of(context).client;
await client.setUser(
@@ -111,6 +129,7 @@ class ChooseUserPage extends StatelessWidget {
initNotifications(client);
}
Navigator.pop(context);
await Navigator.pushReplacement(
context,
MaterialPageRoute(