diff --git a/assets/Greetings/all_the_best.svg b/assets/Greetings/all_the_best.svg
new file mode 100644
index 0000000..fc141cd
--- /dev/null
+++ b/assets/Greetings/all_the_best.svg
@@ -0,0 +1,872 @@
+
+
diff --git a/assets/Greetings/best of luck.mp3 b/assets/Greetings/best of luck.mp3
deleted file mode 100644
index 105aabe..0000000
Binary files a/assets/Greetings/best of luck.mp3 and /dev/null differ
diff --git a/assets/Greetings/congrats.svg b/assets/Greetings/congrats.svg
new file mode 100644
index 0000000..5843d2e
--- /dev/null
+++ b/assets/Greetings/congrats.svg
@@ -0,0 +1,131 @@
+
+
diff --git a/assets/Greetings/hi.svg b/assets/Greetings/hi.svg
new file mode 100644
index 0000000..ad8325a
--- /dev/null
+++ b/assets/Greetings/hi.svg
@@ -0,0 +1,134 @@
+
+
diff --git a/assets/Greetings/please.mp3 b/assets/Greetings/please.mp3
deleted file mode 100644
index b88e27d..0000000
Binary files a/assets/Greetings/please.mp3 and /dev/null differ
diff --git a/assets/Greetings/please.svg b/assets/Greetings/please.svg
new file mode 100644
index 0000000..35207fb
--- /dev/null
+++ b/assets/Greetings/please.svg
@@ -0,0 +1,94 @@
+
+
diff --git a/assets/Greetings/say cheeze.mp3 b/assets/Greetings/say cheeze.mp3
deleted file mode 100644
index fc13ab3..0000000
Binary files a/assets/Greetings/say cheeze.mp3 and /dev/null differ
diff --git a/assets/Greetings/say_cheese.svg b/assets/Greetings/say_cheese.svg
new file mode 100644
index 0000000..c5ede82
--- /dev/null
+++ b/assets/Greetings/say_cheese.svg
@@ -0,0 +1,1020 @@
+
+
diff --git a/assets/Greetings/sorry.mp3 b/assets/Greetings/sorry.mp3
deleted file mode 100644
index 1e84da4..0000000
Binary files a/assets/Greetings/sorry.mp3 and /dev/null differ
diff --git a/assets/Greetings/sorry.svg b/assets/Greetings/sorry.svg
new file mode 100644
index 0000000..532de48
--- /dev/null
+++ b/assets/Greetings/sorry.svg
@@ -0,0 +1,2458 @@
+
+
diff --git a/lib/pages/modules/greetings.dart b/lib/pages/modules/greetings.dart
index bf35c1e..4ef5347 100644
--- a/lib/pages/modules/greetings.dart
+++ b/lib/pages/modules/greetings.dart
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_tts/flutter_tts.dart';
import 'package:just_audio/just_audio.dart';
+import 'package:flutter_svg/flutter_svg.dart';
import '../../utils/constants.dart';
@@ -20,40 +21,40 @@ class Greetings {
class AppConstants {
static const String greetings = 'Greetings';
- static final List greetingList= [
+ static final List greetingList = [
Greetings(
name: 'Hello',
- imgAsset: 'assets/Greetings/hi.jpg',
+ imgAsset: 'assets/Greetings/hi.svg',
soundAsset: 'assets/sounds/hi.mp3',
- backgroundColor: Colors.indigoAccent,
+ backgroundColor: Colors.white,
),
Greetings(
name: 'Say Cheese',
- imgAsset: 'assets/Greetings/say_cheeze.jpg',
+ imgAsset: 'assets/Greetings/say_cheese.svg',
soundAsset: 'assets/sounds/good_morning.mp3',
backgroundColor: Colors.orange,
),
Greetings(
name: 'Best of Luck',
- imgAsset: 'assets/Greetings/all_the_best.jpg',
+ imgAsset: 'assets/Greetings/all_the_best.svg',
soundAsset: 'assets/sounds/good_night.mp3',
backgroundColor: Colors.blue,
),
Greetings(
name: 'Sorry',
- imgAsset: 'assets/Greetings/sorry.jpg',
+ imgAsset: 'assets/Greetings/sorry.svg',
soundAsset: 'assets/sounds/good_night.mp3',
backgroundColor: Colors.orange,
),
Greetings(
name: 'Please',
- imgAsset: 'assets/Greetings/please.jpg',
+ imgAsset: 'assets/Greetings/please.svg',
soundAsset: 'assets/sounds/good_night.mp3',
backgroundColor: Colors.blue,
),
Greetings(
name: 'Congratulations',
- imgAsset: 'assets/Greetings/congrats.jpg',
+ imgAsset: 'assets/Greetings/congrats.svg',
soundAsset: 'assets/sounds/good_night.mp3',
backgroundColor: Colors.red,
),
@@ -112,8 +113,7 @@ class _GreetingsWidgetState extends State {
void _navigateToPreviousGreeting() {
setState(() {
- currentIndex =
- (currentIndex - 1 + widget.greetings.length) % widget.greetings.length;
+ currentIndex = (currentIndex - 1 + widget.greetings.length) % widget.greetings.length;
});
}
@@ -140,14 +140,15 @@ class _GreetingsWidgetState extends State {
SizedBox(
width: 350,
height: 350,
- child: Image.asset(greeting.imgAsset),
+ child: greeting.imgAsset.endsWith('.svg')
+ ? SvgPicture.asset(greeting.imgAsset)
+ : Image.asset(greeting.imgAsset),
),
],
),
),
),
const SizedBox(height: 20),
-
Text(
greeting.name,
style: const TextStyle(
@@ -185,11 +186,10 @@ class _GreetingsWidgetState extends State {
),
),
),
-
const SizedBox(width: 20),
IconButton(
onPressed: _navigateToNextGreeting,
- icon:const Icon(Icons.arrow_forward),
+ icon: const Icon(Icons.arrow_forward),
),
],
),
@@ -207,4 +207,4 @@ class _GreetingsWidgetState extends State {
await widget.flutterTts.setLanguage("EN-IN");
await widget.flutterTts.speak(name);
}
-}
\ No newline at end of file
+}