36 lines
861 B
Dart
36 lines
861 B
Dart
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);
|
|
});
|
|
}
|
|
}
|