flutter(rider): rebuild lib on Cubit/Bloc + Tripz backend (core + auth slice)

- keep store identity (com.mobileapp.store.ride, shorebird, firebase, fonts); old lib -> lib_old_getx
- core: config/di/router(go_router)/theme/api_client(dio+tenant+bearer)/token_store(secure)
- auth: repo + AuthCubit + OTP phone/otp screens; home: flutter_map (OSM placeholder, انطلق TODO)
- android usesCleartextTraffic=true for http API; maps=flutter_map (no Google), state=Cubit

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-16 20:47:55 +03:00
co-authored by Claude Opus 4.8
parent 6234e66471
commit 6116d23d0c
203 changed files with 573 additions and 83094 deletions
@@ -1,108 +0,0 @@
import 'dart:math';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_font_icons/flutter_font_icons.dart';
import 'package:get/get.dart';
import '../../../constant/colors.dart';
import '../functions/launch.dart';
class ContactUsController extends GetxController {
/// WORKING HOURS (10:00 → 16:00)
final TimeOfDay workStartTime = const TimeOfDay(hour: 10, minute: 0);
final TimeOfDay workEndTime = const TimeOfDay(hour: 16, minute: 0);
bool _isWithinWorkTime(TimeOfDay now) {
return (now.hour > workStartTime.hour ||
(now.hour == workStartTime.hour &&
now.minute >= workStartTime.minute)) &&
(now.hour < workEndTime.hour ||
(now.hour == workEndTime.hour && now.minute <= workEndTime.minute));
}
/// PHONE LIST (USED FOR CALLS + WHATSAPP)
final List<String> phoneNumbers = [
'+963952475734',
'+963952475740',
'+963952475742'
];
/// RANDOM PHONE SELECTOR
String getRandomPhone() {
final random = Random();
return phoneNumbers[random.nextInt(phoneNumbers.length)];
}
/// SHOW DIALOG
void showContactDialog(BuildContext context) {
TimeOfDay now = TimeOfDay.now();
bool withinHours = _isWithinWorkTime(now);
showCupertinoModalPopup(
context: context,
builder: (context) => CupertinoActionSheet(
title: Text('Contact Us'.tr),
message: Text('Choose a contact option'.tr),
actions: <Widget>[
/// 📞 CALL (RANDOM) — ONLY DURING WORK HOURS
if (withinHours)
CupertinoActionSheetAction(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Icon(CupertinoIcons.phone),
Text('Call Support'.tr),
],
),
onPressed: () {
final phone = getRandomPhone();
makePhoneCall(phone);
},
),
/// ⛔ OUTSIDE WORK HOURS — SHOW INFO
if (!withinHours)
CupertinoActionSheetAction(
child: Text(
'Work time is from 10:00 AM to 16:00 PM.\nYou can send a WhatsApp message or email.'
.tr,
textAlign: TextAlign.center,
),
onPressed: () => Navigator.pop(context),
),
/// 💬 WHATSAPP (RANDOM)
CupertinoActionSheetAction(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
const Icon(
FontAwesome.whatsapp,
color: AppColor.greenColor,
),
Text('Send WhatsApp Message'.tr),
],
),
onPressed: () {
final phone = getRandomPhone();
launchCommunication('whatsapp', phone, 'Hello'.tr);
},
),
/// 📧 EMAIL
CupertinoActionSheetAction(
child: Text('Send Email'.tr),
onPressed: () => launchCommunication(
'email', 'support@intaleqapp.com', 'Hello'.tr),
),
],
/// ❌ CANCEL BUTTON
cancelButton: CupertinoActionSheetAction(
child: Text('Cancel'.tr),
onPressed: () => Navigator.pop(context),
),
),
);
}
}