Commit 53c07045 authored by Devon Carew's avatar Devon Carew

create a service extension to terminate an app (#3634)

parent 7c017898
......@@ -5,6 +5,7 @@
import 'dart:async';
import 'dart:convert' show JSON;
import 'dart:developer' as developer;
import 'dart:io' show exit;
import 'package:meta/meta.dart';
......@@ -100,6 +101,10 @@ abstract class BindingBase {
name: 'reassemble',
callback: reassembleApplication
);
registerSignalServiceExtension(
name: 'exit',
callback: _exitApplication
);
assert(() { _debugServiceExtensionsRegistered = true; return true; });
}
......@@ -247,3 +252,8 @@ abstract class BindingBase {
@override
String toString() => '<$runtimeType>';
}
/// Terminate the Flutter application.
void _exitApplication() {
exit(0);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment