diff --git a/assets/menuPage/flashlightoff.svg b/assets/scan/flashlightOff.svg similarity index 100% rename from assets/menuPage/flashlightoff.svg rename to assets/scan/flashlightOff.svg diff --git a/assets/menuPage/flashlighton.svg b/assets/scan/flashlightOn.svg similarity index 100% rename from assets/menuPage/flashlighton.svg rename to assets/scan/flashlightOn.svg diff --git a/lib/i18n/strings.g.dart b/lib/i18n/strings.g.dart index cd26dd8..1c0002d 100644 --- a/lib/i18n/strings.g.dart +++ b/lib/i18n/strings.g.dart @@ -4,9 +4,9 @@ /// To regenerate, run: `dart run slang` /// /// Locales: 1 -/// Strings: 27 +/// Strings: 28 /// -/// Built on 2024-09-23 at 20:18 UTC +/// Built on 2024-09-24 at 17:35 UTC // coverage:ignore-file // ignore_for_file: type=lint @@ -204,6 +204,7 @@ class _StringsScanEn { String get wait => 'Proszę czekać, trwa Ładowanie...'; String get lastScans => 'Ostatnie skany:'; String get error => 'Wystąpił błąd'; + String get closeError => 'Zamknij.'; } /// Flat map(s) containing all translations. @@ -239,6 +240,7 @@ extension on Translations { case 'scan.wait': return 'Proszę czekać, trwa Ładowanie...'; case 'scan.lastScans': return 'Ostatnie skany:'; case 'scan.error': return 'Wystąpił błąd'; + case 'scan.closeError': return 'Zamknij.'; default: return null; } } diff --git a/lib/i18n/strings.i18n.json b/lib/i18n/strings.i18n.json index c940393..71a16a8 100644 --- a/lib/i18n/strings.i18n.json +++ b/lib/i18n/strings.i18n.json @@ -30,8 +30,8 @@ "pkt":" pkt", "wait": "Proszę czekać, trwa Ładowanie...", "lastScans": "Ostatnie skany:", - "error": "Wystąpił błąd" - - + "error": "Wystąpił błąd", + "closeError": "Zamknij." } + } diff --git a/lib/pages/scan/scan.dart b/lib/pages/scan/scan.dart index d16ed54..1b119b6 100644 --- a/lib/pages/scan/scan.dart +++ b/lib/pages/scan/scan.dart @@ -118,7 +118,7 @@ class _MainPageState extends State { content: Text(t.scan.tryAgain), actions: [ TextButton( - child: Text('Zamknij.'), + child: Text(t.scan.closeError), onPressed: () { _scanBloc .add(ScanEvent.alertDialogDismissed()); @@ -147,8 +147,8 @@ class _MainPageState extends State { boxShadow: [], ), child: _isTorchOn - ? Assets.menuPage.flashlighton.svg() - : Assets.menuPage.flashlightoff.svg(), + ? Assets.scan.flashlightOn.svg() + : Assets.scan.flashlightOff.svg(), ), ), ], diff --git a/lib/theme/assets.gen.dart b/lib/theme/assets.gen.dart index 0040cfd..4237951 100644 --- a/lib/theme/assets.gen.dart +++ b/lib/theme/assets.gen.dart @@ -37,12 +37,6 @@ class $AssetsMenuPageGen { /// File path: assets/menuPage/diversity.svg SvgGenImage get diversity => const SvgGenImage('assets/menuPage/diversity.svg'); - /// File path: assets/menuPage/flashlightoff.svg - SvgGenImage get flashlightoff => const SvgGenImage('assets/menuPage/flashlightoff.svg'); - - /// File path: assets/menuPage/flashlighton.svg - SvgGenImage get flashlighton => const SvgGenImage('assets/menuPage/flashlighton.svg'); - /// File path: assets/menuPage/github.svg SvgGenImage get github => const SvgGenImage('assets/menuPage/github.svg'); @@ -58,8 +52,8 @@ class $AssetsMenuPageGen { /// File path: assets/menuPage/menu.svg SvgGenImage get menu => const SvgGenImage('assets/menuPage/menu.svg'); - /// File path: assets/menuPage/showmore.svg - SvgGenImage get showmore => const SvgGenImage('assets/menuPage/showmore.svg'); + /// File path: assets/menuPage/showMore.svg + SvgGenImage get showMore => const SvgGenImage('assets/menuPage/showMore.svg'); /// File path: assets/menuPage/star.svg SvgGenImage get star => const SvgGenImage('assets/menuPage/star.svg'); @@ -68,8 +62,7 @@ class $AssetsMenuPageGen { SvgGenImage get thumbs => const SvgGenImage('assets/menuPage/thumbs.svg'); /// List of all assets - List get values => - [diversity, flashlightoff, flashlighton, github, groups, handshake, info, menu, showmore, star, thumbs]; + List get values => [diversity, github, groups, handshake, info, menu, showMore, star, thumbs]; } class $AssetsNavigationGen { @@ -82,6 +75,19 @@ class $AssetsNavigationGen { List get values => [close]; } +class $AssetsScanGen { + const $AssetsScanGen(); + + /// File path: assets/scan/flashlightOff.svg + SvgGenImage get flashlightOff => const SvgGenImage('assets/scan/flashlightOff.svg'); + + /// File path: assets/scan/flashlightOn.svg + SvgGenImage get flashlightOn => const SvgGenImage('assets/scan/flashlightOn.svg'); + + /// List of all assets + List get values => [flashlightOff, flashlightOn]; +} + class Assets { Assets._(); @@ -94,6 +100,7 @@ class Assets { static const AssetGenImage menu = AssetGenImage('assets/menu.png'); static const $AssetsMenuPageGen menuPage = $AssetsMenuPageGen(); static const $AssetsNavigationGen navigation = $AssetsNavigationGen(); + static const $AssetsScanGen scan = $AssetsScanGen(); /// List of all assets static List get values => diff --git a/lib/ui/list_item.dart b/lib/ui/list_item.dart index 5bbbbe8..d8bc2f3 100644 --- a/lib/ui/list_item.dart +++ b/lib/ui/list_item.dart @@ -141,7 +141,7 @@ class _ListItem extends StatelessWidget { Expanded(child: child), Padding( padding: EdgeInsets.only(right: 8.0), - child: Assets.menuPage.showmore.svg(), + child: Assets.menuPage.showMore.svg(), ), ], ), diff --git a/pubspec.yaml b/pubspec.yaml index cc66e2e..ab1b19b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -58,6 +58,7 @@ flutter: - assets/fonts/ - assets/company/ - assets/navigation/ + - assets/scan/ fonts: - family: Roboto