aboutsummaryrefslogtreecommitdiffstats
path: root/lib/main.dart
blob: 0699f060a15fe926fbdd71919bda9f59e02a6260 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import 'package:device_preview/device_preview.dart';

import 'export.dart';
import 'data/data_providers/initialize_settings.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // Initialize settings from storage API.
  final container = ProviderContainer();
  await initializeSettings(container);

  // Pass the container to ProviderScope and then run the app.
  runApp(
    ProviderScope(
      parent: container,
      child: DevicePreview(
        enabled: debugDisplay,
        tools: const [
          ...DevicePreview.defaultTools,
        ],
        builder: (context) => const App(),
      ),
    ),
  );
}