refactor(ui): Remove SafeArea where they are not needed

pull/193/head
Inex Code 2023-02-01 01:40:42 +03:00
parent 80547785d3
commit c271331f29
2 changed files with 47 additions and 53 deletions

View File

@ -21,8 +21,7 @@ class _OnboardingPageState extends State<OnboardingPage> {
} }
@override @override
Widget build(final BuildContext context) => SafeArea( Widget build(final BuildContext context) => Scaffold(
child: Scaffold(
body: PageView( body: PageView(
controller: pageController, controller: pageController,
children: [ children: [
@ -30,7 +29,6 @@ class _OnboardingPageState extends State<OnboardingPage> {
_withPadding(secondPage()), _withPadding(secondPage()),
], ],
), ),
),
); );
Widget _withPadding(final Widget child) => Padding( Widget _withPadding(final Widget child) => Padding(
@ -60,8 +58,7 @@ class _OnboardingPageState extends State<OnboardingPage> {
style: Theme.of(context).textTheme.bodyMedium, style: Theme.of(context).textTheme.bodyMedium,
), ),
const SizedBox(height: 32), const SizedBox(height: 32),
Flexible( Center(
child: Center(
child: Image.asset( child: Image.asset(
_fileName( _fileName(
context: context, context: context,
@ -71,7 +68,6 @@ class _OnboardingPageState extends State<OnboardingPage> {
), ),
), ),
), ),
),
], ],
), ),
), ),

View File

@ -52,8 +52,7 @@ class _RootPageState extends State<RootPage> with TickerProviderStateMixin {
final bool isReady = context.watch<ServerInstallationCubit>().state final bool isReady = context.watch<ServerInstallationCubit>().state
is ServerInstallationFinished; is ServerInstallationFinished;
return SafeArea( return Provider<ChangeTab>(
child: Provider<ChangeTab>(
create: (final _) => ChangeTab(tabController.animateTo), create: (final _) => ChangeTab(tabController.animateTo),
child: Scaffold( child: Scaffold(
body: TabBarView( body: TabBarView(
@ -86,7 +85,6 @@ class _RootPageState extends State<RootPage> with TickerProviderStateMixin {
) )
: null, : null,
), ),
),
); );
} }
} }