diff --git a/assets/audio/success_tone_android.mp3 b/assets/audio/success_tone_android.mp3
new file mode 100644
index 0000000..b8ad93f
Binary files /dev/null and b/assets/audio/success_tone_android.mp3 differ
diff --git a/assets/audio/success_tone_ios.caf b/assets/audio/success_tone_ios.caf
new file mode 100644
index 0000000..f2bcbaf
Binary files /dev/null and b/assets/audio/success_tone_ios.caf differ
diff --git a/assets/images/attendance.svg b/assets/images/attendance.svg
new file mode 100644
index 0000000..974fba3
--- /dev/null
+++ b/assets/images/attendance.svg
@@ -0,0 +1,17 @@
+
diff --git a/assets/images/marathon_banner_bg.svg b/assets/images/marathon_banner_bg.svg
index 9053afc..767a78c 100644
--- a/assets/images/marathon_banner_bg.svg
+++ b/assets/images/marathon_banner_bg.svg
@@ -28,87 +28,91 @@
-
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -117,121 +121,121 @@
-
-
+
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
+
-
-
-
-
+
+
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
+
-
-
-
+
+
+
-
+
-
+
-
+
@@ -239,19 +243,19 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
+
@@ -271,10 +275,10 @@
-
+
-
-
+
+
@@ -302,8 +306,8 @@
-
-
+
+
diff --git a/lib/classes/colors.dart b/lib/classes/colors.dart
index ad91de7..b77e7b1 100644
--- a/lib/classes/colors.dart
+++ b/lib/classes/colors.dart
@@ -59,4 +59,5 @@ class MyColors {
static const Color greyC4Color = Color(0xffC4C4C4);
static const Color grey35Color = Color(0xff535353);
static const Color grey9DColor = Color(0xff9D9D9D);
+ static const Color darkDigitColor = Color(0xff2D2F39);
}
diff --git a/lib/ui/dialogs/success_dialog.dart b/lib/ui/dialogs/success_dialog.dart
index 8e1de54..5150110 100644
--- a/lib/ui/dialogs/success_dialog.dart
+++ b/lib/ui/dialogs/success_dialog.dart
@@ -1,11 +1,41 @@
+import 'dart:io';
+
import 'package:flutter/material.dart';
+import 'package:just_audio/just_audio.dart';
import 'package:lottie/lottie.dart';
-class SuccessDialog extends StatelessWidget {
+class SuccessDialog extends StatefulWidget {
bool isFromDashboard;
SuccessDialog(this.isFromDashboard);
+ @override
+ State createState() => _SuccessDialogState();
+}
+
+class _SuccessDialogState extends State with TickerProviderStateMixin {
+ late AnimationController _controller;
+
+ @override
+ void initState() {
+ _controller = AnimationController(vsync: this);
+
+ super.initState();
+ }
+
+ Future playSuccessSound() async {
+ AudioPlayer player = AudioPlayer();
+ String audioAsset = "";
+ if (Platform.isAndroid) {
+ audioAsset = "assets/audio/success_tone_android.mp3";
+ } else {
+ audioAsset = "assets/audio/success_tone_ios.caf";
+ }
+ await player.setAsset(audioAsset);
+ await player.load();
+ player.play();
+ }
+
@override
Widget build(BuildContext context) {
double size = MediaQuery.of(context).size.width / 1.8;
@@ -18,13 +48,22 @@ class SuccessDialog extends StatelessWidget {
width: size,
height: size,
child: Card(
- child: Lottie.asset('assets/lottie/lt_success.json', repeat: false, reverse: false, onLoaded: (v) {
- print("calling_lottie " + v.seconds.toString());
- Future.delayed(Duration(seconds: 2)).then((value) {
- Navigator.pop(context);
- if (isFromDashboard) Navigator.pop(context);
- });
- }),
+ child: Lottie.asset(
+ 'assets/lottie/lt_success.json',
+ repeat: false,
+ reverse: false,
+ controller: _controller,
+ onLoaded: (LottieComposition v) async {
+ print("calling_lottie " + v.seconds.toString());
+ await playSuccessSound();
+ _controller
+ ..duration = v.duration
+ ..forward().whenComplete(() async {
+ Navigator.pop(context);
+ if (widget.isFromDashboard) Navigator.pop(context);
+ });
+ },
+ ),
),
),
],
diff --git a/lib/ui/marathon/widgets/countdown_timer.dart b/lib/ui/marathon/widgets/countdown_timer.dart
index f5eb92f..93db057 100644
--- a/lib/ui/marathon/widgets/countdown_timer.dart
+++ b/lib/ui/marathon/widgets/countdown_timer.dart
@@ -14,25 +14,23 @@ class BuildCountdownTimer extends StatelessWidget {
final MarathonProvider provider;
final int screenFlag;
- const BuildCountdownTimer({
+ BuildCountdownTimer({
Key? key,
required this.provider,
required this.timeToMarathon,
required this.screenFlag,
}) : super(key: key);
- final TextStyle styleTextHome = const TextStyle(
- // fontSize: 7,
- color: MyColors.greyACColor,
+ final TextStyle styleTextHome = TextStyle(
+ color: MyColors.grey3AColor.withOpacity(0.45),
fontStyle: FontStyle.italic,
- fontWeight: FontWeight.w600,
+ fontWeight: FontWeight.w800,
letterSpacing: -0.4,
);
final TextStyle styleDigitHome = const TextStyle(
height: 23 / 27,
- color: MyColors.white,
- // fontSize: 24,
+ color: MyColors.darkDigitColor,
fontStyle: FontStyle.italic,
letterSpacing: -1.44,
fontWeight: FontWeight.bold,
diff --git a/lib/ui/marathon/widgets/marathon_banner.dart b/lib/ui/marathon/widgets/marathon_banner.dart
index 6fcb514..10fe17d 100644
--- a/lib/ui/marathon/widgets/marathon_banner.dart
+++ b/lib/ui/marathon/widgets/marathon_banner.dart
@@ -46,7 +46,7 @@ class MarathonBanner extends StatelessWidget {
child: Container(
width: 65,
height: 32,
- color: MyColors.gradiantStartColor,
+ color: MyColors.darkDigitColor,
),
),
),
@@ -80,20 +80,20 @@ class MarathonBanner extends StatelessWidget {
LocaleKeys.getReadyForContest.tr(),
minFontSize: 08,
maxFontSize: 11,
- style: const TextStyle(
+ style: TextStyle(
fontStyle: FontStyle.italic,
fontWeight: FontWeight.w600,
- color: MyColors.lightGreyEFColor,
+ color: MyColors.grey3AColor.withOpacity(0.8),
letterSpacing: -0.4,
),
),
- const AutoSizeText(
+ AutoSizeText(
"Saudi Arabia",
style: TextStyle(
fontStyle: FontStyle.italic,
fontSize: 19,
fontWeight: FontWeight.bold,
- color: MyColors.lightGreyEFColor,
+ color: MyColors.grey3AColor.withOpacity(0.8),
height: 32 / 22,
),
),
@@ -142,7 +142,7 @@ class MarathonBanner extends StatelessWidget {
bottom: 0,
child: RotatedBox(
quarterTurns: 4,
- child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white),
+ child: SvgPicture.asset("assets/images/arrow_next.svg", color: MyColors.darkDigitColor),
).paddingAll(15),
)
: Positioned(
@@ -150,7 +150,7 @@ class MarathonBanner extends StatelessWidget {
left: 0,
child: RotatedBox(
quarterTurns: 2,
- child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white),
+ child: SvgPicture.asset("assets/images/arrow_next.svg", color: MyColors.darkDigitColor),
).paddingAll(15),
),
],
diff --git a/pubspec.yaml b/pubspec.yaml
index 633edd7..16c5737 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -92,6 +92,7 @@ dependencies:
video_player: ^2.4.7
+ just_audio: ^0.9.30
dev_dependencies:
flutter_test:
@@ -124,6 +125,7 @@ flutter:
- assets/langs/
- assets/icons/
- assets/lottie/
+ - assets/audio/
- assets/images/
- assets/images/login/
- assets/icons/chat/