2026-03-3-1
This commit is contained in:
@@ -134,7 +134,7 @@ class TestPage extends StatelessWidget {
|
||||
// زر البدء
|
||||
ElevatedButton(
|
||||
onPressed: () async {
|
||||
debugPrint("🍎 محاولة تشغيل Live Activity (Start)...");
|
||||
print("🍎 محاولة تشغيل Live Activity (Start)...");
|
||||
try {
|
||||
await IosLiveActivityService.startRideActivity(
|
||||
rideId: "123",
|
||||
@@ -143,10 +143,10 @@ class TestPage extends StatelessWidget {
|
||||
etaText: "5 دقائق",
|
||||
progress: 0.2,
|
||||
);
|
||||
debugPrint(
|
||||
Log.print(
|
||||
"✅ تم تشغيل Live Activity بنجاح! أغلق الشاشة لترى النتيجة.");
|
||||
} catch (e) {
|
||||
debugPrint("❌ خطأ في Start Live Activity: $e");
|
||||
Log.print("❌ خطأ في Start Live Activity: $e");
|
||||
}
|
||||
},
|
||||
child: const Text('Start Activity'),
|
||||
@@ -157,7 +157,7 @@ class TestPage extends StatelessWidget {
|
||||
// زر التحديث العشوائي
|
||||
ElevatedButton(
|
||||
onPressed: () async {
|
||||
debugPrint("🔄 محاولة تحديث Live Activity (Update)...");
|
||||
Log.print("🔄 محاولة تحديث Live Activity (Update)...");
|
||||
|
||||
// توليد بيانات عشوائية للاختبار
|
||||
final statuses = ['waiting', 'ongoing'];
|
||||
@@ -178,10 +178,10 @@ class TestPage extends StatelessWidget {
|
||||
etaText: eta,
|
||||
progress: progress,
|
||||
);
|
||||
debugPrint(
|
||||
Log.print(
|
||||
"✅ تم تحديث Live Activity: status=$status, eta=$eta, progress=$progress");
|
||||
} catch (e) {
|
||||
debugPrint("❌ خطأ في Update Live Activity: $e");
|
||||
Log.print("❌ خطأ في Update Live Activity: $e");
|
||||
}
|
||||
},
|
||||
child: const Text('Update (Random)'),
|
||||
@@ -195,12 +195,12 @@ class TestPage extends StatelessWidget {
|
||||
backgroundColor: Colors.red,
|
||||
),
|
||||
onPressed: () async {
|
||||
debugPrint("🛑 محاولة إنهاء Live Activity (End)...");
|
||||
Log.print("🛑 محاولة إنهاء Live Activity (End)...");
|
||||
try {
|
||||
await IosLiveActivityService.endRideActivity();
|
||||
debugPrint("✅ تم إنهاء Live Activity.");
|
||||
Log.print("✅ تم إنهاء Live Activity.");
|
||||
} catch (e) {
|
||||
debugPrint("❌ خطأ في End Live Activity: $e");
|
||||
Log.print("❌ خطأ في End Live Activity: $e");
|
||||
}
|
||||
},
|
||||
child: const Text('End Activity'),
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user