Add: gym themes

This commit is contained in:
2024-06-07 14:57:40 +03:00
parent 65c8f56e20
commit 04ee6d1699

View File

@@ -139,34 +139,28 @@ class _ExamplePageState extends State<ExamplePage> {
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<GymLinkProvider>().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<GymLinkProvider>()
.changeTheme(Random().nextInt(0xffffff + 1));
context.read<GymLinkProvider>().changeTheme(
Random().nextInt(0xffffff + 1),
blackTheme: Random().nextBool());
},
),
);
@@ -209,6 +203,7 @@ class _ExampleClub2PageState extends State<ExampleClub2Page> {
Future<void> _setToken() async {
final token = await getToken('a8622a61-3142-487e-8db8-b6aebd4f04aa', '123');
context.read<GymLinkProvider>().changeTheme(0xFFAABCAB);
if (token != '') {
context.read<GymLinkProvider>().onTokenReceived(token);
} else {
@@ -220,34 +215,26 @@ class _ExampleClub2PageState extends State<ExampleClub2Page> {
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<GymLinkProvider>().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<GymLinkProvider>()
.changeTheme(Random().nextInt(0xffffff + 1));
// context.read<GymLinkProvider>().changeTheme(0xFFAABCAB);
},
),
);