Skip to content

Commit 10bb135

Browse files
committed
fix: resolve the "Invalid constant value" error. The const keyword was removed from the NavigationDestination widgets where the non-constant l10n variable was used for the label.
1 parent ec145fd commit 10bb135

File tree

3 files changed

+15
-17
lines changed

3 files changed

+15
-17
lines changed

lib/app/view/app_shell.dart

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,23 +49,23 @@ class AppShell extends StatelessWidget {
4949
onSelectedIndexChange: _goBranch,
5050
// Define the navigation destinations.
5151
destinations: [
52-
const NavigationDestination(
52+
NavigationDestination(
5353
// Make const
54-
icon: Icon(Icons.article_outlined),
55-
selectedIcon: Icon(Icons.article),
56-
label: l10n.bottomNavFeedLabel, // Placeholder until generated
54+
icon: const Icon(Icons.article_outlined),
55+
selectedIcon: const Icon(Icons.article),
56+
label: l10n.bottomNavFeedLabel,
5757
),
58-
const NavigationDestination(
58+
NavigationDestination(
5959
// Make const
60-
icon: Icon(Icons.search_outlined),
61-
selectedIcon: Icon(Icons.search),
62-
label: l10n.bottomNavSearchLabel, // Placeholder until generated
60+
icon: const Icon(Icons.search_outlined),
61+
selectedIcon: const Icon(Icons.search),
62+
label: l10n.bottomNavSearchLabel,
6363
),
64-
const NavigationDestination(
64+
NavigationDestination(
6565
// Make const
66-
icon: Icon(Icons.account_circle_outlined),
67-
selectedIcon: Icon(Icons.account_circle),
68-
label: l10n.bottomNavAccountLabel, // Placeholder until generated
66+
icon: const Icon(Icons.account_circle_outlined),
67+
selectedIcon: const Icon(Icons.account_circle),
68+
label: l10n.bottomNavAccountLabel,
6969
),
7070
],
7171
// The body displays the widget tree for the currently selected branch.

lib/main.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,10 @@ void main() async {
2222
// 1. Authentication Repository
2323
// Define ActionCodeSettings for email link sign-in
2424
final actionCodeSettings = ActionCodeSettings(
25-
// IMPORTANT: Replace with your actual Firebase Dynamic Link domain/setup
2625
url: 'https://htmain.page.link/finishLogin',
2726
handleCodeInApp: true,
28-
// IMPORTANT: Replace with your actual bundle/package IDs
29-
iOSBundleId: 'com.example.htMain', // Example ID
30-
androidPackageName: 'com.example.ht_main', // Example ID
27+
iOSBundleId: 'com.example.htMain',
28+
androidPackageName: 'com.example.ht_main',
3129
androidInstallApp: true,
3230
androidMinimumVersion: '12', // Optional: Specify minimum Android version
3331
);

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: ht_main
22
description: main headlines toolkit mobile app.
3-
version: 0.40.7
3+
version: 0.41.1
44
publish_to: none
55
repository: https://github.com/headlines-toolkit/ht-main
66
environment:

0 commit comments

Comments
 (0)