first commit
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import '../core/branding/app_brand.dart';
|
||||
import '../presentation/camera/camera_screen.dart';
|
||||
import '../presentation/camera/recognition_controller.dart';
|
||||
import '../theme/theme.dart';
|
||||
|
||||
class SignCheckerApp extends StatelessWidget {
|
||||
const SignCheckerApp({super.key, this.controller});
|
||||
|
||||
final RecognitionController? controller;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CupertinoApp(
|
||||
title: AppBrand.name,
|
||||
theme: buildDarkTheme(),
|
||||
builder: (context, child) {
|
||||
final brightness = MediaQuery.platformBrightnessOf(context);
|
||||
final overlay = systemUiOverlayFor(brightness);
|
||||
return CupertinoTheme(
|
||||
data: brightness == Brightness.dark
|
||||
? buildDarkTheme()
|
||||
: buildLightTheme(),
|
||||
child: AnnotatedRegion<SystemUiOverlayStyle>(
|
||||
value: overlay,
|
||||
child: child ?? const SizedBox.shrink(),
|
||||
),
|
||||
);
|
||||
},
|
||||
home: CameraScreen(controller: controller ?? RecognitionController()),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user