Skip to content

Commit 3488ae9

Browse files
committed
fix overflow error for onboarding
1 parent 11b768d commit 3488ae9

File tree

1 file changed

+51
-49
lines changed

1 file changed

+51
-49
lines changed

lib/features/onboarding/view/onboarding_single_page.dart

+51-49
Original file line numberDiff line numberDiff line change
@@ -40,61 +40,63 @@ class OnboardingSinglePage extends HookConsumerWidget {
4040
}
4141

4242
return Scaffold(
43-
body: Column(
44-
mainAxisAlignment: MainAxisAlignment.center,
45-
children: [
46-
Padding(
47-
padding: const EdgeInsets.all(8.0),
48-
child: Text(
49-
'Welcome to Vaani',
50-
style: Theme.of(context).textTheme.headlineSmall,
43+
body: SingleChildScrollView(
44+
child: Column(
45+
mainAxisAlignment: MainAxisAlignment.center,
46+
children: [
47+
Padding(
48+
padding: const EdgeInsets.all(8.0),
49+
child: Text(
50+
'Welcome to Vaani',
51+
style: Theme.of(context).textTheme.headlineSmall,
52+
),
5153
),
52-
),
53-
const SizedBox.square(
54-
dimension: 16.0,
55-
),
56-
Padding(
57-
padding: const EdgeInsets.all(8.0),
58-
child: AnimatedSwitcher(
54+
const SizedBox.square(
55+
dimension: 16.0,
56+
),
57+
Padding(
58+
padding: const EdgeInsets.all(8.0),
59+
child: AnimatedSwitcher(
60+
duration: 500.ms,
61+
transitionBuilder: fadeSlideTransitionBuilder,
62+
child: canUserLogin.value
63+
? Text(
64+
'Server connected, please login',
65+
key: const ValueKey('connected'),
66+
style: Theme.of(context).textTheme.bodyMedium,
67+
)
68+
: Text(
69+
'Please enter the URL of your AudiobookShelf Server',
70+
key: const ValueKey('not_connected'),
71+
style: Theme.of(context).textTheme.bodyMedium,
72+
),
73+
),
74+
),
75+
Padding(
76+
padding: const EdgeInsets.all(8.0),
77+
child: AddNewServer(
78+
controller: serverUriController,
79+
allowEmpty: true,
80+
onPressed: () {
81+
canUserLogin.value = serverUriController.text.isNotEmpty;
82+
},
83+
),
84+
),
85+
AnimatedSwitcher(
5986
duration: 500.ms,
6087
transitionBuilder: fadeSlideTransitionBuilder,
6188
child: canUserLogin.value
62-
? Text(
63-
'Server connected, please login',
64-
key: const ValueKey('connected'),
65-
style: Theme.of(context).textTheme.bodyMedium,
89+
? UserLoginWidget(
90+
server: audiobookshelfUri,
6691
)
67-
: Text(
68-
'Please enter the URL of your AudiobookShelf Server',
69-
key: const ValueKey('not_connected'),
70-
style: Theme.of(context).textTheme.bodyMedium,
71-
),
72-
),
73-
),
74-
Padding(
75-
padding: const EdgeInsets.all(8.0),
76-
child: AddNewServer(
77-
controller: serverUriController,
78-
allowEmpty: true,
79-
onPressed: () {
80-
canUserLogin.value = serverUriController.text.isNotEmpty;
81-
},
92+
// ).animate().fade(duration: 600.ms).slideY(begin: 0.3, end: 0)
93+
: const RedirectToABS().animate().fadeIn().slideY(
94+
curve: Curves.easeInOut,
95+
duration: 500.ms,
96+
),
8297
),
83-
),
84-
AnimatedSwitcher(
85-
duration: 500.ms,
86-
transitionBuilder: fadeSlideTransitionBuilder,
87-
child: canUserLogin.value
88-
? UserLoginWidget(
89-
server: audiobookshelfUri,
90-
)
91-
// ).animate().fade(duration: 600.ms).slideY(begin: 0.3, end: 0)
92-
: const RedirectToABS().animate().fadeIn().slideY(
93-
curve: Curves.easeInOut,
94-
duration: 500.ms,
95-
),
96-
),
97-
],
98+
],
99+
),
98100
),
99101
);
100102
}

0 commit comments

Comments
 (0)