mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 07:20:39 +00:00
setup golden toolkit
This commit is contained in:
parent
2f8bb983d5
commit
56942255e2
2 changed files with 34 additions and 0 deletions
|
@ -49,6 +49,7 @@ dev_dependencies:
|
|||
flutter_native_splash: 2.3.5
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
golden_toolkit: 0.15.0
|
||||
google_fonts: 3.0.1
|
||||
integration_test:
|
||||
sdk: flutter
|
||||
|
|
33
test/flutter_test_config.dart
Normal file
33
test/flutter_test_config.dart
Normal file
|
@ -0,0 +1,33 @@
|
|||
import 'dart:async';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:golden_toolkit/golden_toolkit.dart';
|
||||
|
||||
Future<void> testExecutable(FutureOr<void> Function() testMain) async {
|
||||
return GoldenToolkit.runWithConfiguration(
|
||||
() async {
|
||||
await loadAppFonts();
|
||||
await testMain();
|
||||
},
|
||||
config: GoldenToolkitConfiguration(defaultDevices: _defaultDevices),
|
||||
);
|
||||
}
|
||||
|
||||
const _defaultDevices = <Device>[
|
||||
Device(
|
||||
name: 'iPhone 8',
|
||||
size: Size(375, 667),
|
||||
devicePixelRatio: 2.0,
|
||||
),
|
||||
Device(
|
||||
name: 'iPhone 13 Pro',
|
||||
size: Size(390, 844),
|
||||
devicePixelRatio: 3.0,
|
||||
safeArea: EdgeInsets.only(top: 44, bottom: 34),
|
||||
),
|
||||
Device(
|
||||
name: 'iPhone 15 Pro Max',
|
||||
size: Size(430, 932),
|
||||
devicePixelRatio: 3.0,
|
||||
safeArea: EdgeInsets.only(top: 44, bottom: 34),
|
||||
),
|
||||
];
|
Loading…
Reference in a new issue