mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-28 18:30:42 +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`
37 lines
1.2 KiB
Dart
37 lines
1.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
|
import 'package:lightmeter/generated/l10n.dart';
|
|
import 'package:lightmeter/res/theme.dart';
|
|
import 'package:m3_lightmeter_iap/m3_lightmeter_iap.dart';
|
|
|
|
/// Provides [MaterialApp] with default theme and "en" localization
|
|
class WidgetTestApplicationMock extends StatelessWidget {
|
|
final IAPProductStatus productStatus;
|
|
final Widget child;
|
|
|
|
const WidgetTestApplicationMock({
|
|
this.productStatus = IAPProductStatus.purchased,
|
|
required this.child,
|
|
super.key,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
theme: themeFrom(primaryColorsList[5], Brightness.light),
|
|
locale: const Locale('en'),
|
|
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!,
|
|
),
|
|
home: Scaffold(body: child),
|
|
);
|
|
}
|
|
}
|