Mobile and web versions
This commit is contained in:
35
lib/states/mobile.dart
Normal file
35
lib/states/mobile.dart
Normal file
@@ -0,0 +1,35 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gymlink_module_web/main_mobile.dart';
|
||||
import 'package:gymlink_module_web/pages/main.dart';
|
||||
import 'package:gymlink_module_web/theme.dart';
|
||||
|
||||
class MyAppStateMobile extends State<MyApp> {
|
||||
bool _isLoading = true;
|
||||
ThemeData theme = myTheme;
|
||||
bool black_theme = false;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
title: 'GymLink Module',
|
||||
theme: theme,
|
||||
debugShowCheckedModeBanner: false,
|
||||
home: MainPage(isLoading: _isLoading),
|
||||
);
|
||||
}
|
||||
|
||||
void onTokenReceived(String token) {
|
||||
if (token == 'token123') {
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void changeColor(int color) {
|
||||
setState(() {
|
||||
black_theme = !black_theme; //FIXME: TEMPORARY
|
||||
theme = getThemeData(Color(color), black_theme);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user