restartApp method
Restart the app to apply installed patch
This will exit the app. On most platforms, the app will restart automatically.
Implementation
Future<void> restartApp() async {
try {
await CodePushMethodChannel.restartApp();
} catch (e) {
_config.onError?.call('Error restarting app: $e');
// Fallback: exit app (user must manually restart)
exit(0);
}
}