diff --git a/lib/screens/room/edit.dart b/lib/screens/room/edit.dart index b1c2aec..d96e96e 100644 --- a/lib/screens/room/edit.dart +++ b/lib/screens/room/edit.dart @@ -132,14 +132,6 @@ class _EditRoomPageState extends State { : Scaffold( appBar: AppBar( title: const Text('Edit Room'), - leading: IconButton( - onPressed: () { - // go back - Navigator.of(context).pop(); - }, - icon: const Icon(Icons.arrow_back), - tooltip: "Go back", - ), ), body: SingleChildScrollView( child: Center( @@ -191,9 +183,7 @@ class _EditRoomPageState extends State { _ctrIcon = icon; }); - Navigator.of( - context) - .pop(); + context.pop(); })); }).toList())), )); diff --git a/lib/screens/room/members.dart b/lib/screens/room/members.dart index 6d920f8..f897484 100644 --- a/lib/screens/room/members.dart +++ b/lib/screens/room/members.dart @@ -266,7 +266,7 @@ class _ManageRoomMembersPageState extends State { showDialog( context: context, builder: - (context) => + (ctx) => AlertDialog( icon: const Icon( Icons @@ -283,7 +283,7 @@ class _ManageRoomMembersPageState extends State { // NOTE: cancel only closes the dialog // whilst OK closes both - Navigator.of(context) + Navigator.of(ctx) .pop(); }, child: const Text( @@ -294,9 +294,9 @@ class _ManageRoomMembersPageState extends State { () async { // send request final scaffMgr = - ScaffoldMessenger.of(context); + ScaffoldMessenger.of(ctx); final nav = - Navigator.of(context); + Navigator.of(ctx); final user = context.read(); diff --git a/lib/screens/room/pages/about.dart b/lib/screens/room/pages/about.dart index 1559575..60a3168 100644 --- a/lib/screens/room/pages/about.dart +++ b/lib/screens/room/pages/about.dart @@ -97,7 +97,7 @@ class _AboutRoomPageState extends State { actions: [ TextButton( onPressed: () { - Navigator.of(context).pop(); + context.pop(); }, child: const Text('Cancel'), ), @@ -272,8 +272,8 @@ class _AboutRoomPageState extends State { final scaffMgr = ScaffoldMessenger.of(ctx); final nav = Navigator.of(ctx); - final router = GoRouter.of(ctx); - final user = ctx.read(); + final router = GoRouter.of(context); + final user = context.read(); doNetworkRequest(scaffMgr, req: () => postWithCreadentials(