mirror of
https://github.com/block/buzz.git
synced 2026-11-01 06:51:17 +00:00
Co-authored-by: npub12wpjffj7q5qjsky5jvk4ldwlxmse5xll3d8gytk4wqd0c5y7jvwspg37n6 <538324a65e0501285894932d5fb5df36e19a1bff8b4e822ed5701afc509e931d@buzz.block.builderlab.xyz> Signed-off-by: npub12wpjffj7q5qjsky5jvk4ldwlxmse5xll3d8gytk4wqd0c5y7jvwspg37n6 <538324a65e0501285894932d5fb5df36e19a1bff8b4e822ed5701afc509e931d@buzz.block.builderlab.xyz>
25 lines
677 B
Dart
25 lines
677 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
import 'package:shared_preferences/shared_preferences.dart';
|
|
|
|
import 'app.dart';
|
|
import 'shared/push/push_bridge.dart';
|
|
import 'shared/theme/theme_provider.dart';
|
|
|
|
void main() => runBuzzApp(const App());
|
|
|
|
Future<void> runBuzzApp(Widget app) async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
installBuzzPushMethodHandler();
|
|
|
|
// Pre-load preferences so the first frame uses the saved theme/accent.
|
|
final prefs = await SharedPreferences.getInstance();
|
|
|
|
runApp(
|
|
ProviderScope(
|
|
overrides: [savedPrefsProvider.overrideWithValue(prefs)],
|
|
child: app,
|
|
),
|
|
);
|
|
}
|