Merge branch 'faiz_cs' into 'master'

Fixed issues in Release mode

See merge request Cloud_Solution/mohemm-flutter-app!32
merge-requests/33/head
Sikander Saleem 3 years ago
commit b9ee1230b6

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

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

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

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

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

Loading…
Cancel
Save