forked from firka/student-legacy
Merge branch 'dev' of github.com:refilc/naplo into dev
This commit is contained in:
commit
76083b679f
@ -1,6 +1,7 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:background_fetch/background_fetch.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:refilc/api/providers/user_provider.dart';
|
||||
import 'package:refilc/api/providers/database_provider.dart';
|
||||
import 'package:refilc/database/init.dart';
|
||||
@ -18,6 +19,8 @@ import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
||||
|
||||
// import 'firebase_options.dart';
|
||||
|
||||
// days without touching grass: 5,843 (16 yrs)
|
||||
|
||||
void main() async {
|
||||
// Initalize
|
||||
WidgetsBinding binding = WidgetsFlutterBinding.ensureInitialized();
|
||||
@ -40,6 +43,22 @@ void main() async {
|
||||
|
||||
BackgroundFetch.registerHeadlessTask(backgroundHeadlessTask);
|
||||
|
||||
// pre-cache required icons
|
||||
const todaySvg = SvgAssetLoader('assets/svg/menu_icons/today_selected.svg');
|
||||
const gradesSvg = SvgAssetLoader('assets/svg/menu_icons/grades_selected.svg');
|
||||
const timetableSvg =
|
||||
SvgAssetLoader('assets/svg/menu_icons/timetable_selected.svg');
|
||||
const notesSvg = SvgAssetLoader('assets/svg/menu_icons/notes_selected.svg');
|
||||
|
||||
svg.cache
|
||||
.putIfAbsent(todaySvg.cacheKey(null), () => todaySvg.loadBytes(null));
|
||||
svg.cache
|
||||
.putIfAbsent(gradesSvg.cacheKey(null), () => gradesSvg.loadBytes(null));
|
||||
svg.cache.putIfAbsent(
|
||||
timetableSvg.cacheKey(null), () => timetableSvg.loadBytes(null));
|
||||
svg.cache
|
||||
.putIfAbsent(notesSvg.cacheKey(null), () => notesSvg.loadBytes(null));
|
||||
|
||||
// Run App
|
||||
runApp(App(
|
||||
database: startup.database,
|
||||
|
@ -716,7 +716,7 @@ class TimetablePageState extends State<TimetablePage>
|
||||
indicatorPadding:
|
||||
const EdgeInsets.symmetric(horizontal: 10.0),
|
||||
indicator: BoxDecoration(
|
||||
color: AppColors.of(context).highlight,
|
||||
color: Theme.of(context).colorScheme.background,
|
||||
// color: Colors.transparent,
|
||||
// border: Border.all(
|
||||
// color: AppColors.of(context)
|
||||
|
@ -93,7 +93,7 @@ class StatusBarState extends State<StatusBar> {
|
||||
decoration: BoxDecoration(
|
||||
// borderRadius: BorderRadius.circular(1.0),
|
||||
borderRadius: BorderRadius.zero,
|
||||
color: AppColors.of(context).background,
|
||||
color: Theme.of(context).scaffoldBackgroundColor,
|
||||
),
|
||||
padding: const EdgeInsets.only(left: 10.0, right: 10.0),
|
||||
child: Text(
|
||||
|
@ -570,6 +570,9 @@ class PaintListScreenState extends State<PaintListScreen>
|
||||
// changing font family
|
||||
settingsProvider.update(fontFamily: newThemeByID!.fontFamily, store: true);
|
||||
|
||||
// set "paint mode" to custom accent
|
||||
settingsProvider.update(accentColor: AccentColor.custom, store: true);
|
||||
|
||||
// seems weird but it works, trust me (idk why)
|
||||
// await settingsProvider.update(theme: settingsProvider.theme, store: true);
|
||||
Provider.of<ThemeModeObserver>(context, listen: false)
|
||||
|
Loading…
x
Reference in New Issue
Block a user