The personal finance app for everyone (by everyone)
Ruby
feat(mobile): add SureIcon (Lucide) primitive and migrate dashboard icons (#2346)
ghost4eca3b5b6bdc
diff --git a/mobile/assets/icons/lucide/LICENSE b/mobile/assets/icons/lucide/LICENSEnew file mode 100644index 0000000000..718bb3f0e4--- /dev/null+++ b/mobile/assets/icons/lucide/LICENSE@@ -0,0 +1,43 @@+ISC License++Copyright (c) 2026 Lucide Icons and Contributors++Permission to use, copy, modify, and/or distribute this software for any+purpose with or without fee is hereby granted, provided that the above+copyright notice and this permission notice appear in all copies.++THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.++---++The following Lucide icons are derived from the Feather project:++airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out++The MIT License (MIT) (for the icons listed above)++Copyright (c) 2013-present Cole Bemis++Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in all+copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE+SOFTWARE.diff --git a/mobile/assets/icons/lucide/bitcoin.svg b/mobile/assets/icons/lucide/bitcoin.svgnew file mode 100644index 0000000000..e7346fa374--- /dev/null+++ b/mobile/assets/icons/lucide/bitcoin.svg@@ -0,0 +1,13 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M11.767 19.089c4.924.868 6.14-6.025 1.216-6.894m-1.216 6.894L5.86 18.047m5.908 1.042-.347 1.97m1.563-8.864c4.924.869 6.14-6.025 1.215-6.893m-1.215 6.893-3.94-.694m5.155-6.2L8.29 4.26m5.908 1.042.348-1.97M7.48 20.364l3.126-17.727" />+</svg>diff --git a/mobile/assets/icons/lucide/car.svg b/mobile/assets/icons/lucide/car.svgnew file mode 100644index 0000000000..c99feda01b--- /dev/null+++ b/mobile/assets/icons/lucide/car.svg@@ -0,0 +1,16 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2" />+ <circle cx="7" cy="17" r="2" />+ <path d="M9 17h6" />+ <circle cx="17" cy="17" r="2" />+</svg>diff --git a/mobile/assets/icons/lucide/chevron-down.svg b/mobile/assets/icons/lucide/chevron-down.svgnew file mode 100644index 0000000000..e70d30b883--- /dev/null+++ b/mobile/assets/icons/lucide/chevron-down.svg@@ -0,0 +1,13 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="m6 9 6 6 6-6" />+</svg>diff --git a/mobile/assets/icons/lucide/chevron-up.svg b/mobile/assets/icons/lucide/chevron-up.svgnew file mode 100644index 0000000000..b011f77212--- /dev/null+++ b/mobile/assets/icons/lucide/chevron-up.svg@@ -0,0 +1,13 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="m18 15-6-6-6 6" />+</svg>diff --git a/mobile/assets/icons/lucide/circle-alert.svg b/mobile/assets/icons/lucide/circle-alert.svgnew file mode 100644index 0000000000..578d25c022--- /dev/null+++ b/mobile/assets/icons/lucide/circle-alert.svg@@ -0,0 +1,15 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <circle cx="12" cy="12" r="10" />+ <line x1="12" x2="12" y1="8" y2="12" />+ <line x1="12" x2="12.01" y1="16" y2="16" />+</svg>diff --git a/mobile/assets/icons/lucide/circle-check.svg b/mobile/assets/icons/lucide/circle-check.svgnew file mode 100644index 0000000000..2690cda6d9--- /dev/null+++ b/mobile/assets/icons/lucide/circle-check.svg@@ -0,0 +1,14 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <circle cx="12" cy="12" r="10" />+ <path d="m9 12 2 2 4-4" />+</svg>diff --git a/mobile/assets/icons/lucide/cloud-check.svg b/mobile/assets/icons/lucide/cloud-check.svgnew file mode 100644index 0000000000..636242219e--- /dev/null+++ b/mobile/assets/icons/lucide/cloud-check.svg@@ -0,0 +1,14 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="m17 15-5.5 5.5L9 18" />+ <path d="M5.516 16.07A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 3.501 7.327" />+</svg>diff --git a/mobile/assets/icons/lucide/credit-card.svg b/mobile/assets/icons/lucide/credit-card.svgnew file mode 100644index 0000000000..f1476ca742--- /dev/null+++ b/mobile/assets/icons/lucide/credit-card.svg@@ -0,0 +1,14 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <rect width="20" height="14" x="2" y="5" rx="2" />+ <line x1="2" x2="22" y1="10" y2="10" />+</svg>diff --git a/mobile/assets/icons/lucide/hand-coins.svg b/mobile/assets/icons/lucide/hand-coins.svgnew file mode 100644index 0000000000..6751e8bdd7--- /dev/null+++ b/mobile/assets/icons/lucide/hand-coins.svg@@ -0,0 +1,17 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M11 15h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 17" />+ <path d="m7 21 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9" />+ <path d="m2 16 6 6" />+ <circle cx="16" cy="9" r="2.9" />+ <circle cx="6" cy="5" r="3" />+</svg>diff --git a/mobile/assets/icons/lucide/house.svg b/mobile/assets/icons/lucide/house.svgnew file mode 100644index 0000000000..10e4097e29--- /dev/null+++ b/mobile/assets/icons/lucide/house.svg@@ -0,0 +1,14 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8" />+ <path d="M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" />+</svg>diff --git a/mobile/assets/icons/lucide/landmark.svg b/mobile/assets/icons/lucide/landmark.svgnew file mode 100644index 0000000000..3836f84e66--- /dev/null+++ b/mobile/assets/icons/lucide/landmark.svg@@ -0,0 +1,18 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M10 18v-7" />+ <path d="M11.119 2.205a2 2 0 0 1 1.762 0l7.84 3.846A.5.5 0 0 1 20.5 7h-17a.5.5 0 0 1-.22-.949z" />+ <path d="M14 18v-7" />+ <path d="M18 18v-7" />+ <path d="M3 22h18" />+ <path d="M6 18v-7" />+</svg>diff --git a/mobile/assets/icons/lucide/receipt.svg b/mobile/assets/icons/lucide/receipt.svgnew file mode 100644index 0000000000..7d32f4ec99--- /dev/null+++ b/mobile/assets/icons/lucide/receipt.svg@@ -0,0 +1,15 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M12 17V7" />+ <path d="M16 8h-6a2 2 0 0 0 0 4h4a2 2 0 0 1 0 4H8" />+ <path d="M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z" />+</svg>diff --git a/mobile/assets/icons/lucide/refresh-cw.svg b/mobile/assets/icons/lucide/refresh-cw.svgnew file mode 100644index 0000000000..c27b3a9677--- /dev/null+++ b/mobile/assets/icons/lucide/refresh-cw.svg@@ -0,0 +1,16 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" />+ <path d="M21 3v5h-5" />+ <path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" />+ <path d="M8 16H3v5" />+</svg>diff --git a/mobile/assets/icons/lucide/shapes.svg b/mobile/assets/icons/lucide/shapes.svgnew file mode 100644index 0000000000..cce5127921--- /dev/null+++ b/mobile/assets/icons/lucide/shapes.svg@@ -0,0 +1,15 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z" />+ <rect x="3" y="14" width="7" height="7" rx="1" />+ <circle cx="17.5" cy="17.5" r="3.5" />+</svg>diff --git a/mobile/assets/icons/lucide/trending-down.svg b/mobile/assets/icons/lucide/trending-down.svgnew file mode 100644index 0000000000..2ec045a070--- /dev/null+++ b/mobile/assets/icons/lucide/trending-down.svg@@ -0,0 +1,14 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M16 17h6v-6" />+ <path d="m22 17-8.5-8.5-5 5L2 7" />+</svg>diff --git a/mobile/assets/icons/lucide/trending-up.svg b/mobile/assets/icons/lucide/trending-up.svgnew file mode 100644index 0000000000..2ff1fb2026--- /dev/null+++ b/mobile/assets/icons/lucide/trending-up.svg@@ -0,0 +1,14 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M16 7h6v6" />+ <path d="m22 7-8.5 8.5-5-5L2 17" />+</svg>diff --git a/mobile/assets/icons/lucide/wallet.svg b/mobile/assets/icons/lucide/wallet.svgnew file mode 100644index 0000000000..9d63559bba--- /dev/null+++ b/mobile/assets/icons/lucide/wallet.svg@@ -0,0 +1,14 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1" />+ <path d="M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4" />+</svg>diff --git a/mobile/lib/screens/dashboard_screen.dart b/mobile/lib/screens/dashboard_screen.dartindex 3fec860066..86a3265fdd 100644--- a/mobile/lib/screens/dashboard_screen.dart+++ b/mobile/lib/screens/dashboard_screen.dart@@ -11,6 +11,7 @@ import '../widgets/account_card.dart';import '../widgets/connectivity_banner.dart';import '../widgets/net_worth_card.dart';import '../widgets/currency_filter.dart';+import '../widgets/sure_icon.dart';import 'transaction_form_screen.dart';import 'transactions_list_screen.dart';@@ -173,7 +174,7 @@ class DashboardScreenState extends State<DashboardScreen> {SnackBar(content: Row(children: [- const Icon(Icons.error, color: Colors.white),+ const SureIcon(SureIcons.circleAlert, color: Colors.white),const SizedBox(width: 12),const Expanded(child: Text('Sync failed. Please try again.')),],@@ -194,7 +195,7 @@ class DashboardScreenState extends State<DashboardScreen> {const SnackBar(content: Row(children: [- Icon(Icons.error, color: Colors.white),+ SureIcon(SureIcons.circleAlert, color: Colors.white),SizedBox(width: 12),Expanded(child: Text('Sync failed. Please try again.')),],@@ -323,7 +324,7 @@ class DashboardScreenState extends State<DashboardScreen> {const SnackBar(content: Row(children: [- Icon(Icons.check_circle, color: Colors.white),+ SureIcon(SureIcons.circleCheck, color: Colors.white),SizedBox(width: 12),Text('Accounts updated'),],@@ -368,7 +369,11 @@ class DashboardScreenState extends State<DashboardScreen> {child: const Row(mainAxisAlignment: MainAxisAlignment.center,children: [- Icon(Icons.cloud_done, color: Colors.green, size: 18),+ SureIcon(+ SureIcons.cloudCheck,+ color: Colors.green,+ size: 18,+ ),SizedBox(width: 8),Text('Synced',@@ -397,8 +402,8 @@ class DashboardScreenState extends State<DashboardScreen> {child: Column(mainAxisAlignment: MainAxisAlignment.center,children: [- Icon(- Icons.error_outline,+ SureIcon(+ SureIcons.circleAlert,size: 64,color: colorScheme.error,),@@ -416,7 +421,7 @@ class DashboardScreenState extends State<DashboardScreen> {const SizedBox(height: 24),ElevatedButton.icon(onPressed: _handleRefresh,- icon: const Icon(Icons.refresh),+ icon: const SureIcon(SureIcons.refresh),label: const Text('Try Again'),),],@@ -433,8 +438,8 @@ class DashboardScreenState extends State<DashboardScreen> {child: Column(mainAxisAlignment: MainAxisAlignment.center,children: [- Icon(- Icons.account_balance_wallet_outlined,+ SureIcon(+ SureIcons.wallet,size: 64,color: colorScheme.onSurfaceVariant,),@@ -452,7 +457,7 @@ class DashboardScreenState extends State<DashboardScreen> {const SizedBox(height: 24),ElevatedButton.icon(onPressed: _handleRefresh,- icon: const Icon(Icons.refresh),+ icon: const SureIcon(SureIcons.refresh),label: const Text('Refresh'),),],@@ -530,8 +535,8 @@ class DashboardScreenState extends State<DashboardScreen> {padding: const EdgeInsets.all(32),child: Column(children: [- Icon(- Icons.account_balance_wallet_outlined,+ SureIcon(+ SureIcons.wallet,size: 48,color: Theme.of(context).colorScheme.onSurfaceVariant,),@@ -666,28 +671,28 @@ class _CollapsibleTypeHeader extends StatelessWidget {required this.onToggle,});- IconData _getTypeIcon() {+ String _getTypeIconName() {switch (accountType) {case 'depository':- return Icons.account_balance;+ return SureIcons.landmark;case 'credit_card':- return Icons.credit_card;+ return SureIcons.creditCard;case 'investment':- return Icons.trending_up;+ return SureIcons.trendingUp;case 'loan':- return Icons.receipt_long;+ return SureIcons.receipt;case 'property':- return Icons.home;+ return SureIcons.house;case 'vehicle':- return Icons.directions_car;+ return SureIcons.car;case 'crypto':- return Icons.currency_bitcoin;+ return SureIcons.bitcoin;case 'other_asset':- return Icons.category;+ return SureIcons.shapes;case 'other_liability':- return Icons.payment;+ return SureIcons.handCoins;default:- return Icons.account_balance_wallet;+ return SureIcons.wallet;}}@@ -701,8 +706,8 @@ class _CollapsibleTypeHeader extends StatelessWidget {padding: const EdgeInsets.fromLTRB(16, 16, 16, 8),child: Row(children: [- Icon(- _getTypeIcon(),+ SureIcon(+ _getTypeIconName(),size: 18,color: colorScheme.onSurfaceVariant,),@@ -730,9 +735,9 @@ class _CollapsibleTypeHeader extends StatelessWidget {),),const Spacer(),- Icon(- isCollapsed ? Icons.expand_more : Icons.expand_less,- size: 20,+ SureIcon(+ isCollapsed ? SureIcons.chevronDown : SureIcons.chevronUp,+ size: SureIconSize.md,color: colorScheme.onSurfaceVariant,),],diff --git a/mobile/lib/widgets/account_card.dart b/mobile/lib/widgets/account_card.dartindex 8c4a05f785..cc070ab757 100644--- a/mobile/lib/widgets/account_card.dart+++ b/mobile/lib/widgets/account_card.dart@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';import '../models/account.dart';import '../theme/sure_colors.dart';import 'money_text.dart';+import 'sure_icon.dart';class AccountCard extends StatelessWidget {final Account account;@@ -15,28 +16,28 @@ class AccountCard extends StatelessWidget {this.onSwipe,});- IconData _getAccountIcon() {+ String _getAccountIconName() {switch (account.accountType) {case 'depository':- return Icons.account_balance;+ return SureIcons.landmark;case 'credit_card':- return Icons.credit_card;+ return SureIcons.creditCard;case 'investment':- return Icons.trending_up;+ return SureIcons.trendingUp;case 'loan':- return Icons.receipt_long;+ return SureIcons.receipt;case 'property':- return Icons.home;+ return SureIcons.house;case 'vehicle':- return Icons.directions_car;+ return SureIcons.car;case 'crypto':- return Icons.currency_bitcoin;+ return SureIcons.bitcoin;case 'other_asset':- return Icons.category;+ return SureIcons.shapes;case 'other_liability':- return Icons.payment;+ return SureIcons.handCoins;default:- return Icons.account_balance_wallet;+ return SureIcons.wallet;}}@@ -73,10 +74,10 @@ class AccountCard extends StatelessWidget {color: accountColor.withValues(alpha: 0.1),borderRadius: BorderRadius.circular(12),),- child: Icon(- _getAccountIcon(),+ child: SureIcon(+ _getAccountIconName(),color: accountColor,- size: 24,+ size: SureIconSize.lg,),),const SizedBox(width: 16),@@ -156,7 +157,11 @@ class AccountCard extends StatelessWidget {child: const Column(mainAxisAlignment: MainAxisAlignment.center,children: [- Icon(Icons.receipt_long, color: Colors.white, size: 28),+ SureIcon(+ SureIcons.receipt,+ color: Colors.white,+ size: SureIconSize.xl,+ ),SizedBox(height: 4),Text('Transactions',diff --git a/mobile/lib/widgets/net_worth_card.dart b/mobile/lib/widgets/net_worth_card.dartindex a4c409dd36..988795c43a 100644--- a/mobile/lib/widgets/net_worth_card.dart+++ b/mobile/lib/widgets/net_worth_card.dart@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';import '../theme/sure_colors.dart';import 'money_text.dart';+import 'sure_icon.dart';enum AccountFilter { all, assets, liabilities }@@ -200,10 +201,12 @@ class NetWorthCard extends StatelessWidget {Row(mainAxisAlignment: MainAxisAlignment.center,children: [- Icon(- title == 'Assets' ? Icons.trending_up : Icons.trending_down,+ SureIcon(+ title == 'Assets'+ ? SureIcons.trendingUp+ : SureIcons.trendingDown,color: color,- size: 20,+ size: SureIconSize.md,),const SizedBox(width: 8),Text(diff --git a/mobile/lib/widgets/sure_icon.dart b/mobile/lib/widgets/sure_icon.dartnew file mode 100644index 0000000000..e332350ed5--- /dev/null+++ b/mobile/lib/widgets/sure_icon.dart@@ -0,0 +1,103 @@+import 'package:flutter/widgets.dart';+import 'package:flutter_svg/flutter_svg.dart';++/// Sure design-system icon primitive.+///+/// Renders a bundled Lucide SVG (stroke `currentColor`, 2px) tinted to a single+/// color, mirroring the web `icon` helper / `DS::FilledIcon` semantics: tokenized+/// size, color inherited from the surrounding [IconTheme] by default, and+/// accessibility that distinguishes decorative from meaningful icons.+///+/// Use [SureIcons] for the bundled icon names so call sites stay typo-safe and+/// only reference assets that actually ship in `assets/icons/lucide/`.+///+/// ```dart+/// const SureIcon(SureIcons.wallet, size: SureIconSize.lg) // decorative+/// const SureIcon(SureIcons.refresh, semanticLabel: 'Refresh') // meaningful+/// ```+class SureIcon extends StatelessWidget {+ /// Lucide icon name (kebab-case), e.g. `wallet`. Prefer [SureIcons] constants.+ final String name;++ /// Square edge length in logical pixels. Prefer a [SureIconSize] token. When+ /// null, inherits the ambient [IconTheme] size (Material-icon parity), falling+ /// back to 24 — so dropping `SureIcon` in for `Icon` preserves sizing.+ final double? size;++ /// Tint applied to the icon. When null, inherits the ambient [IconTheme]+ /// color (Material-icon parity), falling back to opaque black only if unset.+ final Color? color;++ /// When provided, the icon is exposed to assistive tech with this label+ /// (meaningful icon). When null, the icon is decorative and excluded from the+ /// semantics tree — use this only when an adjacent widget carries the name.+ final String? semanticLabel;++ const SureIcon(+ this.name, {+ super.key,+ this.size,+ this.color,+ this.semanticLabel,+ });++ @override+ Widget build(BuildContext context) {+ final iconTheme = IconTheme.of(context);+ final resolvedSize = size ?? iconTheme.size ?? 24;+ final resolvedColor = color ?? iconTheme.color ?? const Color(0xFF000000);+ // Mirror Material `Icon`: always paint the glyph at `resolvedSize`, even when+ // a parent imposes tight constraints larger than the icon (e.g. a fixed-size+ // Container). The outer SizedBox sets the intrinsic size; the Center loosens+ // the constraints handed to SvgPicture so its width/height aren't stretched.+ return SizedBox(+ width: resolvedSize,+ height: resolvedSize,+ child: Center(+ child: SvgPicture.asset(+ 'assets/icons/lucide/$name.svg',+ width: resolvedSize,+ height: resolvedSize,+ colorFilter: ColorFilter.mode(resolvedColor, BlendMode.srcIn),+ semanticsLabel: semanticLabel,+ excludeFromSemantics: semanticLabel == null,+ ),+ ),+ );+ }+}++/// Canonical icon sizes, mirroring the web `icon` helper scale+/// (xs/sm/md/lg/xl/2xl → 12/16/20/24/28/32).+abstract final class SureIconSize {+ static const double xs = 12;+ static const double sm = 16;+ static const double md = 20;+ static const double lg = 24;+ static const double xl = 28;+ static const double xxl = 32;+}++/// Names of the Lucide icons bundled under `assets/icons/lucide/`.+///+/// Referencing a name here guarantees the asset ships; add the SVG (and a+/// constant) before using a new icon.+abstract final class SureIcons {+ static const String landmark = 'landmark';+ static const String creditCard = 'credit-card';+ static const String trendingUp = 'trending-up';+ static const String trendingDown = 'trending-down';+ static const String receipt = 'receipt';+ static const String house = 'house';+ static const String car = 'car';+ static const String bitcoin = 'bitcoin';+ static const String shapes = 'shapes';+ static const String handCoins = 'hand-coins';+ static const String wallet = 'wallet';+ static const String circleAlert = 'circle-alert';+ static const String circleCheck = 'circle-check';+ static const String cloudCheck = 'cloud-check';+ static const String refresh = 'refresh-cw';+ static const String chevronUp = 'chevron-up';+ static const String chevronDown = 'chevron-down';+}diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yamlindex b09f067875..aa1679402b 100644--- a/mobile/pubspec.yaml+++ b/mobile/pubspec.yaml@@ -39,6 +39,7 @@ flutter:assets:- assets/icon/- assets/images/+ - assets/icons/lucide/# Geist + Geist Mono (SIL OFL-1.1 — see assets/fonts/OFL.txt). The theme# (SureTokens.fontSans/fontMono) already names these families; bundling the# assets here makes them actually render instead of falling back to thediff --git a/mobile/test/widgets/sure_icon_test.dart b/mobile/test/widgets/sure_icon_test.dartnew file mode 100644index 0000000000..879014df52--- /dev/null+++ b/mobile/test/widgets/sure_icon_test.dart@@ -0,0 +1,67 @@+import 'package:flutter/material.dart';+import 'package:flutter_svg/flutter_svg.dart';+import 'package:flutter_test/flutter_test.dart';+import 'package:sure_mobile/widgets/sure_icon.dart';++void main() {+ SvgPicture svg(WidgetTester tester) =>+ tester.widget<SvgPicture>(find.byType(SvgPicture));++ testWidgets('renders the named Lucide asset at the requested size',+ (tester) async {+ await tester.pumpWidget(+ const MaterialApp(+ home: SureIcon(SureIcons.wallet, size: SureIconSize.lg),+ ),+ );+ expect(svg(tester).width, SureIconSize.lg);+ expect(svg(tester).height, SureIconSize.lg);+ });++ testWidgets('paints at its size inside a larger tight-constrained parent',+ (tester) async {+ await tester.pumpWidget(+ const MaterialApp(+ home: Center(+ child: SizedBox(+ width: 48,+ height: 48,+ child: SureIcon(SureIcons.landmark, size: SureIconSize.lg),+ ),+ ),+ ),+ );+ // The glyph must stay 24 (not stretch to the 48 container) — regression for+ // the account-card icon rendering at 2x.+ expect(tester.getSize(find.byType(SvgPicture)), const Size(24, 24));+ });++ testWidgets('falls back to the ambient IconTheme size when size is null',+ (tester) async {+ await tester.pumpWidget(+ const MaterialApp(+ home: IconTheme(+ data: IconThemeData(size: 30),+ child: SureIcon(SureIcons.refresh),+ ),+ ),+ );+ expect(svg(tester).width, 30);+ expect(svg(tester).height, 30);+ });++ testWidgets('a meaningful icon exposes its label; a decorative one does not',+ (tester) async {+ await tester.pumpWidget(+ const MaterialApp(+ home: SureIcon(SureIcons.refresh, semanticLabel: 'Refresh'),+ ),+ );+ expect(find.bySemanticsLabel('Refresh'), findsOneWidget);++ await tester.pumpWidget(+ const MaterialApp(home: SureIcon(SureIcons.wallet)),+ );+ expect(find.bySemanticsLabel('wallet'), findsNothing);+ });+}