Files
intaleq_driver/lib/controller/firebase/bring_app_foreground.dart
Hamza-Ayed 83a97baed1 25-7-28-2
2025-07-28 12:21:28 +03:00

19 lines
598 B
Dart
Executable File

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class AppLifecycleManager {
static const platform = MethodChannel('com.sefer_driver/app_lifecycle');
static Future<void> bringAppToForeground() async {
try {
debugPrint('Attempting to bring app to foreground');
await platform.invokeMethod('bringAppToForeground');
debugPrint('Method invocation completed');
} on PlatformException catch (e) {
debugPrint("Failed to bring app to foreground: '${e.message}'.");
} catch (e) {
debugPrint("Unexpected error: $e");
}
}
}