mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-10-18 22:30:39 +00:00
46 lines
1.4 KiB
Dart
46 lines
1.4 KiB
Dart
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 {
|
|
iphone65inch(
|
|
size: (width: 1242, height: 2688),
|
|
contentPadding: (left: 150, top: 192, right: 150, bottom: 192),
|
|
titleFontPath: 'screenshots/assets/fonts/SF-Pro-Display-Bold.zip',
|
|
subtitleFontPath: 'screenshots/assets/fonts/SF-Pro-Display-Regular.zip',
|
|
),
|
|
iphone55inch(
|
|
size: (width: 1242, height: 2208),
|
|
contentPadding: (left: 150, top: 192, right: 150, bottom: 192),
|
|
titleFontPath: 'screenshots/assets/fonts/SF-Pro-Display-Bold.zip',
|
|
subtitleFontPath: 'screenshots/assets/fonts/SF-Pro-Display-Regular.zip',
|
|
);
|
|
|
|
final ({int height, int width}) size;
|
|
final ({int left, int top, int right, int bottom}) contentPadding;
|
|
final String titleFontPath;
|
|
final String subtitleFontPath;
|
|
|
|
const ScreenshotLayout({
|
|
required this.size,
|
|
required this.contentPadding,
|
|
required this.titleFontPath,
|
|
required this.subtitleFontPath,
|
|
});
|
|
}
|