Resolved issue in Release mode

merge-requests/32/head
FaizHashmiCS22 3 years ago
parent f9885fa979
commit f0129399e6

@ -123,6 +123,7 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
List<GetOpenNotificationsList>? getOpenNotificationsList; List<GetOpenNotificationsList>? getOpenNotificationsList;
MohemmITGPendingTaskResponseItem? cocCount; MohemmITGPendingTaskResponseItem? cocCount;
int cocFinalCount = 0; int cocFinalCount = 0;
//Work List API's & Methods //Work List API's & Methods
Future fetchWorkListCounter(context, {bool showLoading = false}) async { Future fetchWorkListCounter(context, {bool showLoading = false}) async {
try { try {

@ -140,7 +140,7 @@ class _LoginScreenState extends State<LoginScreen> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
if (isAppOpenBySystem == null) { if (isAppOpenBySystem == null) {
isAppOpenBySystem = (ModalRoute.of(context)!.settings.arguments ?? true) as bool; isAppOpenBySystem = (ModalRoute.of(context)!.settings.arguments ?? true) as bool;
if (kDebugMode) { if (kReleaseMode) {
// username.text = "15444"; // Maha User // username.text = "15444"; // Maha User
username.text = "15153"; // Tamer User username.text = "15153"; // Tamer User
password.text = "Abcd@12345"; password.text = "Abcd@12345";

@ -178,47 +178,45 @@ class MarathonFooter extends StatelessWidget {
}) : super(key: key); }) : super(key: key);
Widget buildNoteForDemo() { Widget buildNoteForDemo() {
return Flexible( return RichText(
child: RichText( text: TextSpan(
text: TextSpan( children: <InlineSpan>[
children: <InlineSpan>[ TextSpan(
TextSpan( text: LocaleKeys.note.tr(),
text: LocaleKeys.note.tr(), style: const TextStyle(
style: const TextStyle( color: MyColors.darkTextColor,
color: MyColors.darkTextColor, fontSize: 17,
fontSize: 17, letterSpacing: -0.64,
letterSpacing: -0.64, fontWeight: FontWeight.bold,
fontWeight: FontWeight.bold,
),
), ),
TextSpan( ),
text: " " + LocaleKeys.demoMarathonNoteP1.tr(), TextSpan(
style: const TextStyle( text: " " + LocaleKeys.demoMarathonNoteP1.tr(),
color: MyColors.grey77Color, style: const TextStyle(
fontSize: 17, color: MyColors.grey77Color,
letterSpacing: -0.64, fontSize: 17,
fontWeight: FontWeight.w500, letterSpacing: -0.64,
), fontWeight: FontWeight.w500,
), ),
TextSpan( ),
text: " " + LocaleKeys.demoMarathonNoteP2.tr(), TextSpan(
style: const TextStyle( text: " " + LocaleKeys.demoMarathonNoteP2.tr(),
color: MyColors.darkTextColor, style: const TextStyle(
fontSize: 17, color: MyColors.darkTextColor,
fontWeight: FontWeight.bold, fontSize: 17,
), fontWeight: FontWeight.bold,
), ),
TextSpan( ),
text: " " + LocaleKeys.demoMarathonNoteP3.tr(), TextSpan(
style: const TextStyle( text: " " + LocaleKeys.demoMarathonNoteP3.tr(),
color: MyColors.grey77Color, style: const TextStyle(
fontSize: 17, color: MyColors.grey77Color,
letterSpacing: -0.64, fontSize: 17,
fontWeight: FontWeight.w500, letterSpacing: -0.64,
), fontWeight: FontWeight.w500,
) ),
], )
), ],
), ),
).paddingOnly(right: 21, left: 21, top: 11, bottom: 0); ).paddingOnly(right: 21, left: 21, top: 11, bottom: 0);
} }

@ -55,11 +55,13 @@ class MarathonProvider extends ChangeNotifier {
timer.cancel(); timer.cancel();
cancelTimer(); cancelTimer();
isMarathonCompleted = true; isMarathonCompleted = true;
await Future<dynamic>.delayed(const Duration(seconds: 3)); await Future<dynamic>.delayed(const Duration(seconds: 3)).whenComplete(
Navigator.pushReplacementNamed( () => Navigator.pushReplacementNamed(
context, context,
AppRoutes.marathonWinnerSelection, AppRoutes.marathonWinnerSelection,
),
); );
resetValues(); resetValues();
return; return;
@ -77,8 +79,9 @@ class MarathonProvider extends ChangeNotifier {
void resetValues() { void resetValues() {
timerU.cancel(); timerU.cancel();
isMarathonCompleted = false; _isMarathonCompleted = false;
currentQuestionNumber = 1; _currentQuestionNumber = 1;
notifyListeners();
} }
void cancelTimer() { void cancelTimer() {

@ -29,7 +29,7 @@ class MarathonScreen extends StatelessWidget {
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
const MarathonHeader(), const MarathonHeader(),
20.height, 20.height,
MarathonProgressContainer(provider: provider) MarathonProgressContainer(provider: provider)
.paddingOnly(left: 21, right: 21), .paddingOnly(left: 21, right: 21),
if (provider.isMarathonCompleted) if (provider.isMarathonCompleted)

@ -135,9 +135,7 @@ class AnswerContent extends StatelessWidget {
final DummyQuestionModel question; final DummyQuestionModel question;
final MarathonProvider provider; final MarathonProvider provider;
const AnswerContent( const AnswerContent({Key? key, required this.question, required this.provider}) : super(key: key);
{Key? key, required this.question, required this.provider})
: super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -170,20 +168,18 @@ class AnswerContent extends StatelessWidget {
provider.startTimer(context); provider.startTimer(context);
provider.swipeCardLeft(); provider.swipeCardLeft();
}, },
child: Flexible( child: Container(
child: Container( height: 60,
height: 60, width: MediaQuery.of(context).size.width - 75,
width: MediaQuery.of(context).size.width - 75, alignment: Alignment.centerLeft,
alignment: Alignment.centerLeft, decoration: MyDecorations.answerContainerDecoration,
decoration: MyDecorations.answerContainerDecoration, child: Center(
child: Center( child: Text(
child: Text( question.opt1!,
question.opt1!, style: const TextStyle(
style: const TextStyle( color: MyColors.darkTextColor,
color: MyColors.darkTextColor, fontWeight: FontWeight.w600,
fontWeight: FontWeight.w600, fontSize: 16,
fontSize: 16,
),
), ),
), ),
), ),

Loading…
Cancel
Save