mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-10-18 14:20:40 +00:00
33 lines
811 B
Dart
33 lines
811 B
Dart
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),
|
|
),
|
|
];
|