mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 07:20:39 +00:00
73d0c32323
* implemented `MockCameraContainerBloc` to stub camera on simulator * hide pro features from metering screen * disable pro features in settings * use closed child background color in `AnimatedDialog` * adjust `AnimatedDialogPicker` to items count * close `AnimatedDialog` through context * cleanup * fixed `ReadingValueContainer` text color * removed legacy translations * fixed tests * fixed `AnimatedDialog` scaling * added `evFromImage` test * added no EXIF test to `evFromImage`
49 lines
2 KiB
Dart
49 lines
2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter/services.dart';
|
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
|
import 'package:lightmeter/data/models/supported_locale.dart';
|
|
import 'package:lightmeter/generated/l10n.dart';
|
|
import 'package:lightmeter/platform_config.dart';
|
|
import 'package:lightmeter/providers/user_preferences_provider.dart';
|
|
import 'package:lightmeter/screens/metering/flow_metering.dart';
|
|
import 'package:lightmeter/screens/settings/flow_settings.dart';
|
|
|
|
class Application extends StatelessWidget {
|
|
const Application({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final theme = UserPreferencesProvider.themeOf(context);
|
|
final systemIconsBrightness = ThemeData.estimateBrightnessForColor(theme.colorScheme.onSurface);
|
|
return AnnotatedRegion(
|
|
value: SystemUiOverlayStyle(
|
|
statusBarColor: Colors.transparent,
|
|
statusBarBrightness: systemIconsBrightness == Brightness.light ? Brightness.dark : Brightness.light,
|
|
statusBarIconBrightness: systemIconsBrightness,
|
|
systemNavigationBarColor: Colors.transparent,
|
|
systemNavigationBarIconBrightness: systemIconsBrightness,
|
|
),
|
|
child: MaterialApp(
|
|
debugShowCheckedModeBanner: !PlatformConfig.isTest,
|
|
theme: theme,
|
|
locale: Locale(UserPreferencesProvider.localeOf(context).intlName),
|
|
localizationsDelegates: const [
|
|
S.delegate,
|
|
GlobalMaterialLocalizations.delegate,
|
|
GlobalWidgetsLocalizations.delegate,
|
|
GlobalCupertinoLocalizations.delegate,
|
|
],
|
|
supportedLocales: S.delegate.supportedLocales,
|
|
builder: (context, child) => MediaQuery(
|
|
data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0),
|
|
child: child!,
|
|
),
|
|
initialRoute: "metering",
|
|
routes: {
|
|
"metering": (context) => const MeteringFlow(),
|
|
"settings": (context) => const SettingsFlow(),
|
|
},
|
|
),
|
|
);
|
|
}
|
|
}
|