
Replaces hardcoded colors and standard Theme.of(context) accesses with a custom AppTheme. Introduces distinct light and dark themes and persists the selected theme mode using shared_preferences. Integrates the theme into the main app structure and applies it to various components and pages. Adds google_fonts dependency for theme typography.
17 lines
481 B
Dart
17 lines
481 B
Dart
import 'package:barcode_scanner/pages/login_page/login_page_model.dart';
|
|
import 'package:barcode_scanner/provider_container.dart';
|
|
import 'package:barcode_scanner/themes/app_theme.dart';
|
|
|
|
import 'package:flutter/foundation.dart';
|
|
|
|
class InitializerService {
|
|
static Future init() async {
|
|
await AppTheme.initialize();
|
|
await providerContainer
|
|
.read(loginPageModelProvider.notifier)
|
|
.checkHasUserConnected();
|
|
|
|
debugPrint('All services started...');
|
|
}
|
|
}
|