feat: refactor financial wallet UI components and add offline map service support
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:sefer_driver/views/home/Captin/home_captain/home_captin.dart';
|
||||
|
||||
import '../../constant/finance_design_system.dart';
|
||||
import '../../controller/local/local_controller.dart';
|
||||
|
||||
class Language extends StatelessWidget {
|
||||
@@ -32,33 +33,9 @@ class Language extends StatelessWidget {
|
||||
physics: const BouncingScrollPhysics(),
|
||||
children: [
|
||||
_buildLanguageButton(
|
||||
'العربية', 'ar', controller, context, '🇪🇬'),
|
||||
_buildLanguageButton('العربية (الخليج)', 'ar-gulf',
|
||||
controller, context, '🇸🇦'),
|
||||
_buildLanguageButton('العربية (المغرب)', 'ar-ma',
|
||||
controller, context, '🇲🇦'),
|
||||
'العربية', 'ar', controller, context, 'AR'),
|
||||
_buildLanguageButton(
|
||||
'English', 'en', controller, context, '🇺🇸'),
|
||||
_buildLanguageButton(
|
||||
'Türkçe', 'tr', controller, context, '🇹🇷'),
|
||||
_buildLanguageButton(
|
||||
'Français', 'fr', controller, context, '🇫🇷'),
|
||||
_buildLanguageButton(
|
||||
'Italiano', 'it', controller, context, '🇮🇹'),
|
||||
_buildLanguageButton(
|
||||
'Deutsch', 'de', controller, context, '🇩🇪'),
|
||||
_buildLanguageButton(
|
||||
'Ελληνικά', 'el', controller, context, '🇬🇷'),
|
||||
_buildLanguageButton(
|
||||
'Español', 'es', controller, context, '🇪🇸'),
|
||||
_buildLanguageButton(
|
||||
'فارسی', 'fa', controller, context, '🇮🇷'),
|
||||
_buildLanguageButton(
|
||||
'中文', 'zh', controller, context, '🇨🇳'),
|
||||
_buildLanguageButton(
|
||||
'Русский', 'ru', controller, context, '🇷🇺'),
|
||||
_buildLanguageButton(
|
||||
'हिन्दी', 'hi', controller, context, '🇮🇳'),
|
||||
'English', 'en', controller, context, 'EN'),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -104,25 +81,43 @@ class Language extends StatelessWidget {
|
||||
Widget _buildLanguageButton(String title, String langCode,
|
||||
LocaleController controller, BuildContext context, String flagIcon) {
|
||||
return Container(
|
||||
margin: const EdgeInsets.only(bottom: 12),
|
||||
decoration: BoxDecoration(
|
||||
color: CupertinoColors.white,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: CupertinoColors.systemGrey5.withOpacity(0.5),
|
||||
color: Colors.black.withOpacity(0.03),
|
||||
spreadRadius: 1,
|
||||
blurRadius: 3,
|
||||
offset: const Offset(0, 2),
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 4),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: ListTile(
|
||||
leading: Text(flagIcon,
|
||||
style: const TextStyle(fontSize: 28)), // Using flag icon as leading
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 4),
|
||||
leading: Container(
|
||||
width: 44,
|
||||
height: 44,
|
||||
decoration: BoxDecoration(
|
||||
color: FinanceDesignSystem.primaryDark.withOpacity(0.05),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
flagIcon,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: FinanceDesignSystem.primaryDark,
|
||||
),
|
||||
),
|
||||
),
|
||||
title: Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
trailing: const Icon(CupertinoIcons.chevron_forward,
|
||||
|
||||
Reference in New Issue
Block a user