fix marker rendering & modernize riding widgets for dark mode - 2026-04-11
This commit is contained in:
@@ -8,13 +8,11 @@ import 'package:http/http.dart' as http;
|
||||
import 'package:Intaleq/constant/api_key.dart';
|
||||
import 'package:Intaleq/constant/box_name.dart';
|
||||
import 'package:Intaleq/constant/colors.dart';
|
||||
import 'package:Intaleq/constant/links.dart';
|
||||
import 'package:Intaleq/controller/profile/profile_controller.dart';
|
||||
import 'package:Intaleq/main.dart';
|
||||
import 'package:Intaleq/views/widgets/elevated_btn.dart';
|
||||
import 'package:Intaleq/views/widgets/my_textField.dart';
|
||||
import 'package:Intaleq/views/widgets/mycircular.dart';
|
||||
|
||||
import '../../../constant/style.dart';
|
||||
import '../../../controller/functions/log_out.dart';
|
||||
|
||||
// ─────────────────────────────────────────────────────────────────────────────
|
||||
@@ -134,7 +132,7 @@ class _PassengerProfilePageState extends State<PassengerProfilePage> {
|
||||
width: 40,
|
||||
height: 4,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey[300],
|
||||
color: AppColor.grayColor.withOpacity(0.3),
|
||||
borderRadius: BorderRadius.circular(2)),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
@@ -182,14 +180,14 @@ class _PassengerProfilePageState extends State<PassengerProfilePage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color(0xFFF4F6F9),
|
||||
backgroundColor: AppColor.secondaryColor.withOpacity(0.96),
|
||||
appBar: AppBar(
|
||||
title: Text('My Profile'.tr,
|
||||
style: const TextStyle(fontWeight: FontWeight.w700, fontSize: 20)),
|
||||
backgroundColor: const Color(0xFFF4F6F9),
|
||||
style: AppStyle.headTitle2.copyWith(fontSize: 20)),
|
||||
backgroundColor: AppColor.secondaryColor,
|
||||
elevation: 0,
|
||||
centerTitle: true,
|
||||
iconTheme: const IconThemeData(color: Colors.black87),
|
||||
iconTheme: IconThemeData(color: AppColor.writeColor),
|
||||
),
|
||||
body: GetBuilder<ProfileController>(
|
||||
builder: (controller) {
|
||||
@@ -373,7 +371,7 @@ class _PassengerProfilePageState extends State<PassengerProfilePage> {
|
||||
),
|
||||
child: CircleAvatar(
|
||||
radius: 52,
|
||||
backgroundColor: Colors.grey[100],
|
||||
backgroundColor: AppColor.secondaryColor,
|
||||
child: ClipOval(
|
||||
child: _isUploadingImage
|
||||
? const SizedBox(
|
||||
@@ -445,7 +443,8 @@ class _PassengerProfilePageState extends State<PassengerProfilePage> {
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.primaryColor,
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(color: Colors.white, width: 2.5),
|
||||
border:
|
||||
Border.all(color: AppColor.secondaryColor, width: 2.5),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: AppColor.primaryColor.withOpacity(0.4),
|
||||
@@ -470,10 +469,10 @@ class _PassengerProfilePageState extends State<PassengerProfilePage> {
|
||||
children: [
|
||||
Text(
|
||||
fullName.isEmpty ? 'Passenger'.tr : fullName,
|
||||
style: const TextStyle(
|
||||
fontSize: 22,
|
||||
style: TextStyle(
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.black87,
|
||||
color: AppColor.writeColor,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
@@ -497,8 +496,8 @@ class _PassengerProfilePageState extends State<PassengerProfilePage> {
|
||||
Text(
|
||||
email,
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: Colors.grey[500],
|
||||
fontSize: 14,
|
||||
color: AppColor.grayColor,
|
||||
fontWeight: FontWeight.w500),
|
||||
),
|
||||
],
|
||||
@@ -546,18 +545,18 @@ class _PassengerProfilePageState extends State<PassengerProfilePage> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 4, bottom: 10),
|
||||
padding: const EdgeInsets.only(left: 8, bottom: 12),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(sectionIcon, size: 14, color: Colors.grey[500]),
|
||||
const SizedBox(width: 6),
|
||||
Icon(sectionIcon, size: 15, color: AppColor.grayColor),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
title.toUpperCase(),
|
||||
style: TextStyle(
|
||||
fontSize: 11,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Colors.grey[500],
|
||||
letterSpacing: 1.3,
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColor.grayColor,
|
||||
letterSpacing: 1.2,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -565,11 +564,13 @@ class _PassengerProfilePageState extends State<PassengerProfilePage> {
|
||||
),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
color: AppColor.secondaryColor,
|
||||
borderRadius: BorderRadius.circular(18),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.04),
|
||||
color: Get.isDarkMode
|
||||
? Colors.black.withOpacity(0.2)
|
||||
: Colors.black.withOpacity(0.04),
|
||||
blurRadius: 12,
|
||||
offset: const Offset(0, 4),
|
||||
),
|
||||
@@ -611,30 +612,34 @@ class _PassengerProfilePageState extends State<PassengerProfilePage> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(title,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 14.5,
|
||||
color: Colors.black87)),
|
||||
fontSize: 16,
|
||||
color: AppColor.writeColor)),
|
||||
if (subtitle.isNotEmpty) ...[
|
||||
const SizedBox(height: 3),
|
||||
const SizedBox(height: 4),
|
||||
Text(subtitle,
|
||||
style:
|
||||
TextStyle(color: Colors.grey[500], fontSize: 12.5)),
|
||||
TextStyle(color: AppColor.grayColor, fontSize: 13)),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
trailing ??
|
||||
Icon(Icons.arrow_forward_ios_rounded,
|
||||
size: 13, color: Colors.grey[350]),
|
||||
size: 14, color: AppColor.grayColor.withOpacity(0.5)),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _divider() =>
|
||||
Divider(height: 1, thickness: 1, indent: 72, color: Colors.grey[100]);
|
||||
Widget _divider() => Divider(
|
||||
height: 1,
|
||||
thickness: 1,
|
||||
indent: 72,
|
||||
endIndent: 16,
|
||||
color: AppColor.grayColor.withOpacity(0.1));
|
||||
|
||||
// ─── Bottom Sheets ───────────────────────────────────────────────────────────
|
||||
|
||||
@@ -808,7 +813,8 @@ class _PassengerProfilePageState extends State<PassengerProfilePage> {
|
||||
Expanded(
|
||||
child: Text(
|
||||
'This action is permanent and cannot be undone.'.tr,
|
||||
style: TextStyle(color: Colors.red[700], fontSize: 13),
|
||||
style: TextStyle(
|
||||
color: Colors.red.withOpacity(0.8), fontSize: 13),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -838,7 +844,7 @@ class _PassengerProfilePageState extends State<PassengerProfilePage> {
|
||||
side: BorderSide(color: Colors.grey[300]!),
|
||||
),
|
||||
child: Text('Cancel'.tr,
|
||||
style: TextStyle(color: Colors.grey[600])),
|
||||
style: TextStyle(color: AppColor.grayColor)),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
@@ -895,27 +901,29 @@ class _PassengerProfilePageState extends State<PassengerProfilePage> {
|
||||
return TextField(
|
||||
controller: controller,
|
||||
keyboardType: type,
|
||||
style: const TextStyle(fontSize: 15, color: Colors.black87),
|
||||
style: TextStyle(fontSize: 16, color: AppColor.writeColor),
|
||||
decoration: InputDecoration(
|
||||
labelText: label,
|
||||
hintText: hint,
|
||||
hintStyle: TextStyle(color: Colors.grey[400], fontSize: 13),
|
||||
prefixIcon: Icon(icon, size: 20, color: Colors.grey[500]),
|
||||
hintStyle:
|
||||
TextStyle(color: AppColor.grayColor.withOpacity(0.5), fontSize: 14),
|
||||
prefixIcon: Icon(icon, size: 20, color: AppColor.grayColor),
|
||||
filled: true,
|
||||
fillColor: const Color(0xFFF8F9FA),
|
||||
fillColor: AppColor.secondaryColor,
|
||||
contentPadding:
|
||||
const EdgeInsets.symmetric(horizontal: 16, vertical: 15),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(13),
|
||||
borderSide: BorderSide(color: Colors.grey[200]!)),
|
||||
borderSide:
|
||||
BorderSide(color: AppColor.grayColor.withOpacity(0.15))),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(13),
|
||||
borderSide: BorderSide(color: Colors.grey[200]!)),
|
||||
borderSide:
|
||||
BorderSide(color: AppColor.grayColor.withOpacity(0.15))),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(13),
|
||||
borderSide:
|
||||
const BorderSide(color: AppColor.primaryColor, width: 1.5)),
|
||||
labelStyle: TextStyle(color: Colors.grey[500], fontSize: 13),
|
||||
borderSide: BorderSide(color: AppColor.primaryColor, width: 1.5)),
|
||||
labelStyle: TextStyle(color: AppColor.grayColor, fontSize: 14),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -971,7 +979,8 @@ class _PassengerProfilePageState extends State<PassengerProfilePage> {
|
||||
title: Text(label,
|
||||
style: TextStyle(
|
||||
fontWeight: isSelected ? FontWeight.w600 : FontWeight.normal,
|
||||
color: isSelected ? AppColor.primaryColor : Colors.black87)),
|
||||
fontSize: 16,
|
||||
color: isSelected ? AppColor.primaryColor : AppColor.writeColor)),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1001,9 +1010,9 @@ class _SheetWrapper extends StatelessWidget {
|
||||
24,
|
||||
MediaQuery.of(context).viewInsets.bottom + 28,
|
||||
),
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(26)),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.secondaryColor,
|
||||
borderRadius: const BorderRadius.vertical(top: Radius.circular(26)),
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
physics: const BouncingScrollPhysics(),
|
||||
@@ -1018,7 +1027,7 @@ class _SheetWrapper extends StatelessWidget {
|
||||
height: 4,
|
||||
margin: const EdgeInsets.only(bottom: 20),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey[250],
|
||||
color: AppColor.grayColor.withOpacity(0.3),
|
||||
borderRadius: BorderRadius.circular(2),
|
||||
),
|
||||
),
|
||||
@@ -1038,10 +1047,10 @@ class _SheetWrapper extends StatelessWidget {
|
||||
const SizedBox(width: 12),
|
||||
Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.black87,
|
||||
color: AppColor.writeColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user