mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-06 02:59:28 +00:00
fix overflow error for onboarding
This commit is contained in:
parent
11b768d41c
commit
3488ae97fb
1 changed files with 51 additions and 49 deletions
|
|
@ -40,61 +40,63 @@ class OnboardingSinglePage extends HookConsumerWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: Column(
|
body: SingleChildScrollView(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
child: Column(
|
||||||
children: [
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
Padding(
|
children: [
|
||||||
padding: const EdgeInsets.all(8.0),
|
Padding(
|
||||||
child: Text(
|
padding: const EdgeInsets.all(8.0),
|
||||||
'Welcome to Vaani',
|
child: Text(
|
||||||
style: Theme.of(context).textTheme.headlineSmall,
|
'Welcome to Vaani',
|
||||||
|
style: Theme.of(context).textTheme.headlineSmall,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
const SizedBox.square(
|
||||||
const SizedBox.square(
|
dimension: 16.0,
|
||||||
dimension: 16.0,
|
),
|
||||||
),
|
Padding(
|
||||||
Padding(
|
padding: const EdgeInsets.all(8.0),
|
||||||
padding: const EdgeInsets.all(8.0),
|
child: AnimatedSwitcher(
|
||||||
child: AnimatedSwitcher(
|
duration: 500.ms,
|
||||||
|
transitionBuilder: fadeSlideTransitionBuilder,
|
||||||
|
child: canUserLogin.value
|
||||||
|
? Text(
|
||||||
|
'Server connected, please login',
|
||||||
|
key: const ValueKey('connected'),
|
||||||
|
style: Theme.of(context).textTheme.bodyMedium,
|
||||||
|
)
|
||||||
|
: Text(
|
||||||
|
'Please enter the URL of your AudiobookShelf Server',
|
||||||
|
key: const ValueKey('not_connected'),
|
||||||
|
style: Theme.of(context).textTheme.bodyMedium,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: AddNewServer(
|
||||||
|
controller: serverUriController,
|
||||||
|
allowEmpty: true,
|
||||||
|
onPressed: () {
|
||||||
|
canUserLogin.value = serverUriController.text.isNotEmpty;
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
AnimatedSwitcher(
|
||||||
duration: 500.ms,
|
duration: 500.ms,
|
||||||
transitionBuilder: fadeSlideTransitionBuilder,
|
transitionBuilder: fadeSlideTransitionBuilder,
|
||||||
child: canUserLogin.value
|
child: canUserLogin.value
|
||||||
? Text(
|
? UserLoginWidget(
|
||||||
'Server connected, please login',
|
server: audiobookshelfUri,
|
||||||
key: const ValueKey('connected'),
|
|
||||||
style: Theme.of(context).textTheme.bodyMedium,
|
|
||||||
)
|
)
|
||||||
: Text(
|
// ).animate().fade(duration: 600.ms).slideY(begin: 0.3, end: 0)
|
||||||
'Please enter the URL of your AudiobookShelf Server',
|
: const RedirectToABS().animate().fadeIn().slideY(
|
||||||
key: const ValueKey('not_connected'),
|
curve: Curves.easeInOut,
|
||||||
style: Theme.of(context).textTheme.bodyMedium,
|
duration: 500.ms,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
Padding(
|
),
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: AddNewServer(
|
|
||||||
controller: serverUriController,
|
|
||||||
allowEmpty: true,
|
|
||||||
onPressed: () {
|
|
||||||
canUserLogin.value = serverUriController.text.isNotEmpty;
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
AnimatedSwitcher(
|
|
||||||
duration: 500.ms,
|
|
||||||
transitionBuilder: fadeSlideTransitionBuilder,
|
|
||||||
child: canUserLogin.value
|
|
||||||
? UserLoginWidget(
|
|
||||||
server: audiobookshelfUri,
|
|
||||||
)
|
|
||||||
// ).animate().fade(duration: 600.ms).slideY(begin: 0.3, end: 0)
|
|
||||||
: const RedirectToABS().animate().fadeIn().slideY(
|
|
||||||
curve: Curves.easeInOut,
|
|
||||||
duration: 500.ms,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue