Skip to content

Commit 0aa5415

Browse files
[compass_app] fixing pixel overflowed (#2669)
*- use SingleChildScrollView in the auth screen to fix pixel overflowed.* ![after](https://github.com/user-attachments/assets/4e346892-0260-443f-aa34-4fa3e3a57a42) ![before](https://github.com/user-attachments/assets/27484520-9342-4084-a83c-8dec43f02434) *Fix for: #2668 ## Pre-launch Checklist - [x] I read the [Flutter Style Guide] _recently_, and have followed its advice. - [x] I signed the [CLA]. - [x] I read the [Contributors Guide]. - [x] I have added sample code updates to the [changelog]. - [x] I updated/added relevant documentation (doc comments with `///`). If you need help, consider asking for advice on the #hackers-devrel channel on [Discord]. <!-- Links --> [Flutter Style Guide]: https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md [Contributors Guide]: https://github.com/flutter/samples/blob/main/CONTRIBUTING.md [changelog]: ../CHANGELOG.md
1 parent 2ea903a commit 0aa5415

File tree

1 file changed

+33
-31
lines changed

1 file changed

+33
-31
lines changed

compass_app/app/lib/ui/auth/login/widgets/login_screen.dart

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -50,38 +50,40 @@ class _LoginScreenState extends State<LoginScreen> {
5050
@override
5151
Widget build(BuildContext context) {
5252
return Scaffold(
53-
body: Column(
54-
crossAxisAlignment: CrossAxisAlignment.center,
55-
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
56-
children: [
57-
const TiltedCards(),
58-
Padding(
59-
padding: Dimens.of(context).edgeInsetsScreenSymmetric,
60-
child: Column(
61-
crossAxisAlignment: CrossAxisAlignment.stretch,
62-
children: [
63-
TextField(controller: _email),
64-
const SizedBox(height: Dimens.paddingVertical),
65-
TextField(controller: _password, obscureText: true),
66-
const SizedBox(height: Dimens.paddingVertical),
67-
ListenableBuilder(
68-
listenable: widget.viewModel.login,
69-
builder: (context, _) {
70-
return FilledButton(
71-
onPressed: () {
72-
widget.viewModel.login.execute((
73-
_email.value.text,
74-
_password.value.text,
75-
));
76-
},
77-
child: Text(AppLocalization.of(context).login),
78-
);
79-
},
80-
),
81-
],
53+
body: SingleChildScrollView(
54+
child: Column(
55+
crossAxisAlignment: CrossAxisAlignment.center,
56+
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
57+
children: [
58+
const TiltedCards(),
59+
Padding(
60+
padding: Dimens.of(context).edgeInsetsScreenSymmetric,
61+
child: Column(
62+
crossAxisAlignment: CrossAxisAlignment.stretch,
63+
children: [
64+
TextField(controller: _email),
65+
const SizedBox(height: Dimens.paddingVertical),
66+
TextField(controller: _password, obscureText: true),
67+
const SizedBox(height: Dimens.paddingVertical),
68+
ListenableBuilder(
69+
listenable: widget.viewModel.login,
70+
builder: (context, _) {
71+
return FilledButton(
72+
onPressed: () {
73+
widget.viewModel.login.execute((
74+
_email.value.text,
75+
_password.value.text,
76+
));
77+
},
78+
child: Text(AppLocalization.of(context).login),
79+
);
80+
},
81+
),
82+
],
83+
),
8284
),
83-
),
84-
],
85+
],
86+
),
8587
),
8688
);
8789
}

0 commit comments

Comments
 (0)