|
|
@ -29,7 +29,6 @@ class QuestionPage extends StatelessWidget { |
|
|
horizontal: setSize(context: context, |
|
|
horizontal: setSize(context: context, |
|
|
mobile: MySpaces.s16, |
|
|
mobile: MySpaces.s16, |
|
|
tablet: MySpaces.s30) ?? 0, |
|
|
tablet: MySpaces.s30) ?? 0, |
|
|
vertical: setPlatform(android: MySpaces.s20) ?? 0, |
|
|
|
|
|
), |
|
|
), |
|
|
decoration: BoxDecoration( |
|
|
decoration: BoxDecoration( |
|
|
gradient: LinearGradient( |
|
|
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<QuestionBloc, QuestionState>( |
|
|
|
|
|
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<double>(android: MySpaces.s20, iOS: 50)?.gapHeight ?? SizedBox.shrink(), |
|
|
|
|
|
_topButtons(context), |
|
|
|
|
|
MySpaces.s10.gapHeight, |
|
|
|
|
|
Expanded( |
|
|
|
|
|
child: BlocBuilder<QuestionBloc, QuestionState>( |
|
|
|
|
|
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<double>(android: MySpaces.s20,)?.gapHeight ?? SizedBox.shrink(), |
|
|
|
|
|
], |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
|