feat(ui): About in drawer; higher-contrast app icon & splash
Add an "About" entry to the navigation drawer (below Settings) so the About screen is reachable without opening Settings first. Recolour the launcher icon and native splash to a white sprout on brand green (#2F7D34) — the previous dark-green-on-light-green had almost no contrast. Regenerate Android, iOS and web icons and the light/dark splash.
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 5 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2 KiB |
|
Before Width: | Height: | Size: 5 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 5 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 69 B After Width: | Height: | Size: 69 B |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 69 B After Width: | Height: | Size: 69 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 838 B After Width: | Height: | Size: 801 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.7 KiB |
|
|
@ -6,7 +6,7 @@
|
|||
<item name="android:windowFullscreen">false</item>
|
||||
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
|
||||
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
|
||||
<item name="android:windowSplashScreenBackground">#E7F1E0</item>
|
||||
<item name="android:windowSplashScreenBackground">#2F7D34</item>
|
||||
<item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="ic_launcher_background">#E7F1E0</color>
|
||||
<color name="ic_launcher_background">#2F7D34</color>
|
||||
</resources>
|
||||
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 328 B After Width: | Height: | Size: 312 B |
|
Before Width: | Height: | Size: 670 B After Width: | Height: | Size: 646 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1 KiB |
|
Before Width: | Height: | Size: 467 B After Width: | Height: | Size: 458 B |
|
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1,010 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 670 B After Width: | Height: | Size: 646 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 913 B After Width: | Height: | Size: 850 B |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1,003 B |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 69 B After Width: | Height: | Size: 69 B |
|
Before Width: | Height: | Size: 5 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 26 KiB |
|
|
@ -55,6 +55,14 @@ class AppDrawer extends StatelessWidget {
|
|||
context.push('/settings');
|
||||
},
|
||||
),
|
||||
_DrawerItem(
|
||||
icon: const Icon(Icons.info_outline),
|
||||
label: t.about.title,
|
||||
onTap: () {
|
||||
Navigator.of(context).pop();
|
||||
context.push('/about');
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -66,30 +66,30 @@ dev_dependencies:
|
|||
flutter_launcher_icons: ^0.14.4
|
||||
flutter_native_splash: ^2.4.7
|
||||
|
||||
# App launcher icon (green sprout on the light-green canvas). Regenerate with:
|
||||
# dart run flutter_launcher_icons
|
||||
# App launcher icon: a white sprout on brand green (#2F7D34) for strong
|
||||
# contrast. Regenerate with: dart run flutter_launcher_icons
|
||||
flutter_launcher_icons:
|
||||
image_path: assets/icon.png
|
||||
android: true
|
||||
ios: true
|
||||
remove_alpha_ios: true
|
||||
adaptive_icon_background: "#E7F1E0"
|
||||
adaptive_icon_background: "#2F7D34"
|
||||
adaptive_icon_foreground: assets/icon_foreground.png
|
||||
web:
|
||||
generate: true
|
||||
image_path: assets/icon.png
|
||||
background_color: "#E7F1E0"
|
||||
background_color: "#2F7D34"
|
||||
theme_color: "#2F7D34"
|
||||
|
||||
# Native splash: the sprout on the canvas colour, light & dark. Regenerate with:
|
||||
# dart run flutter_native_splash:create
|
||||
# Native splash: white sprout on brand green, a darker green in dark mode.
|
||||
# Regenerate with: dart run flutter_native_splash:create
|
||||
flutter_native_splash:
|
||||
color: "#E7F1E0"
|
||||
color: "#2F7D34"
|
||||
color_dark: "#22521E"
|
||||
image: assets/splash_logo.png
|
||||
android_12:
|
||||
image: assets/splash_logo.png
|
||||
color: "#E7F1E0"
|
||||
color: "#2F7D34"
|
||||
color_dark: "#22521E"
|
||||
|
||||
flutter:
|
||||
|
|
|
|||
|
|
@ -24,6 +24,24 @@ void main() {
|
|||
);
|
||||
});
|
||||
|
||||
testWidgets('drawer About item opens the About screen', (tester) async {
|
||||
LocaleSettings.setLocaleSync(AppLocale.en);
|
||||
final db = newTestDatabase();
|
||||
addTearDown(db.close);
|
||||
|
||||
await tester.pumpWidget(app(db));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
await tester.tap(find.byIcon(Icons.menu));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('About')); // drawer entry
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('種まき'), findsOneWidget);
|
||||
expect(find.textContaining('digital Plantare'), findsOneWidget);
|
||||
await disposeTree(tester);
|
||||
});
|
||||
|
||||
testWidgets('Settings About tile opens the About screen', (tester) async {
|
||||
LocaleSettings.setLocaleSync(AppLocale.en);
|
||||
final db = newTestDatabase();
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 263 B After Width: | Height: | Size: 244 B |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 12 KiB |