Mobile adaptive updates

This commit is contained in:
2024-05-13 15:28:44 +03:00
parent 51b0cbe89b
commit e177c81f8b
6 changed files with 70 additions and 15 deletions

View File

@@ -1,7 +1,7 @@
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:gymlink_module_web/pages/main.dart';
import 'package:gymlink_module_web/main_mobile.dart';
import 'package:gymlink_module_web/providers/main.dart';
import 'package:provider/provider.dart';
@@ -73,6 +73,9 @@ class _ExamplePageState extends State<ExamplePage> {
super.initState();
Future.microtask(
() => context.read<GymLinkProvider>().onTokenReceived('token123'));
Future.microtask(() => context
.read<GymLinkProvider>()
.setTheme(ThemeData.dark(useMaterial3: true)));
}
@override
@@ -91,9 +94,8 @@ class _ExamplePageState extends State<ExamplePage> {
context.read<GymLinkProvider>().onTokenReceived('token123');
},
),
Expanded(
child:
MainPage(isLoading: context.watch<GymLinkProvider>().isLoading),
const Expanded(
child: MyApp(),
),
const SizedBox(
height: 20,