add more config

pull/1/head
fuwa 5 years ago
parent 8b3587f44d
commit 991f3dc186

@ -28,6 +28,8 @@ final config = CryptoConfig
'wownerod', 'wownerod',
'wownerod', 'wownerod',
'Follow the white rabbit.', 'Follow the white rabbit.',
Colors.green.withOpacity(1.0), 70,
Colors.black, Colors.green.withOpacity(1.0),
Colors.black,
[],
); );

@ -25,14 +25,18 @@ class CryptoConfig {
final String outputBin; final String outputBin;
final String appPath; final String appPath;
final String splash; final String splash;
final int splashDelay;
final Color textColor; final Color textColor;
final Color backgroundColor; final Color backgroundColor;
final List<String> extraArgs;
CryptoConfig CryptoConfig
( (
this.outputBin, this.outputBin,
this.appPath, this.appPath,
this.splash, this.splash,
this.splashDelay,
this.textColor, this.textColor,
this.backgroundColor, this.backgroundColor,
this.extraArgs,
); );
} }

@ -56,7 +56,7 @@ Stream<String> runBinary (String name) async* {
"--data-dir", "--data-dir",
binDir.path, binDir.path,
"--non-interactive", "--non-interactive",
] + extraArgs; ] + extraArgs + config.extraArgs;
print('args: ' + args.toString()); print('args: ' + args.toString());

@ -92,7 +92,7 @@ class LoadingState extends HookedState {
for (String char in chars) { for (String char in chars) {
append(char); 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"); await Future.delayed(const Duration(seconds: 2), () => "1");