fix marker rendering & modernize riding widgets for dark mode - 2026-04-11
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../constant/colors.dart';
|
||||
import '../../../constant/style.dart';
|
||||
import '../../../controller/home/profile/invit_controller.dart';
|
||||
import '../../../print.dart';
|
||||
|
||||
@@ -12,16 +13,16 @@ class ShareAppPage extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: CupertinoColors.systemBackground,
|
||||
backgroundColor: AppColor.secondaryColor,
|
||||
appBar: AppBar(
|
||||
backgroundColor: CupertinoColors.systemBackground,
|
||||
backgroundColor: AppColor.secondaryColor,
|
||||
elevation: 0,
|
||||
title: Text(
|
||||
'Invite'.tr,
|
||||
style: const TextStyle(color: CupertinoColors.label),
|
||||
style: AppStyle.headTitle2.copyWith(fontSize: 20),
|
||||
),
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios, color: AppColor.blueColor),
|
||||
icon: Icon(Icons.arrow_back_ios, color: AppColor.cyanBlue),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
),
|
||||
@@ -51,7 +52,7 @@ class ShareAppPage extends StatelessWidget {
|
||||
Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: CupertinoColors.systemGrey6,
|
||||
color: AppColor.grayColor.withOpacity(0.08),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: Column(
|
||||
@@ -60,8 +61,8 @@ class ShareAppPage extends StatelessWidget {
|
||||
"Share this code with your friends and earn rewards when they use it!"
|
||||
.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
color: CupertinoColors.secondaryLabel,
|
||||
style: TextStyle(
|
||||
color: AppColor.grayColor,
|
||||
fontSize: 13,
|
||||
),
|
||||
),
|
||||
@@ -116,8 +117,9 @@ class ShareAppPage extends StatelessWidget {
|
||||
Widget _buildPhoneInput() {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: CupertinoColors.systemGrey6,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
color: AppColor.grayColor.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: AppColor.grayColor.withOpacity(0.1)),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
@@ -125,13 +127,16 @@ class ShareAppPage extends StatelessWidget {
|
||||
child: CupertinoTextField.borderless(
|
||||
controller: controller.invitePhoneController,
|
||||
placeholder: 'Enter phone'.tr,
|
||||
padding: const EdgeInsets.all(12),
|
||||
placeholderStyle: TextStyle(
|
||||
color: AppColor.grayColor.withOpacity(0.5), fontSize: 16),
|
||||
style: TextStyle(color: AppColor.writeColor, fontSize: 16),
|
||||
padding: const EdgeInsets.all(14),
|
||||
keyboardType: TextInputType.phone,
|
||||
),
|
||||
),
|
||||
CupertinoButton(
|
||||
child: const Icon(CupertinoIcons.person_badge_plus,
|
||||
color: AppColor.blueColor),
|
||||
child: Icon(CupertinoIcons.person_badge_plus,
|
||||
color: AppColor.cyanBlue),
|
||||
onPressed: () async {
|
||||
await controller.pickContacts();
|
||||
Log.print('contacts: ${controller.contacts}');
|
||||
@@ -169,16 +174,16 @@ class ShareAppPage extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
child: CupertinoButton(
|
||||
color: AppColor.blueColor,
|
||||
color: AppColor.primaryColor,
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
padding: const EdgeInsets.symmetric(vertical: 14),
|
||||
onPressed: controller.sendInviteToPassenger,
|
||||
child: Text(
|
||||
'Send Invite'.tr,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: CupertinoColors.white,
|
||||
color: AppColor.secondaryColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -198,15 +203,15 @@ class ShareAppPage extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
child: CupertinoButton(
|
||||
color: AppColor.blueColor,
|
||||
color: AppColor.cyanBlue,
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
padding: const EdgeInsets.symmetric(vertical: 14),
|
||||
child: Text(
|
||||
'Show Invitations'.tr,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: CupertinoColors.white,
|
||||
color: AppColor.secondaryColor,
|
||||
),
|
||||
),
|
||||
onPressed: () async {
|
||||
@@ -227,8 +232,8 @@ class ShareAppPage extends StatelessWidget {
|
||||
? Center(
|
||||
child: Text(
|
||||
"No invitation found yet!".tr,
|
||||
style: const TextStyle(
|
||||
color: CupertinoColors.secondaryLabel,
|
||||
style: TextStyle(
|
||||
color: AppColor.grayColor,
|
||||
fontSize: 17,
|
||||
),
|
||||
),
|
||||
@@ -258,8 +263,9 @@ class ShareAppPage extends StatelessWidget {
|
||||
margin: const EdgeInsets.symmetric(vertical: 8.0),
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: CupertinoColors.systemGrey6,
|
||||
color: AppColor.grayColor.withOpacity(0.08),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: AppColor.grayColor.withOpacity(0.05)),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -267,10 +273,10 @@ class ShareAppPage extends StatelessWidget {
|
||||
Text(
|
||||
invitation['passengerName']
|
||||
.toString(), // Handle null or missing data
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 17,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: CupertinoColors.label,
|
||||
color: AppColor.writeColor,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
@@ -278,18 +284,18 @@ class ShareAppPage extends StatelessWidget {
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
child: LinearProgressIndicator(
|
||||
value: progressValue,
|
||||
backgroundColor: CupertinoColors.systemGrey4,
|
||||
backgroundColor: AppColor.grayColor.withOpacity(0.1),
|
||||
valueColor:
|
||||
const AlwaysStoppedAnimation<Color>(AppColor.blueColor),
|
||||
AlwaysStoppedAnimation<Color>(AppColor.primaryColor),
|
||||
minHeight: 6,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
'$countOfInvitDriver / 2 ${'Trip'.tr}', // Show trips completed
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: CupertinoColors.secondaryLabel,
|
||||
color: AppColor.grayColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -302,18 +308,19 @@ class ShareAppPage extends StatelessWidget {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: CupertinoColors.systemGrey6,
|
||||
color: AppColor.grayColor.withOpacity(0.08),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: AppColor.grayColor.withOpacity(0.05)),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Your Rewards".tr,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 17,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: CupertinoColors.label,
|
||||
color: AppColor.writeColor,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
@@ -342,8 +349,8 @@ class ShareAppPage extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
label,
|
||||
style: const TextStyle(
|
||||
color: CupertinoColors.label,
|
||||
style: TextStyle(
|
||||
color: AppColor.writeColor,
|
||||
fontSize: 15,
|
||||
),
|
||||
),
|
||||
@@ -362,7 +369,9 @@ class ShareAppPage extends StatelessWidget {
|
||||
|
||||
void _showContactsDialog(BuildContext context) {
|
||||
Get.defaultDialog(
|
||||
backgroundColor: AppColor.secondaryColor,
|
||||
title: 'Choose from contact'.tr,
|
||||
titleStyle: TextStyle(color: AppColor.writeColor),
|
||||
content: SizedBox(
|
||||
height: 400,
|
||||
width: 400,
|
||||
@@ -409,10 +418,10 @@ class ShareAppPage extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 16, vertical: 12),
|
||||
decoration: BoxDecoration(
|
||||
color: CupertinoColors.systemBackground,
|
||||
color: AppColor.secondaryColor,
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: CupertinoColors.separator.withOpacity(0.5),
|
||||
color: AppColor.grayColor.withOpacity(0.1),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -425,16 +434,16 @@ class ShareAppPage extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
contact['name'],
|
||||
style: const TextStyle(
|
||||
color: CupertinoColors.label,
|
||||
style: TextStyle(
|
||||
color: AppColor.writeColor,
|
||||
fontSize: 17,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
(contact['phones'][0].toString()),
|
||||
style: const TextStyle(
|
||||
color: CupertinoColors.secondaryLabel,
|
||||
style: TextStyle(
|
||||
color: AppColor.grayColor,
|
||||
fontSize: 15,
|
||||
),
|
||||
),
|
||||
@@ -442,9 +451,9 @@ class ShareAppPage extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
// Chevron icon for selection
|
||||
const Icon(
|
||||
Icon(
|
||||
CupertinoIcons.chevron_forward,
|
||||
color: CupertinoColors.systemGrey2,
|
||||
color: AppColor.grayColor.withOpacity(0.5),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user