update initialize
This commit is contained in:
parent
794f62ea72
commit
00289ddbde
2 changed files with 5 additions and 4 deletions
|
|
@ -6,9 +6,10 @@ import 'package:dart_framework/utils/system_util.dart' as system;
|
|||
class Application {
|
||||
late Function(Object, StackTrace) writeLog;
|
||||
|
||||
Application(String name, String appID, Function() func, Function(Object, StackTrace) errorListener) {
|
||||
runZonedGuarded(() async {
|
||||
await system.initialize(name, appID);
|
||||
Application(String name, String appID, Function() func,
|
||||
Function(Object, StackTrace) errorListener) {
|
||||
runZonedGuarded(() {
|
||||
system.initialize(name, appID);
|
||||
writeLog = (error, stack) => logError('$error:\n$stack');
|
||||
func();
|
||||
}, (error, stack) {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ String appIdendifier = '';
|
|||
String appName = '';
|
||||
String and = '&&';
|
||||
|
||||
Future initialize(String name, String appID) async {
|
||||
void initialize(String name, String appID) {
|
||||
appIdendifier = appID;
|
||||
appName = name;
|
||||
scriptPath = Platform.script.toFilePath(windows: Platform.isWindows);
|
||||
|
|
|
|||
Loading…
Reference in a new issue