From 991f3dc18657da11e49338f185a17e45d21f44be Mon Sep 17 00:00:00 2001 From: fuwa Date: Sat, 22 Jun 2019 11:53:44 +0800 Subject: [PATCH] add more config --- cyberwow/lib/config/cyberwow.dart | 6 ++++-- cyberwow/lib/config/prototype.dart | 4 ++++ cyberwow/lib/controller/running.dart | 2 +- cyberwow/lib/state.dart | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/cyberwow/lib/config/cyberwow.dart b/cyberwow/lib/config/cyberwow.dart index e6d9fd2..1021351 100644 --- a/cyberwow/lib/config/cyberwow.dart +++ b/cyberwow/lib/config/cyberwow.dart @@ -28,6 +28,8 @@ final config = CryptoConfig 'wownerod', 'wownerod', 'Follow the white rabbit.', - Colors.green.withOpacity(1.0), - Colors.black, + 70, + Colors.green.withOpacity(1.0), + Colors.black, + [], ); diff --git a/cyberwow/lib/config/prototype.dart b/cyberwow/lib/config/prototype.dart index bdcd72b..00eef87 100644 --- a/cyberwow/lib/config/prototype.dart +++ b/cyberwow/lib/config/prototype.dart @@ -25,14 +25,18 @@ class CryptoConfig { final String outputBin; final String appPath; final String splash; + final int splashDelay; final Color textColor; final Color backgroundColor; + final List extraArgs; CryptoConfig ( this.outputBin, this.appPath, this.splash, + this.splashDelay, this.textColor, this.backgroundColor, + this.extraArgs, ); } diff --git a/cyberwow/lib/controller/running.dart b/cyberwow/lib/controller/running.dart index 8857eeb..dca2111 100644 --- a/cyberwow/lib/controller/running.dart +++ b/cyberwow/lib/controller/running.dart @@ -56,7 +56,7 @@ Stream runBinary (String name) async* { "--data-dir", binDir.path, "--non-interactive", - ] + extraArgs; + ] + extraArgs + config.extraArgs; print('args: ' + args.toString()); diff --git a/cyberwow/lib/state.dart b/cyberwow/lib/state.dart index 02dbf55..7a68132 100644 --- a/cyberwow/lib/state.dart +++ b/cyberwow/lib/state.dart @@ -92,7 +92,7 @@ class LoadingState extends HookedState { for (String char in chars) { append(char); - await Future.delayed(const Duration(milliseconds: 70), () => "1"); + await Future.delayed(Duration(milliseconds: config.splashDelay), () => "1"); } await Future.delayed(const Duration(seconds: 2), () => "1");