From f23752b5ddc120a560bba14659d23b4e8767ef04 Mon Sep 17 00:00:00 2001 From: Vadim <44135514+vodemn@users.noreply.github.com> Date: Tue, 14 May 2024 13:48:28 +0200 Subject: [PATCH] reorganized screenshot models --- screenshots/generate_screenshots.dart | 2 +- screenshots/{ => models}/screenshot_args.dart | 0 screenshots/models/screenshot_config.dart | 19 ++++++++++++++++++ .../screenshot_device.dart} | 0 .../screenshot_layout.dart} | 20 ------------------- 5 files changed, 20 insertions(+), 21 deletions(-) rename screenshots/{ => models}/screenshot_args.dart (100%) create mode 100644 screenshots/models/screenshot_config.dart rename screenshots/{devices_config.dart => models/screenshot_device.dart} (100%) rename screenshots/{screenshot_config.dart => models/screenshot_layout.dart} (65%) diff --git a/screenshots/generate_screenshots.dart b/screenshots/generate_screenshots.dart index f9d574f..f47e285 100644 --- a/screenshots/generate_screenshots.dart +++ b/screenshots/generate_screenshots.dart @@ -19,7 +19,7 @@ import 'package:shared_preferences/shared_preferences.dart'; import '../integration_test/mocks/paid_features_mock.dart'; import '../integration_test/utils/widget_tester_actions.dart'; -import 'screenshot_args.dart'; +import 'models/screenshot_args.dart'; //https://stackoverflow.com/a/67186625/13167574 diff --git a/screenshots/screenshot_args.dart b/screenshots/models/screenshot_args.dart similarity index 100% rename from screenshots/screenshot_args.dart rename to screenshots/models/screenshot_args.dart diff --git a/screenshots/models/screenshot_config.dart b/screenshots/models/screenshot_config.dart new file mode 100644 index 0000000..c281de6 --- /dev/null +++ b/screenshots/models/screenshot_config.dart @@ -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 data) { + return ScreenshotConfig( + title: data['title'] as String, + subtitle: data['subtitle'] as String, + screenshotName: data['screenshotName'] as String, + ); + } +} diff --git a/screenshots/devices_config.dart b/screenshots/models/screenshot_device.dart similarity index 100% rename from screenshots/devices_config.dart rename to screenshots/models/screenshot_device.dart diff --git a/screenshots/screenshot_config.dart b/screenshots/models/screenshot_layout.dart similarity index 65% rename from screenshots/screenshot_config.dart rename to screenshots/models/screenshot_layout.dart index 9ed6ecf..eed1e28 100644 --- a/screenshots/screenshot_config.dart +++ b/screenshots/models/screenshot_layout.dart @@ -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 data) { - return ScreenshotConfig( - title: data['title'] as String, - subtitle: data['subtitle'] as String, - screenshotName: data['screenshotName'] as String, - ); - } -} - enum ScreenshotLayout { iphone65inch( size: (width: 1242, height: 2688),