Skip to content

Commit

Permalink
🔧 fix: layout glitch
Browse files Browse the repository at this point in the history
  • Loading branch information
SaltyAom committed Dec 5, 2022
1 parent b77b429 commit 2c23fe7
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 77 deletions.
149 changes: 73 additions & 76 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
}
}
Expand Down Expand Up @@ -165,7 +162,7 @@ class ArigatouSensei extends StatelessWidget {
..center
..scrollable
..n.center
..expanded,
..fullSize,
);
}
}
2 changes: 1 addition & 1 deletion macos/Runner/MainFlutterWindow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 2c23fe7

Please sign in to comment.