mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-25 17:00:39 +00:00
reorganized screenshot models
This commit is contained in:
parent
d7a42fd73f
commit
f23752b5dd
5 changed files with 20 additions and 21 deletions
|
@ -19,7 +19,7 @@ import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
|
||||||
import '../integration_test/mocks/paid_features_mock.dart';
|
import '../integration_test/mocks/paid_features_mock.dart';
|
||||||
import '../integration_test/utils/widget_tester_actions.dart';
|
import '../integration_test/utils/widget_tester_actions.dart';
|
||||||
import 'screenshot_args.dart';
|
import 'models/screenshot_args.dart';
|
||||||
|
|
||||||
//https://stackoverflow.com/a/67186625/13167574
|
//https://stackoverflow.com/a/67186625/13167574
|
||||||
|
|
||||||
|
|
19
screenshots/models/screenshot_config.dart
Normal file
19
screenshots/models/screenshot_config.dart
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
class ScreenshotConfig {
|
||||||
|
final String title;
|
||||||
|
final String subtitle;
|
||||||
|
final String screenshotName;
|
||||||
|
|
||||||
|
const ScreenshotConfig({
|
||||||
|
required this.title,
|
||||||
|
required this.subtitle,
|
||||||
|
required this.screenshotName,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory ScreenshotConfig.fromJson(Map<String, dynamic> data) {
|
||||||
|
return ScreenshotConfig(
|
||||||
|
title: data['title'] as String,
|
||||||
|
subtitle: data['subtitle'] as String,
|
||||||
|
screenshotName: data['screenshotName'] as String,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,23 +1,3 @@
|
||||||
class ScreenshotConfig {
|
|
||||||
final String title;
|
|
||||||
final String subtitle;
|
|
||||||
final String screenshotName;
|
|
||||||
|
|
||||||
const ScreenshotConfig({
|
|
||||||
required this.title,
|
|
||||||
required this.subtitle,
|
|
||||||
required this.screenshotName,
|
|
||||||
});
|
|
||||||
|
|
||||||
factory ScreenshotConfig.fromJson(Map<String, dynamic> data) {
|
|
||||||
return ScreenshotConfig(
|
|
||||||
title: data['title'] as String,
|
|
||||||
subtitle: data['subtitle'] as String,
|
|
||||||
screenshotName: data['screenshotName'] as String,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
enum ScreenshotLayout {
|
enum ScreenshotLayout {
|
||||||
iphone65inch(
|
iphone65inch(
|
||||||
size: (width: 1242, height: 2688),
|
size: (width: 1242, height: 2688),
|
Loading…
Reference in a new issue