diff --git a/lib/main.dart b/lib/main.dart index 33be5d1..554b4a8 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -54,85 +54,82 @@ class IWannaKnowOWO extends HookWidget { @override build(context) { return Scaffold( - body: WindowBorder( - color: Colors.white, - child: Form( - key: formKey, - child: n.Row([ - n.Image.asset("assets/mutsuki.jpg") - ..wFull - ..maxWidth = 320 - ..ml = 32, - n.Column([ - "w-would you let me see your card details p-please?".h6..mb = 8, - n.TextFormField.label("pass me your card number o-onegai~") - ..outlined - ..hintText = 'XXXX XXXX XXXX XXXX' - ..maxLength = 19 - ..counterText = "" - ..inputFormatters = [ - FilteringTextInputFormatter.digitsOnly, - CardNumberFormatter(), - ] - ..validator = (value) => - value == null || value.isEmpty || value.length != 19 - ? 'card number onegai TwT' - : null, - n.TextFormField.label("when does it expire owo") - ..outlined - ..hintText = 'XX/XX' - ..suffix = "MM/YY".n - ..maxLength = 5 - ..counterText = "" - ..inputFormatters = [ - FilteringTextInputFormatter.digitsOnly, - MonthYearFormatter(), - ] - ..validator = (value) => - value == null || value.isEmpty || value.length != 5 - ? 'read out the date for me onegai~' - : null, - n.TextFormField.label( - "those three numbers on the back...\nwhat do they say? i can't read it :(") - ..outlined - ..maxLength = 3 - ..counterText = "" - ..suffix = "CVC".n - ..validator = (value) => - value == null || value.isEmpty || value.length != 3 - ? 'I can\'t see number sensei... uoh' - : null, - n.Button.outlined("arigatou sensei!".n) - ..onPressed = () async { - if (formKey.currentState!.validate()) { - final page = await Future.microtask( - () => const ArigatouSensei(), - ); - - // ignore: use_build_context_synchronously - Navigator.of(context).push( - MaterialPageRoute( - builder: (context) => page, - ), - ); - } + body: Form( + key: formKey, + child: n.Row([ + n.Image.asset("assets/mutsuki.jpg") + ..wFull + ..maxWidth = 320 + ..ml = 32, + n.Column([ + "w-would you let me see your card details p-please?".h6..mb = 8, + n.TextFormField.label("pass me your card number o-onegai~") + ..outlined + ..hintText = 'XXXX XXXX XXXX XXXX' + ..maxLength = 19 + ..counterText = "" + ..inputFormatters = [ + FilteringTextInputFormatter.digitsOnly, + CardNumberFormatter(), + ] + ..validator = (value) => + value == null || value.isEmpty || value.length != 19 + ? 'card number onegai TwT' + : null, + n.TextFormField.label("when does it expire owo") + ..outlined + ..hintText = 'XX/XX' + ..suffix = "MM/YY".n + ..maxLength = 5 + ..counterText = "" + ..inputFormatters = [ + FilteringTextInputFormatter.digitsOnly, + MonthYearFormatter(), + ] + ..validator = (value) => + value == null || value.isEmpty || value.length != 5 + ? 'read out the date for me onegai~' + : null, + n.TextFormField.label( + "those three numbers on the back...\nwhat do they say? i can't read it :(") + ..outlined + ..maxLength = 3 + ..counterText = "" + ..suffix = "CVC".n + ..validator = (value) => + value == null || value.isEmpty || value.length != 3 + ? 'I can\'t see number sensei... uoh' + : null, + n.Button.outlined("arigatou sensei!".n) + ..onPressed = () async { + if (formKey.currentState!.validate()) { + final page = await Future.microtask( + () => const ArigatouSensei(), + ); + + // ignore: use_build_context_synchronously + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => page, + ), + ); } - ..border = BorderSide(color: Colors.blue.shade500) - ..py = 20 - ..wFull - ]) - ..gap = 16 - ..mr = 32 + } + ..border = BorderSide(color: Colors.blue.shade500) ..py = 20 - ..center - ..scrollable - ..expanded + ..wFull ]) + ..gap = 16 + ..mr = 32 + ..py = 20 ..center - ..gap = 32, - ).niku - ..expanded, - ), + ..scrollable + ..expanded + ]) + ..center + ..gap = 32, + ).niku + ..fullSize, ); } } @@ -165,7 +162,7 @@ class ArigatouSensei extends StatelessWidget { ..center ..scrollable ..n.center - ..expanded, + ..fullSize, ); } } diff --git a/macos/Runner/MainFlutterWindow.swift b/macos/Runner/MainFlutterWindow.swift index a5e040a..c9c9c8b 100644 --- a/macos/Runner/MainFlutterWindow.swift +++ b/macos/Runner/MainFlutterWindow.swift @@ -4,7 +4,7 @@ import bitsdojo_window_macos class MainFlutterWindow: BitsdojoWindow { override func bitsdojo_window_configure() -> UInt { - return BDW_CUSTOM_FRAME | BDW_HIDE_ON_STARTUP + return BDW_HIDE_ON_STARTUP } override func awakeFromNib() {