|
|
@@ -925,49 +925,74 @@ class _QuickActions extends ConsumerWidget {
|
|
|
static const _actionDefs = [
|
|
|
(
|
|
|
icon: Icons.trending_up,
|
|
|
+ iconAsset: null,
|
|
|
key: 'perpetual',
|
|
|
route: '/futures/BTCUSDT',
|
|
|
useGo: true
|
|
|
),
|
|
|
(
|
|
|
icon: Icons.people_alt_outlined,
|
|
|
+ iconAsset: null,
|
|
|
key: 'copy',
|
|
|
route: '/copy-trading',
|
|
|
useGo: true
|
|
|
),
|
|
|
(
|
|
|
icon: Icons.account_balance_wallet_outlined,
|
|
|
+ iconAsset: null,
|
|
|
key: 'recharge',
|
|
|
route: '/asset/deposit',
|
|
|
useGo: false
|
|
|
),
|
|
|
(
|
|
|
icon: Icons.card_giftcard_outlined,
|
|
|
+ iconAsset: null,
|
|
|
key: 'invite',
|
|
|
route: '/user/referral',
|
|
|
useGo: false
|
|
|
),
|
|
|
(
|
|
|
icon: Icons.business_center_outlined,
|
|
|
+ iconAsset: null,
|
|
|
key: 'broker',
|
|
|
route: '/broker',
|
|
|
useGo: false
|
|
|
),
|
|
|
- (icon: Icons.auto_graph, key: 'ido', route: '/finance/ido', useGo: false),
|
|
|
(
|
|
|
- icon: Icons.bar_chart_rounded,
|
|
|
+ icon: null,
|
|
|
+ iconAsset: 'assets/images/ico_licai.png',
|
|
|
+ key: 'ido',
|
|
|
+ route: '/finance/ido',
|
|
|
+ useGo: false
|
|
|
+ ),
|
|
|
+ (
|
|
|
+ icon: null,
|
|
|
+ iconAsset: 'assets/images/ico_dzgjs.png',
|
|
|
key: 'commodity',
|
|
|
route: '',
|
|
|
useGo: false
|
|
|
),
|
|
|
(
|
|
|
- icon: Icons.candlestick_chart,
|
|
|
+ icon: null,
|
|
|
+ iconAsset: 'assets/images/ico_gp.png',
|
|
|
key: 'stock',
|
|
|
route: '',
|
|
|
useGo: false
|
|
|
),
|
|
|
- (icon: Icons.currency_exchange, key: 'forex', route: '', useGo: false),
|
|
|
- (icon: Icons.apps_outlined, key: 'app', route: '', useGo: false),
|
|
|
+ (
|
|
|
+ icon: null,
|
|
|
+ iconAsset: 'assets/images/ico_wh.png',
|
|
|
+ key: 'forex',
|
|
|
+ route: '',
|
|
|
+ useGo: false
|
|
|
+ ),
|
|
|
+ (
|
|
|
+ icon: null,
|
|
|
+ iconAsset: 'assets/images/ico_yy.png',
|
|
|
+ key: 'app',
|
|
|
+ route: '',
|
|
|
+ useGo: false
|
|
|
+ ),
|
|
|
];
|
|
|
|
|
|
Future<void> _onBrokerTap(BuildContext context, WidgetRef ref) async {
|
|
|
@@ -1058,6 +1083,7 @@ class _QuickActions extends ConsumerWidget {
|
|
|
return _actionDefs.map((action) {
|
|
|
return _QuickActionItem(
|
|
|
icon: action.icon,
|
|
|
+ iconAsset: action.iconAsset,
|
|
|
label: labelMap[action.key]!,
|
|
|
semanticsLabel: semanticsMap[action.key]!,
|
|
|
onTap: developingKeys.contains(action.key)
|
|
|
@@ -1091,12 +1117,14 @@ class _QuickActions extends ConsumerWidget {
|
|
|
class _QuickActionItem extends StatelessWidget {
|
|
|
const _QuickActionItem({
|
|
|
required this.icon,
|
|
|
+ this.iconAsset,
|
|
|
required this.label,
|
|
|
required this.semanticsLabel,
|
|
|
required this.onTap,
|
|
|
});
|
|
|
|
|
|
- final IconData icon;
|
|
|
+ final IconData? icon;
|
|
|
+ final String? iconAsset;
|
|
|
final String label;
|
|
|
final String semanticsLabel;
|
|
|
final VoidCallback onTap;
|
|
|
@@ -1126,7 +1154,17 @@ class _QuickActionItem extends StatelessWidget {
|
|
|
: AppColors.lightBgTertiary,
|
|
|
borderRadius: BorderRadius.circular(14),
|
|
|
),
|
|
|
- child: Icon(icon, color: AppColors.brand, size: 22),
|
|
|
+ child: iconAsset != null
|
|
|
+ ? Container(
|
|
|
+ alignment:Alignment.center,
|
|
|
+ child: Image.asset(
|
|
|
+ iconAsset!,
|
|
|
+ fit: BoxFit.contain,
|
|
|
+ width:22,
|
|
|
+ height:22,
|
|
|
+ ),
|
|
|
+ )
|
|
|
+ : Icon(icon, color: AppColors.brand, size: 22),
|
|
|
),
|
|
|
const SizedBox(height: 6),
|
|
|
Text(
|