refactor: إعادة تسمية التطبيقات الأربعة siro_* → intaleq_*
المجلدات وأسماء حزم dart واستيراداتها: siro_rider → intaleq_rider siro_driver → intaleq_driver siro_admin → intaleq_admin siro_service → intaleq_service شمل ذلك `name:` في كل pubspec وكل `package:siro_*` في الاستيرادات (115 ملفاً في rider وحده)، وإشارات أسماء المجلدات في docs/ وتعليق في backend/Admin/notifications/broadcast.php. لم تبقَ إشارة واحدة (تحقّقت). + ضُمّت حزم get و get_storage داخل intaleq_driver/packages/ وحُوّلت مساراتها الثلاثة من `../../Intaleq/packages/*` إلى `./packages/*`. كانت تُحل عرضاً إلى مجلد App/Intaleq القديم المجاور — تبعية خارج المستودع تنكسر بأول نقل. لم يبقَ في أي تطبيق تبعية مسار خارج الشجرة. ⚠️ لم تُمسّ بعد: هويات المتاجر (applicationId · PRODUCT_BUNDLE_IDENTIFIER · shorebird app_id) ولا الألوان ولا النصوص المرئية ولا النطاقات — كل منها كوميت منفصل، والهويات تحتاج قرار المالك. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
92dc6b3641
commit
0aab85c732
@@ -0,0 +1,90 @@
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
class CarPlatformBridge {
|
||||
CarPlatformBridge._();
|
||||
|
||||
static const _channel = MethodChannel('com.siro.intaleq_driver/car_navigation');
|
||||
|
||||
static bool _isInitialized = false;
|
||||
|
||||
static void ensureInitialized() {
|
||||
if (_isInitialized) return;
|
||||
_channel.setMethodCallHandler(_handleMethodCall);
|
||||
_isInitialized = true;
|
||||
}
|
||||
|
||||
static Future<dynamic> _handleMethodCall(MethodCall call) async {
|
||||
switch (call.method) {
|
||||
case 'isCarAppConnected':
|
||||
return false;
|
||||
default:
|
||||
throw MissingPluginException();
|
||||
}
|
||||
}
|
||||
|
||||
static Future<void> updateNavState({
|
||||
required double lat,
|
||||
required double lng,
|
||||
required double bearing,
|
||||
required double speed,
|
||||
required String instruction,
|
||||
required double distanceToStep,
|
||||
required double totalDistance,
|
||||
required double eta,
|
||||
required int maneuver,
|
||||
required bool isNavigating,
|
||||
bool isMapDarkMode = false,
|
||||
}) async {
|
||||
try {
|
||||
await _channel.invokeMethod('updateNavState', {
|
||||
'lat': lat,
|
||||
'lng': lng,
|
||||
'bearing': bearing,
|
||||
'speed': speed,
|
||||
'instruction': instruction,
|
||||
'distanceToStep': distanceToStep,
|
||||
'totalDistance': totalDistance,
|
||||
'eta': eta,
|
||||
'maneuver': maneuver,
|
||||
'isNavigating': isNavigating,
|
||||
'isMapDarkMode': isMapDarkMode,
|
||||
});
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
static Future<void> updateLocation({
|
||||
required double lat,
|
||||
required double lng,
|
||||
required double bearing,
|
||||
required double speed,
|
||||
}) async {
|
||||
try {
|
||||
await _channel.invokeMethod('updateLocation', {
|
||||
'lat': lat,
|
||||
'lng': lng,
|
||||
'bearing': bearing,
|
||||
'speed': speed,
|
||||
});
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
static Future<void> updateInstruction({
|
||||
required String instruction,
|
||||
required int maneuver,
|
||||
required double distanceToStep,
|
||||
}) async {
|
||||
try {
|
||||
await _channel.invokeMethod('updateInstruction', {
|
||||
'instruction': instruction,
|
||||
'maneuver': maneuver,
|
||||
'distanceToStep': distanceToStep,
|
||||
});
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
static Future<void> stopNavigation() async {
|
||||
try {
|
||||
await _channel.invokeMethod('stopNavigation');
|
||||
} catch (_) {}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user