From 04ee6d1699b0d8c8e7f9691fd1fa52de47aa7aa4 Mon Sep 17 00:00:00 2001 From: Sergey Elpashev Date: Fri, 7 Jun 2024 14:57:40 +0300 Subject: [PATCH] Add: gym themes --- lib/mobile_example.dart | 47 +++++++++++++++-------------------------- 1 file changed, 17 insertions(+), 30 deletions(-) diff --git a/lib/mobile_example.dart b/lib/mobile_example.dart index 8e60bbb..03e98f6 100644 --- a/lib/mobile_example.dart +++ b/lib/mobile_example.dart @@ -139,34 +139,28 @@ class _ExamplePageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: const Text('GymLink Example App'), + title: const Text('GymLink Example App Gym 1'), ), resizeToAvoidBottomInset: false, drawer: getDrawer(context), - body: Column( + body: const Column( children: [ - const Text('test'), - IconButton( - icon: const Icon(Icons.abc), - onPressed: () { - context.read().onTokenReceived('token123'); - }, - ), - const Expanded( + Text('test'), + Expanded( child: MyApp(), ), - const SizedBox( + SizedBox( height: 20, ), - const Text('Bottom text') + Text('Bottom text') ], ), floatingActionButton: IconButton( icon: const Icon(Icons.search), onPressed: () { - context - .read() - .changeTheme(Random().nextInt(0xffffff + 1)); + context.read().changeTheme( + Random().nextInt(0xffffff + 1), + blackTheme: Random().nextBool()); }, ), ); @@ -209,6 +203,7 @@ class _ExampleClub2PageState extends State { Future _setToken() async { final token = await getToken('a8622a61-3142-487e-8db8-b6aebd4f04aa', '123'); + context.read().changeTheme(0xFFAABCAB); if (token != '') { context.read().onTokenReceived(token); } else { @@ -220,34 +215,26 @@ class _ExampleClub2PageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: const Text('GymLink Example App'), + title: const Text('GymLink Example App Gym2'), ), resizeToAvoidBottomInset: false, drawer: getDrawer(context), - body: Column( + body: const Column( children: [ - const Text('test'), - IconButton( - icon: const Icon(Icons.abc), - onPressed: () { - context.read().onTokenReceived('token123'); - }, - ), - const Expanded( + Text('test'), + Expanded( child: MyApp(), ), - const SizedBox( + SizedBox( height: 20, ), - const Text('Bottom text') + Text('Bottom text') ], ), floatingActionButton: IconButton( icon: const Icon(Icons.search), onPressed: () { - context - .read() - .changeTheme(Random().nextInt(0xffffff + 1)); + // context.read().changeTheme(0xFFAABCAB); }, ), );