diff --git a/lib/features/home/presentation/ui/home_page.dart b/lib/features/home/presentation/ui/home_page.dart index e1aaa72..cc801aa 100644 --- a/lib/features/home/presentation/ui/home_page.dart +++ b/lib/features/home/presentation/ui/home_page.dart @@ -44,19 +44,17 @@ class HomePage extends StatelessWidget { Widget _music(BuildContext context) { return PositionedDirectional( - top: setPlatform(android: MySpaces.s36, iOS: MySpaces.s0), + top: setPlatform(android: MySpaces.s36, iOS: 50), end: MySpaces.s16, - child: SafeArea( - child: SlideDownFade( - delay: Duration(milliseconds: 200), - child: StreamBuilder( - initialData: 1, - stream: context.read().volumeStream, - builder: (context, snapshot) => MyInkwell( - onTap: () => context.read().changeMute(), - child: MyImage( - image: snapshot.data == 0 ? MyAssets.musicOff : MyAssets.musicOn, - ), + child: SlideDownFade( + delay: Duration(milliseconds: 200), + child: StreamBuilder( + initialData: 1, + stream: context.read().volumeStream, + builder: (context, snapshot) => MyInkwell( + onTap: () => context.read().changeMute(), + child: MyImage( + image: snapshot.data == 0 ? MyAssets.musicOff : MyAssets.musicOn, ), ), ), diff --git a/lib/features/level/presentation/ui/level_page.dart b/lib/features/level/presentation/ui/level_page.dart index f52b34c..b2cb56f 100644 --- a/lib/features/level/presentation/ui/level_page.dart +++ b/lib/features/level/presentation/ui/level_page.dart @@ -187,34 +187,32 @@ class LevelPage extends StatelessWidget { return Positioned( left: MySpaces.s16, right: MySpaces.s16, - top: setPlatform(android: MySpaces.s20, iOS: MySpaces.s0), - child: SafeArea( - child: Row( - spacing: MySpaces.s16, - children: [ - MyInkwell( - onTap: () => context.read().goToHomePage(context), - audio: MyAudios.back, - child: MyImage( - image: MyAssets.homeButton, - ), - ), - Spacer(), - DiamondLevel( - diamonds: context.read().diamonds, + top: setPlatform(android: MySpaces.s20, iOS: 50), + child: Row( + spacing: MySpaces.s16, + children: [ + MyInkwell( + onTap: () => context.read().goToHomePage(context), + audio: MyAudios.back, + child: MyImage( + image: MyAssets.homeButton, ), - StreamBuilder( - initialData: 1, - stream: context.read().volumeStream, - builder: (context, snapshot) => MyInkwell( - onTap: () => context.read().changeMute(), - child: MyImage( - image: snapshot.data == 0 ? MyAssets.musicOff : MyAssets.musicOn, - ), + ), + Spacer(), + DiamondLevel( + diamonds: context.read().diamonds, + ), + StreamBuilder( + initialData: 1, + stream: context.read().volumeStream, + builder: (context, snapshot) => MyInkwell( + onTap: () => context.read().changeMute(), + child: MyImage( + image: snapshot.data == 0 ? MyAssets.musicOff : MyAssets.musicOn, ), ), - ], - ), + ), + ], ), ); } diff --git a/lib/features/question/presentation/ui/question_page.dart b/lib/features/question/presentation/ui/question_page.dart index fabe094..5436dee 100644 --- a/lib/features/question/presentation/ui/question_page.dart +++ b/lib/features/question/presentation/ui/question_page.dart @@ -29,7 +29,6 @@ class QuestionPage extends StatelessWidget { horizontal: setSize(context: context, mobile: MySpaces.s16, tablet: MySpaces.s30) ?? 0, - vertical: setPlatform(android: MySpaces.s20) ?? 0, ), decoration: BoxDecoration( gradient: LinearGradient( @@ -47,29 +46,28 @@ class QuestionPage extends StatelessWidget { ), ), ), - child: SafeArea( - bottom: false, - child: Column( - children: [ - _topButtons(context), - MySpaces.s10.gapHeight, - Expanded( - child: BlocBuilder( - buildWhen: (previous, current) => - (previous.currentQuestion?.order != - current.currentQuestion?.order), - builder: (context, state) { - if (state.currentQuestion?.order == - state.levelEntity?.questions?.length) { - return DiamondScreen(); - } else { - return QuestionScreen(); - } - }, - ), + child: Column( + children: [ + setPlatform(android: MySpaces.s20, iOS: 50)?.gapHeight ?? SizedBox.shrink(), + _topButtons(context), + MySpaces.s10.gapHeight, + Expanded( + child: BlocBuilder( + buildWhen: (previous, current) => + (previous.currentQuestion?.order != + current.currentQuestion?.order), + builder: (context, state) { + if (state.currentQuestion?.order == + state.levelEntity?.questions?.length) { + return DiamondScreen(); + } else { + return QuestionScreen(); + } + }, ), - ], - ), + ), + setPlatform(android: MySpaces.s20,)?.gapHeight ?? SizedBox.shrink(), + ], ), ), ), diff --git a/lib/features/question/presentation/ui/screens/diamond_screen.dart b/lib/features/question/presentation/ui/screens/diamond_screen.dart index b745169..2091108 100644 --- a/lib/features/question/presentation/ui/screens/diamond_screen.dart +++ b/lib/features/question/presentation/ui/screens/diamond_screen.dart @@ -7,6 +7,7 @@ import 'package:hadi_hoda_flutter/common_ui/resources/my_assets.dart'; import 'package:hadi_hoda_flutter/common_ui/resources/my_colors.dart'; import 'package:hadi_hoda_flutter/common_ui/resources/my_spaces.dart'; import 'package:hadi_hoda_flutter/common_ui/resources/my_text_style.dart'; +import 'package:hadi_hoda_flutter/core/utils/gap.dart'; import 'package:hadi_hoda_flutter/core/utils/my_localization.dart'; import 'package:hadi_hoda_flutter/core/utils/screen_size.dart'; import 'package:hadi_hoda_flutter/core/utils/set_platform_size.dart'; @@ -143,6 +144,7 @@ class DiamondScreen extends StatelessWidget { _buttons(context), ], ), + MySpaces.s20.gapHeight, ], ); }