Skip to content

Commit b71a412

Browse files
committed
refactor: Update web icons and manifest
Also show Rate App only on Android
1 parent 4bdde59 commit b71a412

File tree

9 files changed

+16
-13
lines changed

9 files changed

+16
-13
lines changed

lib/common/app_strings.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class AppStrings {
1515
static const String drawerTitle = appName;
1616
static const String settingsItemTitle = 'Settings';
1717
static const String helpItemTitle = 'Online Help';
18-
static const String rateItemTitle = 'Rate app';
18+
static const String rateItemTitle = 'Rate or review';
1919
static const String viewSourceItemTitle = 'View app source';
2020

2121
static const Map<MenuAction, String> menuActions = {

lib/widgets/counters_drawer.dart

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ class CountersDrawer extends StatelessWidget {
4242

4343
@override
4444
Widget build(BuildContext context) {
45+
final bool isAndroid = Theme.of(context).platform == TargetPlatform.android;
46+
4547
return Drawer(
4648
child: ListTileTheme(
4749
selectedColor: Colors.black,
@@ -60,17 +62,18 @@ class CountersDrawer extends StatelessWidget {
6062
title: const Text(AppStrings.helpItemTitle),
6163
onTap: () => _onExtraActionTap(context, DrawerExtraActions.help),
6264
),
63-
ListTile(
64-
leading: const Icon(Icons.rate_review),
65-
title: const Text(AppStrings.rateItemTitle),
66-
onTap: () => _onExtraActionTap(context, DrawerExtraActions.rate),
67-
),
68-
const Divider(),
6965
ListTile(
7066
leading: const Icon(Icons.code),
7167
title: const Text(AppStrings.viewSourceItemTitle),
7268
onTap: () => _onExtraActionTap(context, DrawerExtraActions.viewSource),
7369
),
70+
if (isAndroid) const Divider(),
71+
if (isAndroid)
72+
ListTile(
73+
leading: const Icon(Icons.rate_review_outlined),
74+
title: const Text(AppStrings.rateItemTitle),
75+
onTap: () => _onExtraActionTap(context, DrawerExtraActions.rate),
76+
),
7477
],
7578
),
7679
),

web/favicon.png

137 Bytes
Loading

web/icons/Icon-192.png

9.3 KB
Loading

web/icons/Icon-512.png

44 KB
Loading

web/icons/Icon-maskable-192.png

9.01 KB
Loading

web/icons/Icon-maskable-512.png

31.5 KB
Loading

web/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@
2323
<!-- iOS meta tags & icons -->
2424
<meta name="apple-mobile-web-app-capable" content="yes">
2525
<meta name="apple-mobile-web-app-status-bar-style" content="black">
26-
<meta name="apple-mobile-web-app-title" content="hello_world_counters">
26+
<meta name="apple-mobile-web-app-title" content="Hello World Counters">
2727
<link rel="apple-touch-icon" href="icons/Icon-192.png">
2828

2929
<!-- Favicon -->
3030
<link rel="icon" type="image/png" href="favicon.png"/>
3131

32-
<title>hello_world_counters</title>
32+
<title>Hello World Counters</title>
3333
<link rel="manifest" href="manifest.json">
3434

3535
<script>

web/manifest.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"name": "hello_world_counters",
3-
"short_name": "hello_world_counters",
2+
"name": "Hello World Counters",
3+
"short_name": "Hello World Counters",
44
"start_url": ".",
55
"display": "standalone",
6-
"background_color": "#0175C2",
7-
"theme_color": "#0175C2",
6+
"background_color": "#2196F3",
7+
"theme_color": "#2196F3",
88
"description": "A new Flutter project.",
99
"orientation": "portrait-primary",
1010
"prefer_related_applications": false,

0 commit comments

Comments
 (0)