@@ -16,9 +16,8 @@ class MeditationRemoteDataSourceImpl implements MeditaionRemoteDataSource {
1616
1717 @override
1818 Future <DailyQuoteModel > getDailyQuote () async {
19- final response = await client
20- .get (Uri .parse (
21- 'https://mindful-app-47s6.onrender.com/meditation/dailyQuotes' ));
19+ final response = await client.get (Uri .parse (
20+ 'https://mindful-app-47s6.onrender.com/meditation/dailyQuotes' ));
2221
2322 if (response.statusCode == 200 ) {
2423 final jsonResponse = json.decode (response.body);
@@ -31,9 +30,8 @@ class MeditationRemoteDataSourceImpl implements MeditaionRemoteDataSource {
3130
3231 @override
3332 Future <MoodMessageModel > getMoodMessage (String mood) async {
34- final response = await client
35- .get (Uri .parse (
36- 'https://mindful-app-47s6.onrender.com/meditation/myMood/$mood ' ));
33+ final response = await client.get (Uri .parse (
34+ 'https://mindful-app-47s6.onrender.com/meditation/myMood/$mood ' ));
3735 if (response.statusCode == 200 ) {
3836 final jsonResponse = json.decode (response.body);
3937
@@ -44,19 +42,15 @@ class MeditationRemoteDataSourceImpl implements MeditaionRemoteDataSource {
4442 }
4543
4644 @override
47- Future <MoodDataModel > getmoodData (String username)async {
48- final response = await client.get (Uri .parse (
49- 'https://mindful-app-47s6.onrender.com/user/$username '
50- ));
45+ Future <MoodDataModel > getmoodData (String username) async {
46+ final response = await client
47+ .get (Uri .parse ('https://mindful-app-47s6.onrender.com/user/$username ' ));
5148
52- if (response.statusCode== 200 ){
49+ if (response.statusCode == 200 ) {
5350 final jsonResponse = json.decode (response.body);
5451 return MoodDataModel .fromJson (jsonResponse);
55-
56- }
57- else {
52+ } else {
5853 throw Exception ("Failed to get data" );
59-
6054 }
6155 }
6256}
0 commit comments