diff --git a/.gitignore b/.gitignore
index 1be2d87..64680be 100644
--- a/.gitignore
+++ b/.gitignore
@@ -46,4 +46,8 @@ app.*.map.json
/android/app/release
# fvm
-.fvm/flutter_sdk
\ No newline at end of file
+.fvm/flutter_sdk
+.env
+*.env
+env.dart
+coverage_report
\ No newline at end of file
diff --git a/assets/avatars/av1.png b/assets/avatars/av1.png
new file mode 100644
index 0000000..ff6fb58
Binary files /dev/null and b/assets/avatars/av1.png differ
diff --git a/assets/avatars/av2.png b/assets/avatars/av2.png
new file mode 100644
index 0000000..d3b671b
Binary files /dev/null and b/assets/avatars/av2.png differ
diff --git a/assets/avatars/av3.png b/assets/avatars/av3.png
new file mode 100644
index 0000000..1bec5f1
Binary files /dev/null and b/assets/avatars/av3.png differ
diff --git a/assets/avatars/av4.png b/assets/avatars/av4.png
new file mode 100644
index 0000000..af45697
Binary files /dev/null and b/assets/avatars/av4.png differ
diff --git a/assets/avatars/av5.png b/assets/avatars/av5.png
new file mode 100644
index 0000000..ab033c1
Binary files /dev/null and b/assets/avatars/av5.png differ
diff --git a/assets/avatars/av6.png b/assets/avatars/av6.png
new file mode 100644
index 0000000..c8ac8dd
Binary files /dev/null and b/assets/avatars/av6.png differ
diff --git a/assets/avatars/av7.png b/assets/avatars/av7.png
new file mode 100644
index 0000000..63ce78f
Binary files /dev/null and b/assets/avatars/av7.png differ
diff --git a/assets/placeholder.png b/assets/placeholder.png
new file mode 100644
index 0000000..71bc239
Binary files /dev/null and b/assets/placeholder.png differ
diff --git a/coverage/lcov.info b/coverage/lcov.info
new file mode 100644
index 0000000..a1cff15
--- /dev/null
+++ b/coverage/lcov.info
@@ -0,0 +1,513 @@
+SF:lib/cubit/restaurant_state.dart
+DA:10,7
+DA:16,1
+DA:17,2
+DA:21,3
+DA:23,0
+DA:25,0
+DA:26,0
+DA:32,5
+DA:34,1
+DA:35,2
+DA:37,0
+DA:39,0
+DA:40,0
+DA:46,2
+DA:54,1
+DA:55,3
+DA:57,0
+DA:59,0
+DA:60,0
+DA:61,0
+DA:72,1
+DA:75,1
+DA:76,1
+DA:77,2
+DA:79,0
+DA:81,0
+DA:82,0
+DA:83,0
+DA:91,4
+DA:97,0
+DA:99,0
+DA:100,0
+DA:101,0
+LF:33
+LH:15
+end_of_record
+SF:lib/cubit/restaurant_cubit.dart
+DA:11,1
+DA:12,1
+DA:15,1
+DA:16,1
+DA:18,2
+DA:20,2
+DA:22,1
+DA:23,1
+DA:29,1
+DA:39,1
+DA:40,3
+DA:41,1
+DA:42,1
+DA:44,0
+DA:47,1
+DA:48,1
+DA:49,2
+DA:50,1
+LF:18
+LH:17
+end_of_record
+SF:lib/models/restaurant.dart
+DA:10,2
+DA:15,2
+DA:16,2
+DA:18,0
+DA:26,2
+DA:30,4
+DA:32,0
+DA:42,2
+DA:48,4
+DA:50,0
+DA:60,2
+DA:67,4
+DA:69,0
+DA:77,2
+DA:81,2
+DA:82,2
+DA:84,0
+DA:99,2
+DA:111,2
+DA:112,2
+DA:114,0
+DA:117,0
+DA:118,0
+DA:119,0
+DA:125,1
+DA:126,3
+DA:127,2
+DA:134,1
+DA:135,3
+DA:136,3
+DA:148,2
+DA:153,2
+DA:154,2
+DA:156,0
+LF:34
+LH:24
+end_of_record
+SF:lib/models/restaurant.g.dart
+DA:9,4
+DA:10,2
+DA:11,2
+DA:14,0
+DA:15,0
+DA:16,0
+DA:19,4
+DA:20,2
+DA:23,0
+DA:24,0
+DA:27,4
+DA:28,2
+DA:29,2
+DA:30,2
+DA:33,0
+DA:34,0
+DA:35,0
+DA:36,0
+DA:39,4
+DA:40,2
+DA:41,2
+DA:42,2
+DA:43,2
+DA:45,4
+DA:48,0
+DA:49,0
+DA:50,0
+DA:51,0
+DA:54,4
+DA:55,2
+DA:58,0
+DA:59,0
+DA:62,4
+DA:63,2
+DA:64,2
+DA:65,2
+DA:66,4
+DA:68,8
+DA:69,2
+DA:70,6
+DA:71,2
+DA:72,2
+DA:73,6
+DA:74,2
+DA:75,2
+DA:76,6
+DA:77,2
+DA:78,2
+DA:80,4
+DA:83,0
+DA:84,0
+DA:85,0
+DA:86,0
+DA:87,0
+DA:88,0
+DA:89,0
+DA:90,0
+DA:91,0
+DA:92,0
+DA:93,0
+DA:96,2
+DA:98,2
+DA:99,2
+DA:100,2
+DA:101,6
+DA:102,2
+DA:105,0
+DA:107,0
+DA:108,0
+DA:109,0
+LF:70
+LH:40
+end_of_record
+SF:lib/usecases/fetch_restaurants.dart
+DA:8,0
+DA:9,0
+DA:10,0
+DA:12,0
+DA:13,0
+DA:15,0
+DA:22,0
+DA:26,0
+DA:29,0
+LF:9
+LH:0
+end_of_record
+SF:lib/datasources/yielp_datasource.dart
+DA:10,2
+DA:12,1
+DA:14,1
+DA:15,2
+DA:16,2
+DA:18,1
+DA:24,1
+DA:25,0
+DA:30,1
+DA:64,1
+LF:10
+LH:9
+end_of_record
+SF:lib/repositories/yelp_repository.dart
+DA:9,2
+DA:11,1
+DA:13,1
+DA:14,3
+DA:16,0
+DA:20,1
+DA:22,2
+DA:24,0
+LF:8
+LH:6
+end_of_record
+SF:lib/network/dio_http_client.dart
+DA:8,2
+DA:9,1
+DA:15,2
+DA:18,1
+DA:20,0
+LF:5
+LH:4
+end_of_record
+SF:lib/pages/favorites_list_page_view.dart
+DA:8,1
+DA:10,0
+DA:12,0
+DA:13,0
+DA:14,0
+DA:17,0
+DA:18,0
+DA:19,0
+DA:20,0
+DA:21,0
+DA:22,0
+DA:23,0
+DA:25,0
+DA:26,0
+DA:27,0
+DA:28,0
+DA:29,0
+DA:31,0
+DA:32,0
+DA:33,0
+DA:43,0
+LF:21
+LH:1
+end_of_record
+SF:lib/pages/restaurant_list_page.dart
+DA:9,1
+DA:11,1
+DA:13,1
+DA:14,1
+DA:15,1
+DA:16,0
+DA:17,0
+DA:18,0
+DA:19,0
+DA:20,1
+DA:21,1
+DA:23,1
+DA:24,0
+DA:25,0
+DA:28,1
+DA:29,0
+DA:30,1
+DA:31,3
+DA:32,1
+DA:33,1
+DA:35,1
+DA:36,1
+DA:37,3
+DA:45,0
+DA:54,1
+DA:62,1
+DA:64,1
+DA:65,0
+DA:66,0
+DA:68,0
+DA:69,0
+DA:73,1
+DA:74,2
+DA:77,1
+DA:79,2
+DA:80,1
+DA:81,1
+DA:82,1
+DA:83,1
+DA:89,1
+DA:90,1
+DA:91,1
+DA:92,1
+DA:93,1
+DA:94,1
+DA:104,1
+DA:106,1
+DA:109,1
+DA:110,1
+DA:111,2
+DA:117,2
+DA:121,2
+LF:52
+LH:40
+end_of_record
+SF:lib/pages/home_page.dart
+DA:19,1
+DA:21,1
+DA:23,1
+DA:25,1
+DA:26,1
+DA:27,1
+DA:29,3
+DA:31,1
+DA:32,1
+DA:34,1
+DA:35,0
+DA:44,1
+DA:45,1
+DA:46,1
+DA:47,1
+DA:49,3
+DA:52,1
+DA:53,1
+DA:55,3
+LF:19
+LH:18
+end_of_record
+SF:lib/pages/restaurant_detail_page.dart
+DA:8,0
+DA:10,0
+DA:12,0
+DA:13,0
+DA:14,0
+DA:16,0
+DA:17,0
+DA:18,0
+DA:19,0
+DA:20,0
+DA:21,0
+DA:22,0
+DA:23,0
+DA:24,0
+DA:25,0
+DA:27,0
+DA:29,0
+DA:32,0
+DA:33,0
+DA:37,0
+DA:41,0
+DA:43,0
+DA:49,0
+DA:50,0
+DA:52,0
+DA:57,0
+DA:58,0
+DA:59,0
+DA:60,0
+DA:62,0
+DA:77,0
+DA:84,0
+DA:86,0
+DA:88,0
+DA:89,0
+DA:90,0
+DA:91,0
+DA:95,0
+DA:96,0
+LF:39
+LH:0
+end_of_record
+SF:lib/widgets/appbar.dart
+DA:10,0
+DA:12,0
+DA:15,0
+DA:16,0
+DA:17,0
+DA:18,0
+DA:19,0
+DA:20,0
+DA:21,0
+DA:22,0
+DA:24,0
+DA:28,0
+DA:29,0
+DA:30,0
+DA:37,0
+LF:15
+LH:0
+end_of_record
+SF:lib/utils/get_random_avatar.dart
+DA:4,0
+DA:6,0
+DA:17,0
+DA:20,0
+LF:4
+LH:0
+end_of_record
+SF:lib/widgets/divider.dart
+DA:3,0
+LF:1
+LH:0
+end_of_record
+SF:lib/widgets/hero_image_widget.dart
+DA:6,1
+DA:16,1
+DA:18,1
+DA:19,3
+DA:20,1
+DA:21,2
+DA:22,3
+DA:23,5
+DA:24,1
+DA:25,2
+DA:27,1
+DA:28,1
+DA:30,0
+DA:31,0
+DA:32,0
+DA:34,0
+LF:16
+LH:12
+end_of_record
+SF:lib/widgets/rataurant_open_status.dart
+DA:4,1
+DA:6,1
+DA:8,1
+DA:10,1
+DA:11,1
+DA:12,1
+DA:13,3
+DA:18,1
+DA:21,1
+LF:9
+LH:9
+end_of_record
+SF:lib/widgets/rating_and_open_status_widget.dart
+DA:8,1
+DA:15,1
+DA:17,1
+DA:18,1
+DA:19,1
+DA:20,3
+DA:23,1
+DA:24,2
+LF:8
+LH:8
+end_of_record
+SF:lib/widgets/rating_widget.dart
+DA:10,1
+DA:15,3
+DA:17,1
+DA:19,1
+DA:21,3
+DA:22,1
+DA:24,1
+DA:25,1
+LF:8
+LH:8
+end_of_record
+SF:lib/widgets/restaurant_details.dart
+DA:5,1
+DA:12,1
+DA:14,1
+DA:15,1
+DA:16,1
+DA:17,2
+DA:18,3
+DA:23,1
+DA:24,1
+DA:25,6
+DA:26,3
+LF:11
+LH:11
+end_of_record
+SF:lib/widgets/restaurant_ratings_review_section.dart
+DA:9,0
+DA:12,0
+DA:14,0
+DA:16,0
+DA:17,0
+DA:19,0
+DA:24,0
+DA:28,0
+DA:32,0
+DA:33,0
+DA:34,0
+DA:39,0
+DA:42,0
+DA:43,0
+DA:44,0
+DA:45,0
+DA:47,0
+DA:51,0
+DA:52,0
+DA:57,0
+DA:58,0
+DA:60,0
+DA:61,0
+DA:62,0
+DA:65,0
+DA:69,0
+DA:70,0
+DA:71,0
+DA:73,0
+DA:74,0
+DA:75,0
+DA:80,0
+DA:86,0
+DA:95,0
+DA:96,0
+DA:97,0
+DA:98,0
+DA:99,0
+DA:100,0
+LF:39
+LH:0
+end_of_record
diff --git a/coverage_report/amber.png b/coverage_report/amber.png
new file mode 100644
index 0000000..2cab170
Binary files /dev/null and b/coverage_report/amber.png differ
diff --git a/coverage_report/cmd_line b/coverage_report/cmd_line
new file mode 100644
index 0000000..247ae83
--- /dev/null
+++ b/coverage_report/cmd_line
@@ -0,0 +1 @@
+genhtml coverage/lcov.info -o coverage_report
diff --git a/coverage_report/cubit/index-sort-f.html b/coverage_report/cubit/index-sort-f.html
new file mode 100644
index 0000000..2ff87b7
--- /dev/null
+++ b/coverage_report/cubit/index-sort-f.html
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+ LCOV - lcov.info - cubit
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
+
+
|
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+ File  |
+ Line Coverage  |
+ Function Coverage  |
+
+
+ | Rate |
+ Total |
+ Hit |
+ Rate |
+ Total |
+ Hit |
+
+
+ | restaurant_cubit.dart |
+
+
+ |
+ 94.4 % |
+ 18 |
+ 17 |
+ - |
+ |
+ |
+
+
+ | restaurant_state.dart |
+
+
+ |
+ 45.5 % |
+ 33 |
+ 15 |
+ - |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/cubit/index-sort-l.html b/coverage_report/cubit/index-sort-l.html
new file mode 100644
index 0000000..f350ba9
--- /dev/null
+++ b/coverage_report/cubit/index-sort-l.html
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+ LCOV - lcov.info - cubit
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
+
+
|
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+ File  |
+ Line Coverage  |
+ Function Coverage  |
+
+
+ | Rate |
+ Total |
+ Hit |
+ Rate |
+ Total |
+ Hit |
+
+
+ | restaurant_state.dart |
+
+
+ |
+ 45.5 % |
+ 33 |
+ 15 |
+ - |
+ |
+ |
+
+
+ | restaurant_cubit.dart |
+
+
+ |
+ 94.4 % |
+ 18 |
+ 17 |
+ - |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/cubit/index.html b/coverage_report/cubit/index.html
new file mode 100644
index 0000000..111a966
--- /dev/null
+++ b/coverage_report/cubit/index.html
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+ LCOV - lcov.info - cubit
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
+
+
|
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+ File  |
+ Line Coverage  |
+ Function Coverage  |
+
+
+ | Rate |
+ Total |
+ Hit |
+ Rate |
+ Total |
+ Hit |
+
+
+ | restaurant_cubit.dart |
+
+
+ |
+ 94.4 % |
+ 18 |
+ 17 |
+ - |
+ |
+ |
+
+
+ | restaurant_state.dart |
+
+
+ |
+ 45.5 % |
+ 33 |
+ 15 |
+ - |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/cubit/restaurant_cubit.dart.func-c.html b/coverage_report/cubit/restaurant_cubit.dart.func-c.html
new file mode 100644
index 0000000..e758734
--- /dev/null
+++ b/coverage_report/cubit/restaurant_cubit.dart.func-c.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - cubit/restaurant_cubit.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/cubit/restaurant_cubit.dart.func.html b/coverage_report/cubit/restaurant_cubit.dart.func.html
new file mode 100644
index 0000000..c2fc654
--- /dev/null
+++ b/coverage_report/cubit/restaurant_cubit.dart.func.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - cubit/restaurant_cubit.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/cubit/restaurant_cubit.dart.gcov.html b/coverage_report/cubit/restaurant_cubit.dart.gcov.html
new file mode 100644
index 0000000..fc0b223
--- /dev/null
+++ b/coverage_report/cubit/restaurant_cubit.dart.gcov.html
@@ -0,0 +1,130 @@
+
+
+
+
+
+
+ LCOV - lcov.info - cubit/restaurant_cubit.dart
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+
+
+ Line data Source code
+
+ 1 : import 'package:bloc/bloc.dart';
+ 2 : import 'package:equatable/equatable.dart';
+ 3 : import 'package:flutter/material.dart';
+ 4 : import 'package:restaurant_tour/models/restaurant.dart';
+ 5 :
+ 6 : import '../usecases/fetch_restaurants.dart';
+ 7 :
+ 8 : part 'restaurant_state.dart';
+ 9 :
+ 10 : class RestaurantCubit extends Cubit<RestaurantState> {
+ 11 1 : RestaurantCubit(this.fetchRestaurantsUseCase)
+ 12 1 : : super(const RestaurantInitial(favoriteRestaurants: []));
+ 13 : final FetchRestaurants fetchRestaurantsUseCase;
+ 14 :
+ 15 1 : Future<void> fetchRestaurants() async {
+ 16 1 : emit(const LoadingRestaurantsState(favoriteRestaurants: []));
+ 17 : RestaurantQueryResult? result =
+ 18 2 : await fetchRestaurantsUseCase.getRestaurants();
+ 19 : List<String> favoriteRestaurants =
+ 20 2 : await fetchRestaurantsUseCase.getFavoriteRestaurants();
+ 21 : if (result != null) {
+ 22 1 : emit(
+ 23 1 : RestaurantsLoadedState(
+ 24 : result: result,
+ 25 : favoriteRestaurants: favoriteRestaurants,
+ 26 : ),
+ 27 : );
+ 28 : } else {
+ 29 1 : emit(
+ 30 : const ErrorState(
+ 31 : message:
+ 32 : 'The server encountered a problem and we couldn\'t load the list.',
+ 33 : favoriteRestaurants: [],
+ 34 : ),
+ 35 : );
+ 36 : }
+ 37 : }
+ 38 :
+ 39 1 : Future<void> favoriteAResturant(String id) async {
+ 40 3 : final favoriteRestaurants = List<String>.from(state.favoriteRestaurants);
+ 41 1 : if (favoriteRestaurants.contains(id)) {
+ 42 1 : favoriteRestaurants.remove(id);
+ 43 : } else {
+ 44 0 : favoriteRestaurants.add(id);
+ 45 : }
+ 46 : // await fetchRestaurantsUseCase.saveFavoriteRestaurants(favoriteRestaurants);
+ 47 1 : emit(
+ 48 1 : FavoriteRestaurantState(
+ 49 2 : result: state.result!,
+ 50 1 : favoriteRestaurants: List.of(favoriteRestaurants),
+ 51 : ),
+ 52 : );
+ 53 : }
+ 54 : }
+
+ |
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/cubit/restaurant_state.dart.func-c.html b/coverage_report/cubit/restaurant_state.dart.func-c.html
new file mode 100644
index 0000000..314155a
--- /dev/null
+++ b/coverage_report/cubit/restaurant_state.dart.func-c.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - cubit/restaurant_state.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/cubit/restaurant_state.dart.func.html b/coverage_report/cubit/restaurant_state.dart.func.html
new file mode 100644
index 0000000..cfa8a32
--- /dev/null
+++ b/coverage_report/cubit/restaurant_state.dart.func.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - cubit/restaurant_state.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/cubit/restaurant_state.dart.gcov.html b/coverage_report/cubit/restaurant_state.dart.gcov.html
new file mode 100644
index 0000000..f80c546
--- /dev/null
+++ b/coverage_report/cubit/restaurant_state.dart.gcov.html
@@ -0,0 +1,180 @@
+
+
+
+
+
+
+ LCOV - lcov.info - cubit/restaurant_state.dart
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+
+
+ Line data Source code
+
+ 1 : // ignore_for_file: overridden_fields
+ 2 :
+ 3 : part of 'restaurant_cubit.dart';
+ 4 :
+ 5 : @immutable
+ 6 : abstract class RestaurantState extends Equatable {
+ 7 : final List<String> favoriteRestaurants;
+ 8 : final RestaurantQueryResult? result;
+ 9 :
+ 10 7 : const RestaurantState({
+ 11 : required this.favoriteRestaurants,
+ 12 : this.result,
+ 13 : });
+ 14 :
+ 15 : RestaurantState copyWith({List<String>? favoriteRestaurants});
+ 16 1 : @override
+ 17 2 : List<Object?> get props => [favoriteRestaurants];
+ 18 : }
+ 19 :
+ 20 : class RestaurantInitial extends RestaurantState {
+ 21 3 : const RestaurantInitial({required super.favoriteRestaurants});
+ 22 :
+ 23 0 : @override
+ 24 : RestaurantState copyWith({List<String>? favoriteRestaurants}) {
+ 25 0 : return RestaurantInitial(
+ 26 0 : favoriteRestaurants: favoriteRestaurants ?? this.favoriteRestaurants,
+ 27 : );
+ 28 : }
+ 29 : }
+ 30 :
+ 31 : class LoadingRestaurantsState extends RestaurantState {
+ 32 5 : const LoadingRestaurantsState({required super.favoriteRestaurants});
+ 33 :
+ 34 1 : @override
+ 35 2 : List<Object?> get props => [favoriteRestaurants];
+ 36 :
+ 37 0 : @override
+ 38 : RestaurantState copyWith({List<String>? favoriteRestaurants}) {
+ 39 0 : return LoadingRestaurantsState(
+ 40 0 : favoriteRestaurants: favoriteRestaurants ?? this.favoriteRestaurants,
+ 41 : );
+ 42 : }
+ 43 : }
+ 44 :
+ 45 : class RestaurantsLoadedState extends RestaurantState {
+ 46 2 : const RestaurantsLoadedState({
+ 47 : required this.result,
+ 48 : required super.favoriteRestaurants,
+ 49 : });
+ 50 :
+ 51 : @override
+ 52 : final RestaurantQueryResult result;
+ 53 :
+ 54 1 : @override
+ 55 3 : List<Object?> get props => [result, favoriteRestaurants];
+ 56 :
+ 57 0 : @override
+ 58 : RestaurantsLoadedState copyWith({List<String>? favoriteRestaurants}) {
+ 59 0 : return RestaurantsLoadedState(
+ 60 0 : favoriteRestaurants: favoriteRestaurants ?? this.favoriteRestaurants,
+ 61 0 : result: result,
+ 62 : );
+ 63 : }
+ 64 : }
+ 65 :
+ 66 : class FavoriteRestaurantState extends RestaurantState {
+ 67 : @override
+ 68 : final RestaurantQueryResult result;
+ 69 : @override
+ 70 : final List<String> favoriteRestaurants;
+ 71 :
+ 72 1 : const FavoriteRestaurantState({
+ 73 : required this.result,
+ 74 : required this.favoriteRestaurants,
+ 75 1 : }) : super(favoriteRestaurants: favoriteRestaurants, result: result);
+ 76 1 : @override
+ 77 2 : List<Object?> get props => [favoriteRestaurants];
+ 78 :
+ 79 0 : @override
+ 80 : FavoriteRestaurantState copyWith({List<String>? favoriteRestaurants}) {
+ 81 0 : return FavoriteRestaurantState(
+ 82 0 : favoriteRestaurants: favoriteRestaurants ?? this.favoriteRestaurants,
+ 83 0 : result: result,
+ 84 : );
+ 85 : }
+ 86 : }
+ 87 :
+ 88 : class ErrorState extends RestaurantState {
+ 89 : final String message;
+ 90 :
+ 91 4 : const ErrorState({
+ 92 : required super.favoriteRestaurants,
+ 93 : super.result,
+ 94 : required this.message,
+ 95 : });
+ 96 :
+ 97 0 : @override
+ 98 : RestaurantState copyWith({List<String>? favoriteRestaurants}) {
+ 99 0 : return ErrorState(
+ 100 0 : favoriteRestaurants: favoriteRestaurants ?? this.favoriteRestaurants,
+ 101 0 : message: message,
+ 102 : );
+ 103 : }
+ 104 : }
+
+ |
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/emerald.png b/coverage_report/emerald.png
new file mode 100644
index 0000000..38ad4f4
Binary files /dev/null and b/coverage_report/emerald.png differ
diff --git a/coverage_report/gcov.css b/coverage_report/gcov.css
new file mode 100644
index 0000000..6c23ba9
--- /dev/null
+++ b/coverage_report/gcov.css
@@ -0,0 +1,1101 @@
+/* All views: initial background and text color */
+body
+{
+ color: #000000;
+ background-color: #ffffff;
+}
+
+/* All views: standard link format*/
+a:link
+{
+ color: #284fa8;
+ text-decoration: underline;
+}
+
+/* All views: standard link - visited format */
+a:visited
+{
+ color: #00cb40;
+ text-decoration: underline;
+}
+
+/* All views: standard link - activated format */
+a:active
+{
+ color: #ff0040;
+ text-decoration: underline;
+}
+
+/* All views: main title format */
+td.title
+{
+ text-align: center;
+ padding-bottom: 10px;
+ font-family: sans-serif;
+ font-size: 20pt;
+ font-style: italic;
+ font-weight: bold;
+}
+/* "Line coverage date bins" leader */
+td.subTableHeader
+{
+ text-align: center;
+ padding-bottom: 6px;
+ font-family: sans-serif;
+ font-weight: bold;
+ vertical-align: center;
+}
+
+/* All views: header item format */
+td.headerItem
+{
+ text-align: right;
+ padding-right: 6px;
+ font-family: sans-serif;
+ font-weight: bold;
+ vertical-align: top;
+ white-space: nowrap;
+}
+
+/* All views: header item value format */
+td.headerValue
+{
+ text-align: left;
+ color: #284fa8;
+ font-family: sans-serif;
+ font-weight: bold;
+ white-space: nowrap;
+}
+
+/* All views: header item coverage table heading */
+td.headerCovTableHead
+{
+ text-align: center;
+ padding-right: 6px;
+ padding-left: 6px;
+ padding-bottom: 0px;
+ font-family: sans-serif;
+ white-space: nowrap;
+}
+
+/* All views: header item coverage table entry */
+td.headerCovTableEntry
+{
+ text-align: right;
+ color: #284fa8;
+ font-family: sans-serif;
+ font-weight: bold;
+ white-space: nowrap;
+ padding-left: 12px;
+ padding-right: 4px;
+ background-color: #dae7fe;
+}
+
+/* All views: header item coverage table entry for high coverage rate */
+td.headerCovTableEntryHi
+{
+ text-align: right;
+ color: #000000;
+ font-family: sans-serif;
+ font-weight: bold;
+ white-space: nowrap;
+ padding-left: 12px;
+ padding-right: 4px;
+ background-color: #a7fc9d;
+}
+
+/* All views: header item coverage table entry for medium coverage rate */
+td.headerCovTableEntryMed
+{
+ text-align: right;
+ color: #000000;
+ font-family: sans-serif;
+ font-weight: bold;
+ white-space: nowrap;
+ padding-left: 12px;
+ padding-right: 4px;
+ background-color: #ffea20;
+}
+
+/* All views: header item coverage table entry for ow coverage rate */
+td.headerCovTableEntryLo
+{
+ text-align: right;
+ color: #000000;
+ font-family: sans-serif;
+ font-weight: bold;
+ white-space: nowrap;
+ padding-left: 12px;
+ padding-right: 4px;
+ background-color: #ff0000;
+}
+
+/* All views: header legend value for legend entry */
+td.headerValueLeg
+{
+ text-align: left;
+ color: #000000;
+ font-family: sans-serif;
+ font-size: 80%;
+ white-space: nowrap;
+ padding-top: 4px;
+}
+
+/* All views: color of horizontal ruler */
+td.ruler
+{
+ background-color: #6688d4;
+}
+
+/* All views: version string format */
+td.versionInfo
+{
+ text-align: center;
+ padding-top: 2px;
+ font-family: sans-serif;
+ font-style: italic;
+}
+
+/* Directory view/File view (all)/Test case descriptions:
+ table headline format */
+td.tableHead
+{
+ text-align: center;
+ color: #ffffff;
+ background-color: #6688d4;
+ font-family: sans-serif;
+ font-size: 120%;
+ font-weight: bold;
+ white-space: nowrap;
+ padding-left: 4px;
+ padding-right: 4px;
+}
+
+span.tableHeadSort
+{
+ padding-right: 4px;
+}
+
+/* Directory view/File view (all): filename entry format */
+td.coverFile
+{
+ text-align: left;
+ padding-left: 10px;
+ padding-right: 20px;
+ color: #284fa8;
+ background-color: #dae7fe;
+ font-family: monospace;
+}
+
+/* Directory view/File view (all): directory name entry format */
+td.coverDirectory
+{
+ text-align: left;
+ padding-left: 10px;
+ padding-right: 20px;
+ color: #284fa8;
+ background-color: #b8d0ff;
+ font-family: monospace;
+}
+
+/* Directory view/File view (all): filename entry format */
+td.overallOwner
+{
+ text-align: center;
+ font-weight: bold;
+ font-family: sans-serif;
+ background-color: #dae7fe;
+ padding-right: 10px;
+ padding-left: 10px;
+}
+
+/* Directory view/File view (all): filename entry format */
+td.ownerName
+{
+ text-align: right;
+ font-style: italic;
+ font-family: sans-serif;
+ background-color: #E5DBDB;
+ padding-right: 10px;
+ padding-left: 20px;
+}
+
+/* Directory view/File view (all): bar-graph entry format*/
+td.coverBar
+{
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #dae7fe;
+}
+
+/* Directory view/File view (all): bar-graph entry format*/
+td.owner_coverBar
+{
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #E5DBDB;
+}
+
+/* Directory view/File view (all): bar-graph outline color */
+td.coverBarOutline
+{
+ background-color: #000000;
+}
+
+/* Directory view/File view (all): percentage entry for files with
+ high coverage rate */
+td.coverPerHi
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #a7fc9d;
+ font-weight: bold;
+ font-family: sans-serif;
+}
+
+/* 'owner' entry: slightly lighter color than 'coverPerHi' */
+td.owner_coverPerHi
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #82E0AA;
+ font-weight: bold;
+ font-family: sans-serif;
+}
+
+/* Directory view/File view (all): line count entry */
+td.coverNumDflt
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #dae7fe;
+ white-space: nowrap;
+ font-family: sans-serif;
+}
+
+/* td background color and font for the 'owner' section of the table */
+td.ownerTla
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #E5DBDB;
+ white-space: nowrap;
+ font-family: sans-serif;
+ font-style: italic;
+}
+
+/* Directory view/File view (all): line count entry for files with
+ high coverage rate */
+td.coverNumHi
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #a7fc9d;
+ white-space: nowrap;
+ font-family: sans-serif;
+}
+
+td.owner_coverNumHi
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #82E0AA;
+ white-space: nowrap;
+ font-family: sans-serif;
+}
+
+/* Directory view/File view (all): percentage entry for files with
+ medium coverage rate */
+td.coverPerMed
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #ffea20;
+ font-weight: bold;
+ font-family: sans-serif;
+}
+
+td.owner_coverPerMed
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #F9E79F;
+ font-weight: bold;
+ font-family: sans-serif;
+}
+
+/* Directory view/File view (all): line count entry for files with
+ medium coverage rate */
+td.coverNumMed
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #ffea20;
+ white-space: nowrap;
+ font-family: sans-serif;
+}
+
+td.owner_coverNumMed
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #F9E79F;
+ white-space: nowrap;
+ font-family: sans-serif;
+}
+
+/* Directory view/File view (all): percentage entry for files with
+ low coverage rate */
+td.coverPerLo
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #ff0000;
+ font-weight: bold;
+ font-family: sans-serif;
+}
+
+td.owner_coverPerLo
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #EC7063;
+ font-weight: bold;
+ font-family: sans-serif;
+}
+
+/* Directory view/File view (all): line count entry for files with
+ low coverage rate */
+td.coverNumLo
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #ff0000;
+ white-space: nowrap;
+ font-family: sans-serif;
+}
+
+td.owner_coverNumLo
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #EC7063;
+ white-space: nowrap;
+ font-family: sans-serif;
+}
+
+/* File view (all): "show/hide details" link format */
+a.detail:link
+{
+ color: #b8d0ff;
+ font-size:80%;
+}
+
+/* File view (all): "show/hide details" link - visited format */
+a.detail:visited
+{
+ color: #b8d0ff;
+ font-size:80%;
+}
+
+/* File view (all): "show/hide details" link - activated format */
+a.detail:active
+{
+ color: #ffffff;
+ font-size:80%;
+}
+
+/* File view (detail): test name entry */
+td.testName
+{
+ text-align: right;
+ padding-right: 10px;
+ background-color: #dae7fe;
+ font-family: sans-serif;
+}
+
+/* File view (detail): test percentage entry */
+td.testPer
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #dae7fe;
+ font-family: sans-serif;
+}
+
+/* File view (detail): test lines count entry */
+td.testNum
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #dae7fe;
+ font-family: sans-serif;
+}
+
+/* Test case descriptions: test name format*/
+dt
+{
+ font-family: sans-serif;
+ font-weight: bold;
+}
+
+/* Test case descriptions: description table body */
+td.testDescription
+{
+ padding-top: 10px;
+ padding-left: 30px;
+ padding-bottom: 10px;
+ padding-right: 30px;
+ background-color: #dae7fe;
+}
+
+/* Source code view: function entry */
+td.coverFn
+{
+ text-align: left;
+ padding-left: 10px;
+ padding-right: 20px;
+ color: #284fa8;
+ background-color: #dae7fe;
+ font-family: monospace;
+}
+
+/* Source code view: function entry zero count*/
+td.coverFnLo
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #ff0000;
+ font-weight: bold;
+ font-family: sans-serif;
+}
+
+/* Source code view: function entry nonzero count*/
+td.coverFnHi
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #dae7fe;
+ font-weight: bold;
+ font-family: sans-serif;
+}
+
+td.coverFnAlias
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 20px;
+ color: #284fa8;
+ /* make this a slightly different color than the leader - otherwise,
+ otherwise the alias is hard to distinguish in the table */
+ background-color: #E5DBDB; /* very light pale grey/blue */
+ font-family: monospace;
+}
+
+/* Source code view: function entry zero count*/
+td.coverFnAliasLo
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #EC7063; /* lighter red */
+ font-family: sans-serif;
+}
+
+/* Source code view: function entry nonzero count*/
+td.coverFnAliasHi
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #dae7fe;
+ font-weight: bold;
+ font-family: sans-serif;
+}
+
+/* Source code view: source code format */
+pre.source
+{
+ font-family: monospace;
+ white-space: pre;
+ margin-top: 2px;
+}
+
+/* elided/removed code */
+span.elidedSource
+{
+ font-family: sans-serif;
+ /*font-size: 8pt; */
+ font-style: italic;
+ background-color: lightgrey;
+}
+
+/* Source code view: line number format */
+span.lineNum
+{
+ background-color: #efe383;
+}
+
+/* Source code view: line number format when there are deleted
+ lines in the corresponding location */
+span.lineNumWithDelete
+{
+ foreground-color: #efe383;
+ background-color: lightgrey;
+}
+
+/* Source code view: format for Cov legend */
+span.coverLegendCov
+{
+ padding-left: 10px;
+ padding-right: 10px;
+ padding-bottom: 2px;
+ background-color: #cad7fe;
+}
+
+/* Source code view: format for NoCov legend */
+span.coverLegendNoCov
+{
+ padding-left: 10px;
+ padding-right: 10px;
+ padding-bottom: 2px;
+ background-color: #ff6230;
+}
+
+/* Source code view: format for the source code heading line */
+pre.sourceHeading
+{
+ white-space: pre;
+ font-family: monospace;
+ font-weight: bold;
+ margin: 0px;
+}
+
+/* All views: header legend value for low rate */
+td.headerValueLegL
+{
+ font-family: sans-serif;
+ text-align: center;
+ white-space: nowrap;
+ padding-left: 4px;
+ padding-right: 2px;
+ background-color: #ff0000;
+ font-size: 80%;
+}
+
+/* All views: header legend value for med rate */
+td.headerValueLegM
+{
+ font-family: sans-serif;
+ text-align: center;
+ white-space: nowrap;
+ padding-left: 2px;
+ padding-right: 2px;
+ background-color: #ffea20;
+ font-size: 80%;
+}
+
+/* All views: header legend value for hi rate */
+td.headerValueLegH
+{
+ font-family: sans-serif;
+ text-align: center;
+ white-space: nowrap;
+ padding-left: 2px;
+ padding-right: 4px;
+ background-color: #a7fc9d;
+ font-size: 80%;
+}
+
+/* All views except source code view: legend format for low coverage */
+span.coverLegendCovLo
+{
+ padding-left: 10px;
+ padding-right: 10px;
+ padding-top: 2px;
+ background-color: #ff0000;
+}
+
+/* All views except source code view: legend format for med coverage */
+span.coverLegendCovMed
+{
+ padding-left: 10px;
+ padding-right: 10px;
+ padding-top: 2px;
+ background-color: #ffea20;
+}
+
+/* All views except source code view: legend format for hi coverage */
+span.coverLegendCovHi
+{
+ padding-left: 10px;
+ padding-right: 10px;
+ padding-top: 2px;
+ background-color: #a7fc9d;
+}
+
+a.branchTla:link
+{
+ color: #000000;
+}
+
+a.branchTla:visited
+{
+ color: #000000;
+}
+
+/* Source code view/table entry background: format for lines classified as "Uncovered New Code (+ => 0):
+Newly added code is not tested" */
+td.tlaUNC
+{
+ text-align: right;
+ background-color: #FF6230;
+}
+td.tlaBgUNC {
+ background-color: #FF6230;
+}
+
+/* Source code view/table entry background: format for lines classified as "Uncovered New Code (+ => 0):
+Newly added code is not tested" */
+span.tlaUNC
+{
+ text-align: left;
+ background-color: #FF6230;
+}
+span.tlaBgUNC {
+ background-color: #FF6230;
+}
+a.tlaBgUNC {
+ background-color: #FF6230;
+ color: #000000;
+}
+
+td.headerCovTableHeadUNC {
+ text-align: center;
+ padding-right: 6px;
+ padding-left: 6px;
+ padding-bottom: 0px;
+ font-family: sans-serif;
+ white-space: nowrap;
+ background-color: #FF6230;
+}
+
+/* Source code view/table entry background: format for lines classified as "Lost Baseline Coverage (1 => 0):
+Unchanged code is no longer tested" */
+td.tlaLBC
+{
+ text-align: right;
+ background-color: #FF6230;
+}
+td.tlaBgLBC {
+ background-color: #FF6230;
+}
+
+/* Source code view/table entry background: format for lines classified as "Lost Baseline Coverage (1 => 0):
+Unchanged code is no longer tested" */
+span.tlaLBC
+{
+ text-align: left;
+ background-color: #FF6230;
+}
+span.tlaBgLBC {
+ background-color: #FF6230;
+}
+a.tlaBgLBC {
+ background-color: #FF6230;
+ color: #000000;
+}
+
+td.headerCovTableHeadLBC {
+ text-align: center;
+ padding-right: 6px;
+ padding-left: 6px;
+ padding-bottom: 0px;
+ font-family: sans-serif;
+ white-space: nowrap;
+ background-color: #FF6230;
+}
+
+/* Source code view/table entry background: format for lines classified as "Uncovered Included Code (# => 0):
+Previously unused code is untested" */
+td.tlaUIC
+{
+ text-align: right;
+ background-color: #FF6230;
+}
+td.tlaBgUIC {
+ background-color: #FF6230;
+}
+
+/* Source code view/table entry background: format for lines classified as "Uncovered Included Code (# => 0):
+Previously unused code is untested" */
+span.tlaUIC
+{
+ text-align: left;
+ background-color: #FF6230;
+}
+span.tlaBgUIC {
+ background-color: #FF6230;
+}
+a.tlaBgUIC {
+ background-color: #FF6230;
+ color: #000000;
+}
+
+td.headerCovTableHeadUIC {
+ text-align: center;
+ padding-right: 6px;
+ padding-left: 6px;
+ padding-bottom: 0px;
+ font-family: sans-serif;
+ white-space: nowrap;
+ background-color: #FF6230;
+}
+
+/* Source code view/table entry background: format for lines classified as "Uncovered Baseline Code (0 => 0):
+Unchanged code was untested before, is untested now" */
+td.tlaUBC
+{
+ text-align: right;
+ background-color: #FF6230;
+}
+td.tlaBgUBC {
+ background-color: #FF6230;
+}
+
+/* Source code view/table entry background: format for lines classified as "Uncovered Baseline Code (0 => 0):
+Unchanged code was untested before, is untested now" */
+span.tlaUBC
+{
+ text-align: left;
+ background-color: #FF6230;
+}
+span.tlaBgUBC {
+ background-color: #FF6230;
+}
+a.tlaBgUBC {
+ background-color: #FF6230;
+ color: #000000;
+}
+
+td.headerCovTableHeadUBC {
+ text-align: center;
+ padding-right: 6px;
+ padding-left: 6px;
+ padding-bottom: 0px;
+ font-family: sans-serif;
+ white-space: nowrap;
+ background-color: #FF6230;
+}
+
+/* Source code view/table entry background: format for lines classified as "Gained Baseline Coverage (0 => 1):
+Unchanged code is tested now" */
+td.tlaGBC
+{
+ text-align: right;
+ background-color: #CAD7FE;
+}
+td.tlaBgGBC {
+ background-color: #CAD7FE;
+}
+
+/* Source code view/table entry background: format for lines classified as "Gained Baseline Coverage (0 => 1):
+Unchanged code is tested now" */
+span.tlaGBC
+{
+ text-align: left;
+ background-color: #CAD7FE;
+}
+span.tlaBgGBC {
+ background-color: #CAD7FE;
+}
+a.tlaBgGBC {
+ background-color: #CAD7FE;
+ color: #000000;
+}
+
+td.headerCovTableHeadGBC {
+ text-align: center;
+ padding-right: 6px;
+ padding-left: 6px;
+ padding-bottom: 0px;
+ font-family: sans-serif;
+ white-space: nowrap;
+ background-color: #CAD7FE;
+}
+
+/* Source code view/table entry background: format for lines classified as "Gained Included Coverage (# => 1):
+Previously unused code is tested now" */
+td.tlaGIC
+{
+ text-align: right;
+ background-color: #CAD7FE;
+}
+td.tlaBgGIC {
+ background-color: #CAD7FE;
+}
+
+/* Source code view/table entry background: format for lines classified as "Gained Included Coverage (# => 1):
+Previously unused code is tested now" */
+span.tlaGIC
+{
+ text-align: left;
+ background-color: #CAD7FE;
+}
+span.tlaBgGIC {
+ background-color: #CAD7FE;
+}
+a.tlaBgGIC {
+ background-color: #CAD7FE;
+ color: #000000;
+}
+
+td.headerCovTableHeadGIC {
+ text-align: center;
+ padding-right: 6px;
+ padding-left: 6px;
+ padding-bottom: 0px;
+ font-family: sans-serif;
+ white-space: nowrap;
+ background-color: #CAD7FE;
+}
+
+/* Source code view/table entry background: format for lines classified as "Gained New Coverage (+ => 1):
+Newly added code is tested" */
+td.tlaGNC
+{
+ text-align: right;
+ background-color: #CAD7FE;
+}
+td.tlaBgGNC {
+ background-color: #CAD7FE;
+}
+
+/* Source code view/table entry background: format for lines classified as "Gained New Coverage (+ => 1):
+Newly added code is tested" */
+span.tlaGNC
+{
+ text-align: left;
+ background-color: #CAD7FE;
+}
+span.tlaBgGNC {
+ background-color: #CAD7FE;
+}
+a.tlaBgGNC {
+ background-color: #CAD7FE;
+ color: #000000;
+}
+
+td.headerCovTableHeadGNC {
+ text-align: center;
+ padding-right: 6px;
+ padding-left: 6px;
+ padding-bottom: 0px;
+ font-family: sans-serif;
+ white-space: nowrap;
+ background-color: #CAD7FE;
+}
+
+/* Source code view/table entry background: format for lines classified as "Covered Baseline Code (1 => 1):
+Unchanged code was tested before and is still tested" */
+td.tlaCBC
+{
+ text-align: right;
+ background-color: #CAD7FE;
+}
+td.tlaBgCBC {
+ background-color: #CAD7FE;
+}
+
+/* Source code view/table entry background: format for lines classified as "Covered Baseline Code (1 => 1):
+Unchanged code was tested before and is still tested" */
+span.tlaCBC
+{
+ text-align: left;
+ background-color: #CAD7FE;
+}
+span.tlaBgCBC {
+ background-color: #CAD7FE;
+}
+a.tlaBgCBC {
+ background-color: #CAD7FE;
+ color: #000000;
+}
+
+td.headerCovTableHeadCBC {
+ text-align: center;
+ padding-right: 6px;
+ padding-left: 6px;
+ padding-bottom: 0px;
+ font-family: sans-serif;
+ white-space: nowrap;
+ background-color: #CAD7FE;
+}
+
+/* Source code view/table entry background: format for lines classified as "Excluded Uncovered Baseline (0 => #):
+Previously untested code is unused now" */
+td.tlaEUB
+{
+ text-align: right;
+ background-color: #FFFFFF;
+}
+td.tlaBgEUB {
+ background-color: #FFFFFF;
+}
+
+/* Source code view/table entry background: format for lines classified as "Excluded Uncovered Baseline (0 => #):
+Previously untested code is unused now" */
+span.tlaEUB
+{
+ text-align: left;
+ background-color: #FFFFFF;
+}
+span.tlaBgEUB {
+ background-color: #FFFFFF;
+}
+a.tlaBgEUB {
+ background-color: #FFFFFF;
+ color: #000000;
+}
+
+td.headerCovTableHeadEUB {
+ text-align: center;
+ padding-right: 6px;
+ padding-left: 6px;
+ padding-bottom: 0px;
+ font-family: sans-serif;
+ white-space: nowrap;
+ background-color: #FFFFFF;
+}
+
+/* Source code view/table entry background: format for lines classified as "Excluded Covered Baseline (1 => #):
+Previously tested code is unused now" */
+td.tlaECB
+{
+ text-align: right;
+ background-color: #FFFFFF;
+}
+td.tlaBgECB {
+ background-color: #FFFFFF;
+}
+
+/* Source code view/table entry background: format for lines classified as "Excluded Covered Baseline (1 => #):
+Previously tested code is unused now" */
+span.tlaECB
+{
+ text-align: left;
+ background-color: #FFFFFF;
+}
+span.tlaBgECB {
+ background-color: #FFFFFF;
+}
+a.tlaBgECB {
+ background-color: #FFFFFF;
+ color: #000000;
+}
+
+td.headerCovTableHeadECB {
+ text-align: center;
+ padding-right: 6px;
+ padding-left: 6px;
+ padding-bottom: 0px;
+ font-family: sans-serif;
+ white-space: nowrap;
+ background-color: #FFFFFF;
+}
+
+/* Source code view/table entry background: format for lines classified as "Deleted Uncovered Baseline (0 => -):
+Previously untested code has been deleted" */
+td.tlaDUB
+{
+ text-align: right;
+ background-color: #FFFFFF;
+}
+td.tlaBgDUB {
+ background-color: #FFFFFF;
+}
+
+/* Source code view/table entry background: format for lines classified as "Deleted Uncovered Baseline (0 => -):
+Previously untested code has been deleted" */
+span.tlaDUB
+{
+ text-align: left;
+ background-color: #FFFFFF;
+}
+span.tlaBgDUB {
+ background-color: #FFFFFF;
+}
+a.tlaBgDUB {
+ background-color: #FFFFFF;
+ color: #000000;
+}
+
+td.headerCovTableHeadDUB {
+ text-align: center;
+ padding-right: 6px;
+ padding-left: 6px;
+ padding-bottom: 0px;
+ font-family: sans-serif;
+ white-space: nowrap;
+ background-color: #FFFFFF;
+}
+
+/* Source code view/table entry background: format for lines classified as "Deleted Covered Baseline (1 => -):
+Previously tested code has been deleted" */
+td.tlaDCB
+{
+ text-align: right;
+ background-color: #FFFFFF;
+}
+td.tlaBgDCB {
+ background-color: #FFFFFF;
+}
+
+/* Source code view/table entry background: format for lines classified as "Deleted Covered Baseline (1 => -):
+Previously tested code has been deleted" */
+span.tlaDCB
+{
+ text-align: left;
+ background-color: #FFFFFF;
+}
+span.tlaBgDCB {
+ background-color: #FFFFFF;
+}
+a.tlaBgDCB {
+ background-color: #FFFFFF;
+ color: #000000;
+}
+
+td.headerCovTableHeadDCB {
+ text-align: center;
+ padding-right: 6px;
+ padding-left: 6px;
+ padding-bottom: 0px;
+ font-family: sans-serif;
+ white-space: nowrap;
+ background-color: #FFFFFF;
+}
+
+/* Source code view: format for date/owner bin that is not hit */
+span.missBins
+{
+ background-color: #ff0000 /* red */
+}
diff --git a/coverage_report/glass.png b/coverage_report/glass.png
new file mode 100644
index 0000000..e1abc00
Binary files /dev/null and b/coverage_report/glass.png differ
diff --git a/coverage_report/index-sort-f.html b/coverage_report/index-sort-f.html
new file mode 100644
index 0000000..1aab820
--- /dev/null
+++ b/coverage_report/index-sort-f.html
@@ -0,0 +1,201 @@
+
+
+
+
+
+
+ LCOV - lcov.info
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
+
+
|
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+ Directory  |
+ Line Coverage  |
+ Function Coverage  |
+
+
+ | Rate |
+ Total |
+ Hit |
+ Rate |
+ Total |
+ Hit |
+
+
+ | cubit/ |
+
+
+ |
+ 62.7 % |
+ 51 |
+ 32 |
+ - |
+ |
+ |
+
+
+ | datasources/ |
+
+
+ |
+ 90.0 % |
+ 10 |
+ 9 |
+ - |
+ |
+ |
+
+
+ | models/ |
+
+
+ |
+ 61.5 % |
+ 104 |
+ 64 |
+ - |
+ |
+ |
+
+
+ | network/ |
+
+
+ |
+ 80.0 % |
+ 5 |
+ 4 |
+ - |
+ |
+ |
+
+
+ | pages/ |
+
+
+ |
+ 45.0 % |
+ 131 |
+ 59 |
+ - |
+ |
+ |
+
+
+ | repositories/ |
+
+
+ |
+ 75.0 % |
+ 8 |
+ 6 |
+ - |
+ |
+ |
+
+
+ | usecases/ |
+
+
+ |
+ 0.0 % |
+ 9 |
+ |
+ - |
+ |
+ |
+
+
+ | utils/ |
+
+
+ |
+ 0.0 % |
+ 4 |
+ |
+ - |
+ |
+ |
+
+
+ | widgets/ |
+
+
+ |
+ 44.9 % |
+ 107 |
+ 48 |
+ - |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/index-sort-l.html b/coverage_report/index-sort-l.html
new file mode 100644
index 0000000..c8e439e
--- /dev/null
+++ b/coverage_report/index-sort-l.html
@@ -0,0 +1,201 @@
+
+
+
+
+
+
+ LCOV - lcov.info
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
+
+
|
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+ Directory  |
+ Line Coverage  |
+ Function Coverage  |
+
+
+ | Rate |
+ Total |
+ Hit |
+ Rate |
+ Total |
+ Hit |
+
+
+ | utils/ |
+
+
+ |
+ 0.0 % |
+ 4 |
+ |
+ - |
+ |
+ |
+
+
+ | usecases/ |
+
+
+ |
+ 0.0 % |
+ 9 |
+ |
+ - |
+ |
+ |
+
+
+ | widgets/ |
+
+
+ |
+ 44.9 % |
+ 107 |
+ 48 |
+ - |
+ |
+ |
+
+
+ | pages/ |
+
+
+ |
+ 45.0 % |
+ 131 |
+ 59 |
+ - |
+ |
+ |
+
+
+ | models/ |
+
+
+ |
+ 61.5 % |
+ 104 |
+ 64 |
+ - |
+ |
+ |
+
+
+ | cubit/ |
+
+
+ |
+ 62.7 % |
+ 51 |
+ 32 |
+ - |
+ |
+ |
+
+
+ | repositories/ |
+
+
+ |
+ 75.0 % |
+ 8 |
+ 6 |
+ - |
+ |
+ |
+
+
+ | network/ |
+
+
+ |
+ 80.0 % |
+ 5 |
+ 4 |
+ - |
+ |
+ |
+
+
+ | datasources/ |
+
+
+ |
+ 90.0 % |
+ 10 |
+ 9 |
+ - |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/index.html b/coverage_report/index.html
new file mode 100644
index 0000000..5a9109e
--- /dev/null
+++ b/coverage_report/index.html
@@ -0,0 +1,201 @@
+
+
+
+
+
+
+ LCOV - lcov.info
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
+
+
|
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+ Directory  |
+ Line Coverage  |
+ Function Coverage  |
+
+
+ | Rate |
+ Total |
+ Hit |
+ Rate |
+ Total |
+ Hit |
+
+
+ | cubit/ |
+
+
+ |
+ 62.7 % |
+ 51 |
+ 32 |
+ - |
+ |
+ |
+
+
+ | datasources/ |
+
+
+ |
+ 90.0 % |
+ 10 |
+ 9 |
+ - |
+ |
+ |
+
+
+ | models/ |
+
+
+ |
+ 61.5 % |
+ 104 |
+ 64 |
+ - |
+ |
+ |
+
+
+ | network/ |
+
+
+ |
+ 80.0 % |
+ 5 |
+ 4 |
+ - |
+ |
+ |
+
+
+ | pages/ |
+
+
+ |
+ 45.0 % |
+ 131 |
+ 59 |
+ - |
+ |
+ |
+
+
+ | repositories/ |
+
+
+ |
+ 75.0 % |
+ 8 |
+ 6 |
+ - |
+ |
+ |
+
+
+ | usecases/ |
+
+
+ |
+ 0.0 % |
+ 9 |
+ |
+ - |
+ |
+ |
+
+
+ | utils/ |
+
+
+ |
+ 0.0 % |
+ 4 |
+ |
+ - |
+ |
+ |
+
+
+ | widgets/ |
+
+
+ |
+ 44.9 % |
+ 107 |
+ 48 |
+ - |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/models/index-sort-f.html b/coverage_report/models/index-sort-f.html
new file mode 100644
index 0000000..1ecbf9e
--- /dev/null
+++ b/coverage_report/models/index-sort-f.html
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+ LCOV - lcov.info - models
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
+
+
|
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+ File  |
+ Line Coverage  |
+ Function Coverage  |
+
+
+ | Rate |
+ Total |
+ Hit |
+ Rate |
+ Total |
+ Hit |
+
+
+ | restaurant.dart |
+
+
+ |
+ 70.6 % |
+ 34 |
+ 24 |
+ - |
+ |
+ |
+
+
+ | restaurant.g.dart |
+
+
+ |
+ 57.1 % |
+ 70 |
+ 40 |
+ - |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/models/index-sort-l.html b/coverage_report/models/index-sort-l.html
new file mode 100644
index 0000000..545c4a7
--- /dev/null
+++ b/coverage_report/models/index-sort-l.html
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+ LCOV - lcov.info - models
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
+
+
|
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+ File  |
+ Line Coverage  |
+ Function Coverage  |
+
+
+ | Rate |
+ Total |
+ Hit |
+ Rate |
+ Total |
+ Hit |
+
+
+ | restaurant.g.dart |
+
+
+ |
+ 57.1 % |
+ 70 |
+ 40 |
+ - |
+ |
+ |
+
+
+ | restaurant.dart |
+
+
+ |
+ 70.6 % |
+ 34 |
+ 24 |
+ - |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/models/index.html b/coverage_report/models/index.html
new file mode 100644
index 0000000..b4e6223
--- /dev/null
+++ b/coverage_report/models/index.html
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+ LCOV - lcov.info - models
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
+
+
|
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+ File  |
+ Line Coverage  |
+ Function Coverage  |
+
+
+ | Rate |
+ Total |
+ Hit |
+ Rate |
+ Total |
+ Hit |
+
+
+ | restaurant.dart |
+
+
+ |
+ 70.6 % |
+ 34 |
+ 24 |
+ - |
+ |
+ |
+
+
+ | restaurant.g.dart |
+
+
+ |
+ 57.1 % |
+ 70 |
+ 40 |
+ - |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/models/restaurant.dart.func-c.html b/coverage_report/models/restaurant.dart.func-c.html
new file mode 100644
index 0000000..c4982fb
--- /dev/null
+++ b/coverage_report/models/restaurant.dart.func-c.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - models/restaurant.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/models/restaurant.dart.func.html b/coverage_report/models/restaurant.dart.func.html
new file mode 100644
index 0000000..0fb3e27
--- /dev/null
+++ b/coverage_report/models/restaurant.dart.func.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - models/restaurant.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/models/restaurant.dart.gcov.html b/coverage_report/models/restaurant.dart.gcov.html
new file mode 100644
index 0000000..165dc05
--- /dev/null
+++ b/coverage_report/models/restaurant.dart.gcov.html
@@ -0,0 +1,233 @@
+
+
+
+
+
+
+ LCOV - lcov.info - models/restaurant.dart
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+
+
+ Line data Source code
+
+ 1 : import 'package:json_annotation/json_annotation.dart';
+ 2 :
+ 3 : part 'restaurant.g.dart';
+ 4 :
+ 5 : @JsonSerializable()
+ 6 : class Category {
+ 7 : final String? alias;
+ 8 : final String? title;
+ 9 :
+ 10 2 : Category({
+ 11 : this.alias,
+ 12 : this.title,
+ 13 : });
+ 14 :
+ 15 2 : factory Category.fromJson(Map<String, dynamic> json) =>
+ 16 2 : _$CategoryFromJson(json);
+ 17 :
+ 18 0 : Map<String, dynamic> toJson() => _$CategoryToJson(this);
+ 19 : }
+ 20 :
+ 21 : @JsonSerializable()
+ 22 : class Hours {
+ 23 : @JsonKey(name: 'is_open_now')
+ 24 : final bool? isOpenNow;
+ 25 :
+ 26 2 : const Hours({
+ 27 : this.isOpenNow,
+ 28 : });
+ 29 :
+ 30 4 : factory Hours.fromJson(Map<String, dynamic> json) => _$HoursFromJson(json);
+ 31 :
+ 32 0 : Map<String, dynamic> toJson() => _$HoursToJson(this);
+ 33 : }
+ 34 :
+ 35 : @JsonSerializable()
+ 36 : class User {
+ 37 : final String? id;
+ 38 : @JsonKey(name: 'image_url')
+ 39 : final String? imageUrl;
+ 40 : final String? name;
+ 41 :
+ 42 2 : const User({
+ 43 : this.id,
+ 44 : this.imageUrl,
+ 45 : this.name,
+ 46 : });
+ 47 :
+ 48 4 : factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);
+ 49 :
+ 50 0 : Map<String, dynamic> toJson() => _$UserToJson(this);
+ 51 : }
+ 52 :
+ 53 : @JsonSerializable()
+ 54 : class Review {
+ 55 : final String? id;
+ 56 : final int? rating;
+ 57 : final String? text;
+ 58 : final User? user;
+ 59 :
+ 60 2 : const Review({
+ 61 : this.id,
+ 62 : this.rating,
+ 63 : this.user,
+ 64 : this.text,
+ 65 : });
+ 66 :
+ 67 4 : factory Review.fromJson(Map<String, dynamic> json) => _$ReviewFromJson(json);
+ 68 :
+ 69 0 : Map<String, dynamic> toJson() => _$ReviewToJson(this);
+ 70 : }
+ 71 :
+ 72 : @JsonSerializable()
+ 73 : class Location {
+ 74 : @JsonKey(name: 'formatted_address')
+ 75 : final String? formattedAddress;
+ 76 :
+ 77 2 : Location({
+ 78 : this.formattedAddress,
+ 79 : });
+ 80 :
+ 81 2 : factory Location.fromJson(Map<String, dynamic> json) =>
+ 82 2 : _$LocationFromJson(json);
+ 83 :
+ 84 0 : Map<String, dynamic> toJson() => _$LocationToJson(this);
+ 85 : }
+ 86 :
+ 87 : @JsonSerializable()
+ 88 : class Restaurant {
+ 89 : final String? id;
+ 90 : final String? name;
+ 91 : final String? price;
+ 92 : final double? rating;
+ 93 : final List<String>? photos;
+ 94 : final List<Category>? categories;
+ 95 : final List<Hours>? hours;
+ 96 : final List<Review>? reviews;
+ 97 : final Location? location;
+ 98 :
+ 99 2 : const Restaurant({
+ 100 : this.id,
+ 101 : this.name,
+ 102 : this.price,
+ 103 : this.rating,
+ 104 : this.photos,
+ 105 : this.categories,
+ 106 : this.hours,
+ 107 : this.reviews,
+ 108 : this.location,
+ 109 : });
+ 110 :
+ 111 2 : factory Restaurant.fromJson(Map<String, dynamic> json) =>
+ 112 2 : _$RestaurantFromJson(json);
+ 113 :
+ 114 0 : Map<String, dynamic> toJson() => _$RestaurantToJson(this);
+ 115 :
+ 116 : /// Use the first category for the category shown to the user
+ 117 0 : String get displayCategory {
+ 118 0 : if (categories != null && categories!.isNotEmpty) {
+ 119 0 : return categories!.first.title ?? '';
+ 120 : }
+ 121 : return '';
+ 122 : }
+ 123 :
+ 124 : /// Use the first image as the image shown to the user
+ 125 1 : String get heroImage {
+ 126 3 : if (photos != null && photos!.isNotEmpty) {
+ 127 2 : return photos!.first;
+ 128 : }
+ 129 : return '';
+ 130 : }
+ 131 :
+ 132 : /// This logic is probably not correct in all cases but it is ok
+ 133 : /// for this application
+ 134 1 : bool get isOpen {
+ 135 3 : if (hours != null && hours!.isNotEmpty) {
+ 136 3 : return hours!.first.isOpenNow ?? false;
+ 137 : }
+ 138 : return false;
+ 139 : }
+ 140 : }
+ 141 :
+ 142 : @JsonSerializable()
+ 143 : class RestaurantQueryResult {
+ 144 : final int? total;
+ 145 : @JsonKey(name: 'business')
+ 146 : final List<Restaurant>? restaurants;
+ 147 :
+ 148 2 : const RestaurantQueryResult({
+ 149 : this.total,
+ 150 : this.restaurants,
+ 151 : });
+ 152 :
+ 153 2 : factory RestaurantQueryResult.fromJson(Map<String, dynamic> json) =>
+ 154 2 : _$RestaurantQueryResultFromJson(json);
+ 155 :
+ 156 0 : Map<String, dynamic> toJson() => _$RestaurantQueryResultToJson(this);
+ 157 : }
+
+ |
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/models/restaurant.g.dart.func-c.html b/coverage_report/models/restaurant.g.dart.func-c.html
new file mode 100644
index 0000000..ba92530
--- /dev/null
+++ b/coverage_report/models/restaurant.g.dart.func-c.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - models/restaurant.g.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/models/restaurant.g.dart.func.html b/coverage_report/models/restaurant.g.dart.func.html
new file mode 100644
index 0000000..a90fe0b
--- /dev/null
+++ b/coverage_report/models/restaurant.g.dart.func.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - models/restaurant.g.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/models/restaurant.g.dart.gcov.html b/coverage_report/models/restaurant.g.dart.gcov.html
new file mode 100644
index 0000000..acaf7b1
--- /dev/null
+++ b/coverage_report/models/restaurant.g.dart.gcov.html
@@ -0,0 +1,186 @@
+
+
+
+
+
+
+ LCOV - lcov.info - models/restaurant.g.dart
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+
+
+ Line data Source code
+
+ 1 : // GENERATED CODE - DO NOT MODIFY BY HAND
+ 2 :
+ 3 : part of 'restaurant.dart';
+ 4 :
+ 5 : // **************************************************************************
+ 6 : // JsonSerializableGenerator
+ 7 : // **************************************************************************
+ 8 :
+ 9 4 : Category _$CategoryFromJson(Map<String, dynamic> json) => Category(
+ 10 2 : alias: json['alias'] as String?,
+ 11 2 : title: json['title'] as String?,
+ 12 : );
+ 13 :
+ 14 0 : Map<String, dynamic> _$CategoryToJson(Category instance) => <String, dynamic>{
+ 15 0 : 'alias': instance.alias,
+ 16 0 : 'title': instance.title,
+ 17 : };
+ 18 :
+ 19 4 : Hours _$HoursFromJson(Map<String, dynamic> json) => Hours(
+ 20 2 : isOpenNow: json['is_open_now'] as bool?,
+ 21 : );
+ 22 :
+ 23 0 : Map<String, dynamic> _$HoursToJson(Hours instance) => <String, dynamic>{
+ 24 0 : 'is_open_now': instance.isOpenNow,
+ 25 : };
+ 26 :
+ 27 4 : User _$UserFromJson(Map<String, dynamic> json) => User(
+ 28 2 : id: json['id'] as String?,
+ 29 2 : imageUrl: json['image_url'] as String?,
+ 30 2 : name: json['name'] as String?,
+ 31 : );
+ 32 :
+ 33 0 : Map<String, dynamic> _$UserToJson(User instance) => <String, dynamic>{
+ 34 0 : 'id': instance.id,
+ 35 0 : 'image_url': instance.imageUrl,
+ 36 0 : 'name': instance.name,
+ 37 : };
+ 38 :
+ 39 4 : Review _$ReviewFromJson(Map<String, dynamic> json) => Review(
+ 40 2 : id: json['id'] as String?,
+ 41 2 : rating: json['rating'] as int?,
+ 42 2 : text: json['text'] as String?,
+ 43 2 : user: json['user'] == null
+ 44 : ? null
+ 45 4 : : User.fromJson(json['user'] as Map<String, dynamic>),
+ 46 : );
+ 47 :
+ 48 0 : Map<String, dynamic> _$ReviewToJson(Review instance) => <String, dynamic>{
+ 49 0 : 'id': instance.id,
+ 50 0 : 'rating': instance.rating,
+ 51 0 : 'user': instance.user,
+ 52 : };
+ 53 :
+ 54 4 : Location _$LocationFromJson(Map<String, dynamic> json) => Location(
+ 55 2 : formattedAddress: json['formatted_address'] as String?,
+ 56 : );
+ 57 :
+ 58 0 : Map<String, dynamic> _$LocationToJson(Location instance) => <String, dynamic>{
+ 59 0 : 'formatted_address': instance.formattedAddress,
+ 60 : };
+ 61 :
+ 62 4 : Restaurant _$RestaurantFromJson(Map<String, dynamic> json) => Restaurant(
+ 63 2 : id: json['id'] as String?,
+ 64 2 : name: json['name'] as String?,
+ 65 2 : price: json['price'] as String?,
+ 66 4 : rating: (json['rating'] as num?)?.toDouble(),
+ 67 : photos:
+ 68 8 : (json['photos'] as List<dynamic>?)?.map((e) => e as String).toList(),
+ 69 2 : categories: (json['categories'] as List<dynamic>?)
+ 70 6 : ?.map((e) => Category.fromJson(e as Map<String, dynamic>))
+ 71 2 : .toList(),
+ 72 2 : hours: (json['hours'] as List<dynamic>?)
+ 73 6 : ?.map((e) => Hours.fromJson(e as Map<String, dynamic>))
+ 74 2 : .toList(),
+ 75 2 : reviews: (json['reviews'] as List<dynamic>?)
+ 76 6 : ?.map((e) => Review.fromJson(e as Map<String, dynamic>))
+ 77 2 : .toList(),
+ 78 2 : location: json['location'] == null
+ 79 : ? null
+ 80 4 : : Location.fromJson(json['location'] as Map<String, dynamic>),
+ 81 : );
+ 82 :
+ 83 0 : Map<String, dynamic> _$RestaurantToJson(Restaurant instance) =>
+ 84 0 : <String, dynamic>{
+ 85 0 : 'id': instance.id,
+ 86 0 : 'name': instance.name,
+ 87 0 : 'price': instance.price,
+ 88 0 : 'rating': instance.rating,
+ 89 0 : 'photos': instance.photos,
+ 90 0 : 'categories': instance.categories,
+ 91 0 : 'hours': instance.hours,
+ 92 0 : 'reviews': instance.reviews,
+ 93 0 : 'location': instance.location,
+ 94 : };
+ 95 :
+ 96 2 : RestaurantQueryResult _$RestaurantQueryResultFromJson(
+ 97 : Map<String, dynamic> json) =>
+ 98 2 : RestaurantQueryResult(
+ 99 2 : total: json['total'] as int?,
+ 100 2 : restaurants: (json['business'] as List<dynamic>?)
+ 101 6 : ?.map((e) => Restaurant.fromJson(e as Map<String, dynamic>))
+ 102 2 : .toList(),
+ 103 : );
+ 104 :
+ 105 0 : Map<String, dynamic> _$RestaurantQueryResultToJson(
+ 106 : RestaurantQueryResult instance) =>
+ 107 0 : <String, dynamic>{
+ 108 0 : 'total': instance.total,
+ 109 0 : 'business': instance.restaurants,
+ 110 : };
+
+ |
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/pages/home_page.dart.func-c.html b/coverage_report/pages/home_page.dart.func-c.html
new file mode 100644
index 0000000..14dfed4
--- /dev/null
+++ b/coverage_report/pages/home_page.dart.func-c.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - pages/home_page.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/pages/home_page.dart.func.html b/coverage_report/pages/home_page.dart.func.html
new file mode 100644
index 0000000..3423b0d
--- /dev/null
+++ b/coverage_report/pages/home_page.dart.func.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - pages/home_page.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/pages/home_page.dart.gcov.html b/coverage_report/pages/home_page.dart.gcov.html
new file mode 100644
index 0000000..83da089
--- /dev/null
+++ b/coverage_report/pages/home_page.dart.gcov.html
@@ -0,0 +1,149 @@
+
+
+
+
+
+
+ LCOV - lcov.info - pages/home_page.dart
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+
+
+ Line data Source code
+
+ 1 : import 'package:flutter/material.dart';
+ 2 : import 'package:restaurant_tour/pages/favorites_list_page_view.dart';
+ 3 : import 'package:restaurant_tour/pages/restaurant_list_page.dart';
+ 4 :
+ 5 : // class HomePageBlocProvider extends StatelessWidget {
+ 6 : // const HomePageBlocProvider({super.key});
+ 7 :
+ 8 : // @override
+ 9 : // Widget build(BuildContext context) {
+ 10 : // return BlocProvider(
+ 11 : // create: (context) =>
+ 12 : // GetIt.instance<RestaurantCubit>()..fetchRestaurants(),
+ 13 : // child: const HomePage(),
+ 14 : // );
+ 15 : // }
+ 16 : // }
+ 17 :
+ 18 : class HomePage extends StatelessWidget {
+ 19 1 : const HomePage({super.key});
+ 20 :
+ 21 1 : @override
+ 22 : Widget build(BuildContext context) {
+ 23 1 : return DefaultTabController(
+ 24 : length: 2,
+ 25 1 : child: Scaffold(
+ 26 1 : appBar: AppBar(
+ 27 1 : title: Text(
+ 28 : "RestauranTour",
+ 29 3 : style: Theme.of(context).textTheme.headlineLarge,
+ 30 : ),
+ 31 1 : actions: [
+ 32 1 : Padding(
+ 33 : padding: const EdgeInsets.only(right: 16),
+ 34 1 : child: TextButton(
+ 35 0 : onPressed: () {},
+ 36 : child: const CircleAvatar(
+ 37 : backgroundImage: NetworkImage(
+ 38 : 'https://mdbcdn.b-cdn.net/img/new/avatars/2.webp',
+ 39 : ),
+ 40 : ),
+ 41 : ),
+ 42 : ),
+ 43 : ],
+ 44 1 : bottom: TabBar(
+ 45 1 : tabs: [
+ 46 1 : Tab(
+ 47 1 : child: Text(
+ 48 : 'All restaurants',
+ 49 3 : style: Theme.of(context).textTheme.displayLarge,
+ 50 : ),
+ 51 : ),
+ 52 1 : Tab(
+ 53 1 : child: Text(
+ 54 : 'My favorites',
+ 55 3 : style: Theme.of(context).textTheme.displayLarge,
+ 56 : ),
+ 57 : ),
+ 58 : ],
+ 59 : ),
+ 60 : ),
+ 61 : body: const SafeArea(
+ 62 : minimum: EdgeInsets.all(16),
+ 63 : child: TabBarView(
+ 64 : children: [
+ 65 : RestaurantListPageView(),
+ 66 : FavoritesListPageView(),
+ 67 : ],
+ 68 : ),
+ 69 : ),
+ 70 : ),
+ 71 : );
+ 72 : }
+ 73 : }
+
+ |
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/pages/index-sort-f.html b/coverage_report/pages/index-sort-f.html
new file mode 100644
index 0000000..8afb46b
--- /dev/null
+++ b/coverage_report/pages/index-sort-f.html
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+ LCOV - lcov.info - pages
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/pages/index-sort-l.html b/coverage_report/pages/index-sort-l.html
new file mode 100644
index 0000000..97ccc27
--- /dev/null
+++ b/coverage_report/pages/index-sort-l.html
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+ LCOV - lcov.info - pages
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/pages/index.html b/coverage_report/pages/index.html
new file mode 100644
index 0000000..98e3690
--- /dev/null
+++ b/coverage_report/pages/index.html
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+ LCOV - lcov.info - pages
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/pages/restaurant_detail_page.dart.func-c.html b/coverage_report/pages/restaurant_detail_page.dart.func-c.html
new file mode 100644
index 0000000..06a464a
--- /dev/null
+++ b/coverage_report/pages/restaurant_detail_page.dart.func-c.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - pages/restaurant_detail_page.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/pages/restaurant_detail_page.dart.func.html b/coverage_report/pages/restaurant_detail_page.dart.func.html
new file mode 100644
index 0000000..ea89c17
--- /dev/null
+++ b/coverage_report/pages/restaurant_detail_page.dart.func.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - pages/restaurant_detail_page.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/pages/restaurant_detail_page.dart.gcov.html b/coverage_report/pages/restaurant_detail_page.dart.gcov.html
new file mode 100644
index 0000000..5ed64c1
--- /dev/null
+++ b/coverage_report/pages/restaurant_detail_page.dart.gcov.html
@@ -0,0 +1,177 @@
+
+
+
+
+
+
+ LCOV - lcov.info - pages/restaurant_detail_page.dart
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+
+
+ Line data Source code
+
+ 1 : import 'package:flutter/material.dart';
+ 2 : import 'package:restaurant_tour/models/restaurant.dart';
+ 3 : import 'package:restaurant_tour/widgets/widgets.dart';
+ 4 : import '../theme/text.dart';
+ 5 : import '../widgets/appbar.dart';
+ 6 :
+ 7 : class RestaurantDetailPage extends StatelessWidget {
+ 8 0 : const RestaurantDetailPage({super.key, required this.restaurant});
+ 9 : final Restaurant restaurant;
+ 10 0 : @override
+ 11 : Widget build(BuildContext context) {
+ 12 0 : return Scaffold(
+ 13 0 : appBar: RestaurantDetailAppBar(
+ 14 0 : restaurant: restaurant,
+ 15 : ),
+ 16 0 : body: SafeArea(
+ 17 0 : child: LayoutBuilder(
+ 18 0 : builder: (BuildContext context, BoxConstraints constraints) {
+ 19 0 : return SingleChildScrollView(
+ 20 0 : child: Column(
+ 21 0 : children: [
+ 22 0 : HeroImageWidget(
+ 23 0 : restaurant: restaurant,
+ 24 0 : width: constraints.maxWidth,
+ 25 0 : height: constraints.maxHeight * 0.4,
+ 26 : ),
+ 27 0 : Padding(
+ 28 : padding: const EdgeInsets.all(24),
+ 29 0 : child: Column(
+ 30 : mainAxisAlignment: MainAxisAlignment.start,
+ 31 : crossAxisAlignment: CrossAxisAlignment.start,
+ 32 0 : children: [
+ 33 0 : BuildCategoryStatusRow(restaurant: restaurant),
+ 34 : const SizedBox(
+ 35 : height: spacingXL,
+ 36 : ),
+ 37 0 : buildDivider(),
+ 38 : const SizedBox(
+ 39 : height: spacingXL,
+ 40 : ),
+ 41 0 : Text(
+ 42 : 'Address',
+ 43 0 : style: Theme.of(context).textTheme.bodySmall,
+ 44 : textAlign: TextAlign.start,
+ 45 : ),
+ 46 : const SizedBox(
+ 47 : height: spacingXL,
+ 48 : ),
+ 49 0 : Text(
+ 50 0 : restaurant.location?.formattedAddress ??
+ 51 : 'No Address Informed',
+ 52 0 : style: Theme.of(context).textTheme.displayLarge,
+ 53 : ),
+ 54 : const SizedBox(
+ 55 : height: spacingXL,
+ 56 : ),
+ 57 0 : buildDivider(),
+ 58 0 : restaurant.rating != null
+ 59 0 : ? BuildRatingSection(
+ 60 0 : restaurant: restaurant,
+ 61 : )
+ 62 0 : : Container(),
+ 63 : ],
+ 64 : ),
+ 65 : ),
+ 66 : ],
+ 67 : ),
+ 68 : );
+ 69 : },
+ 70 : ),
+ 71 : ),
+ 72 : );
+ 73 : }
+ 74 : }
+ 75 :
+ 76 : class BuildCategoryStatusRow extends StatelessWidget {
+ 77 0 : const BuildCategoryStatusRow({
+ 78 : super.key,
+ 79 : required this.restaurant,
+ 80 : });
+ 81 :
+ 82 : final Restaurant restaurant;
+ 83 :
+ 84 0 : @override
+ 85 : Widget build(BuildContext context) {
+ 86 0 : return Row(
+ 87 : mainAxisSize: MainAxisSize.max,
+ 88 0 : children: [
+ 89 0 : Expanded(
+ 90 0 : child: PriceAndClassificationRowWidget(
+ 91 0 : restaurant: restaurant,
+ 92 : ),
+ 93 : ),
+ 94 : const Spacer(),
+ 95 0 : OpenStatusWidget(
+ 96 0 : isOpen: restaurant.isOpen,
+ 97 : ),
+ 98 : ],
+ 99 : );
+ 100 : }
+ 101 : }
+
+ |
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/pages/restaurant_list_page.dart.func-c.html b/coverage_report/pages/restaurant_list_page.dart.func-c.html
new file mode 100644
index 0000000..6aa2d37
--- /dev/null
+++ b/coverage_report/pages/restaurant_list_page.dart.func-c.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - pages/restaurant_list_page.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/pages/restaurant_list_page.dart.func.html b/coverage_report/pages/restaurant_list_page.dart.func.html
new file mode 100644
index 0000000..4b3d8de
--- /dev/null
+++ b/coverage_report/pages/restaurant_list_page.dart.func.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - pages/restaurant_list_page.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/pages/restaurant_list_page.dart.gcov.html b/coverage_report/pages/restaurant_list_page.dart.gcov.html
new file mode 100644
index 0000000..2b08e61
--- /dev/null
+++ b/coverage_report/pages/restaurant_list_page.dart.gcov.html
@@ -0,0 +1,206 @@
+
+
+
+
+
+
+ LCOV - lcov.info - pages/restaurant_list_page.dart
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+
+
+ Line data Source code
+
+ 1 : import 'package:flutter/material.dart';
+ 2 : import 'package:flutter_bloc/flutter_bloc.dart';
+ 3 : import 'package:restaurant_tour/cubit/cubit.dart';
+ 4 : import 'package:restaurant_tour/models/models.dart';
+ 5 : import '../widgets/widgets.dart';
+ 6 : import 'restaurant_detail_page.dart';
+ 7 :
+ 8 : class RestaurantListPageView extends StatelessWidget {
+ 9 1 : const RestaurantListPageView({super.key});
+ 10 :
+ 11 1 : @override
+ 12 : Widget build(BuildContext context) {
+ 13 1 : return LayoutBuilder(
+ 14 1 : builder: (context, constraints) {
+ 15 1 : return BlocBuilder<RestaurantCubit, RestaurantState>(
+ 16 0 : buildWhen: (previous, current) =>
+ 17 0 : current is LoadingRestaurantsState ||
+ 18 0 : current is RestaurantsLoadedState ||
+ 19 0 : current is ErrorState,
+ 20 1 : builder: (context, state) {
+ 21 1 : if (state is LoadingRestaurantsState) {
+ 22 : return const Center(child: CircularProgressIndicator());
+ 23 1 : } else if (state is ErrorState) {
+ 24 0 : return Center(
+ 25 0 : child: Text(state.message),
+ 26 : );
+ 27 : }
+ 28 1 : if (state is RestaurantsLoadedState ||
+ 29 0 : state is FavoriteRestaurantState) {
+ 30 1 : return ListView.builder(
+ 31 3 : itemCount: state.result!.restaurants?.length,
+ 32 1 : itemBuilder: (BuildContext context, int index) {
+ 33 1 : return Row(
+ 34 : mainAxisAlignment: MainAxisAlignment.spaceEvenly,
+ 35 1 : children: [
+ 36 1 : RestaurantListTile(
+ 37 3 : restaurant: state.result!.restaurants!.elementAt(index),
+ 38 : constraints: constraints,
+ 39 : ),
+ 40 : ],
+ 41 : );
+ 42 : },
+ 43 : );
+ 44 : }
+ 45 0 : return Container();
+ 46 : },
+ 47 : );
+ 48 : },
+ 49 : );
+ 50 : }
+ 51 : }
+ 52 :
+ 53 : class RestaurantListTile extends StatelessWidget {
+ 54 1 : const RestaurantListTile({
+ 55 : super.key,
+ 56 : required this.restaurant,
+ 57 : required this.constraints,
+ 58 : });
+ 59 : final Restaurant restaurant;
+ 60 : final BoxConstraints constraints;
+ 61 :
+ 62 1 : @override
+ 63 : Widget build(BuildContext context) {
+ 64 1 : return GestureDetector(
+ 65 0 : onTap: () {
+ 66 0 : Navigator.push(
+ 67 : context,
+ 68 0 : MaterialPageRoute(
+ 69 0 : builder: (context) => RestaurantDetailPage(restaurant: restaurant),
+ 70 : ),
+ 71 : );
+ 72 : },
+ 73 1 : child: Container(
+ 74 2 : width: constraints.maxWidth,
+ 75 : margin: const EdgeInsets.only(bottom: 8, top: 8),
+ 76 : padding: const EdgeInsets.all(16),
+ 77 1 : decoration: BoxDecoration(
+ 78 : color: Colors.white,
+ 79 2 : border: Border.all(color: Colors.grey.shade300),
+ 80 1 : borderRadius: BorderRadius.circular(9),
+ 81 1 : boxShadow: [
+ 82 1 : BoxShadow(
+ 83 1 : color: Colors.grey.shade200,
+ 84 : blurRadius: 3,
+ 85 : offset: const Offset(0, 2),
+ 86 : ),
+ 87 : ],
+ 88 : ),
+ 89 1 : child: Row(
+ 90 1 : children: [
+ 91 1 : Column(
+ 92 1 : children: [
+ 93 1 : HeroImageWidget(
+ 94 1 : restaurant: restaurant,
+ 95 : width: 90,
+ 96 : height: 90,
+ 97 : borderRadius: 9.0,
+ 98 : ),
+ 99 : ],
+ 100 : ),
+ 101 : const Spacer(
+ 102 : flex: 1,
+ 103 : ),
+ 104 1 : Flexible(
+ 105 : flex: 10,
+ 106 1 : child: Column(
+ 107 : mainAxisAlignment: MainAxisAlignment.start,
+ 108 : crossAxisAlignment: CrossAxisAlignment.start,
+ 109 1 : children: [
+ 110 1 : Text(
+ 111 2 : restaurant.name ?? '',
+ 112 : maxLines: 2,
+ 113 : ),
+ 114 : const SizedBox(
+ 115 : height: 10,
+ 116 : ),
+ 117 2 : PriceAndClassificationRowWidget(restaurant: restaurant),
+ 118 : const SizedBox(
+ 119 : height: 10,
+ 120 : ),
+ 121 2 : RatingAndOpenStatusWidget(restaurant: restaurant)
+ 122 : ],
+ 123 : ),
+ 124 : ),
+ 125 : ],
+ 126 : ),
+ 127 : ),
+ 128 : );
+ 129 : }
+ 130 : }
+
+ |
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/repositories/index-sort-f.html b/coverage_report/repositories/index-sort-f.html
new file mode 100644
index 0000000..1667bde
--- /dev/null
+++ b/coverage_report/repositories/index-sort-f.html
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+ LCOV - lcov.info - repositories
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
+
+
|
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+ File  |
+ Line Coverage  |
+ Function Coverage  |
+
+
+ | Rate |
+ Total |
+ Hit |
+ Rate |
+ Total |
+ Hit |
+
+
+ | yelp_repository.dart |
+
+
+ |
+ 75.0 % |
+ 8 |
+ 6 |
+ - |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/repositories/index-sort-l.html b/coverage_report/repositories/index-sort-l.html
new file mode 100644
index 0000000..e064664
--- /dev/null
+++ b/coverage_report/repositories/index-sort-l.html
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+ LCOV - lcov.info - repositories
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
+
+
|
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+ File  |
+ Line Coverage  |
+ Function Coverage  |
+
+
+ | Rate |
+ Total |
+ Hit |
+ Rate |
+ Total |
+ Hit |
+
+
+ | yelp_repository.dart |
+
+
+ |
+ 75.0 % |
+ 8 |
+ 6 |
+ - |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/repositories/index.html b/coverage_report/repositories/index.html
new file mode 100644
index 0000000..c5e84b7
--- /dev/null
+++ b/coverage_report/repositories/index.html
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+ LCOV - lcov.info - repositories
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
+
+
|
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+ File  |
+ Line Coverage  |
+ Function Coverage  |
+
+
+ | Rate |
+ Total |
+ Hit |
+ Rate |
+ Total |
+ Hit |
+
+
+ | yelp_repository.dart |
+
+
+ |
+ 75.0 % |
+ 8 |
+ 6 |
+ - |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/repositories/yelp_repository.dart.func-c.html b/coverage_report/repositories/yelp_repository.dart.func-c.html
new file mode 100644
index 0000000..aaefd16
--- /dev/null
+++ b/coverage_report/repositories/yelp_repository.dart.func-c.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - repositories/yelp_repository.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/repositories/yelp_repository.dart.func.html b/coverage_report/repositories/yelp_repository.dart.func.html
new file mode 100644
index 0000000..d854f87
--- /dev/null
+++ b/coverage_report/repositories/yelp_repository.dart.func.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - repositories/yelp_repository.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/repositories/yelp_repository.dart.gcov.html b/coverage_report/repositories/yelp_repository.dart.gcov.html
new file mode 100644
index 0000000..e4c2139
--- /dev/null
+++ b/coverage_report/repositories/yelp_repository.dart.gcov.html
@@ -0,0 +1,108 @@
+
+
+
+
+
+
+ LCOV - lcov.info - repositories/yelp_repository.dart
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+
+
+ Line data Source code
+
+ 1 : import 'dart:developer';
+ 2 : import 'package:restaurant_tour/datasources/yielp_datasource.dart';
+ 3 : import 'package:restaurant_tour/models/restaurant.dart';
+ 4 : import 'package:restaurant_tour/utils/sample_json.dart';
+ 5 :
+ 6 : class YelpRepository {
+ 7 : final YielpDatasource datasource;
+ 8 :
+ 9 2 : YelpRepository({required this.datasource});
+ 10 :
+ 11 1 : RestaurantQueryResult getRestaurantsFromCache({int offset = 0}) {
+ 12 : try {
+ 13 1 : log('fetching from cache');
+ 14 3 : return RestaurantQueryResult.fromJson(sample['data']['search']);
+ 15 : } catch (e) {
+ 16 0 : throw Exception();
+ 17 : }
+ 18 : }
+ 19 :
+ 20 1 : Future<RestaurantQueryResult?> getRestaurants({int offset = 0}) async {
+ 21 : try {
+ 22 2 : final data = await datasource.fetchRestaurants(offset);
+ 23 : if (data != null) {
+ 24 0 : return RestaurantQueryResult.fromJson(data['data']['search']);
+ 25 : } else {
+ 26 : return null;
+ 27 : }
+ 28 : } catch (e) {
+ 29 : return null;
+ 30 : }
+ 31 : }
+ 32 : }
+
+ |
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/ruby.png b/coverage_report/ruby.png
new file mode 100644
index 0000000..991b6d4
Binary files /dev/null and b/coverage_report/ruby.png differ
diff --git a/coverage_report/snow.png b/coverage_report/snow.png
new file mode 100644
index 0000000..2cdae10
Binary files /dev/null and b/coverage_report/snow.png differ
diff --git a/coverage_report/updown.png b/coverage_report/updown.png
new file mode 100644
index 0000000..aa56a23
Binary files /dev/null and b/coverage_report/updown.png differ
diff --git a/coverage_report/usecases/fetch_restaurants.dart.func-c.html b/coverage_report/usecases/fetch_restaurants.dart.func-c.html
new file mode 100644
index 0000000..01f8565
--- /dev/null
+++ b/coverage_report/usecases/fetch_restaurants.dart.func-c.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - usecases/fetch_restaurants.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/usecases/fetch_restaurants.dart.func.html b/coverage_report/usecases/fetch_restaurants.dart.func.html
new file mode 100644
index 0000000..e1902a5
--- /dev/null
+++ b/coverage_report/usecases/fetch_restaurants.dart.func.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - usecases/fetch_restaurants.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/usecases/fetch_restaurants.dart.gcov.html b/coverage_report/usecases/fetch_restaurants.dart.gcov.html
new file mode 100644
index 0000000..1336ee9
--- /dev/null
+++ b/coverage_report/usecases/fetch_restaurants.dart.gcov.html
@@ -0,0 +1,118 @@
+
+
+
+
+
+
+ LCOV - lcov.info - usecases/fetch_restaurants.dart
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+
+
+ Line data Source code
+
+ 1 : import 'package:restaurant_tour/models/models.dart';
+ 2 : import 'package:restaurant_tour/repositories/yelp_repository.dart';
+ 3 : // import 'package:shared_preferences/shared_preferences.dart';
+ 4 :
+ 5 : class FetchRestaurants {
+ 6 : final YelpRepository repository;
+ 7 :
+ 8 0 : FetchRestaurants({required this.repository});
+ 9 0 : Future<RestaurantQueryResult?> getRestaurants() async => await repository
+ 10 0 : .getRestaurantsFromCache(); //CHANGE THIS LATER TO FETCH FROM THE REAL API
+ 11 :
+ 12 0 : Future<RestaurantQueryResult?> getRestaurantsFromCache() async =>
+ 13 0 : await repository.getRestaurantsFromCache();
+ 14 :
+ 15 0 : Future<List<String>> getFavoriteRestaurants() async {
+ 16 : // final prefs = await SharedPreferences.getInstance();
+ 17 :
+ 18 : // Retrieve the list from SharedPreferences
+ 19 : // List<String>? favoriteRestaurants = prefs.getStringList('fav');
+ 20 :
+ 21 : // Simulate delay
+ 22 0 : await Future.delayed(const Duration(milliseconds: 500));
+ 23 :
+ 24 : // Return the list or a default value if it doesn't exist
+ 25 : // return favoriteRestaurants ?? [];
+ 26 0 : return ['vHz2RLtfUMVRPFmd7VBEHA'];
+ 27 : }
+ 28 :
+ 29 0 : Future<void> saveFavoriteRestaurants(List<String> favoriteRestaurants) async {
+ 30 : // final prefs = await SharedPreferences.getInstance();
+ 31 :
+ 32 : // Save the list to SharedPreferences
+ 33 : // await prefs.setStringList('fav', favoriteRestaurants);
+ 34 : }
+ 35 : }
+ 36 : // Future<List<String>> getFavoriteRestaurants() async {
+ 37 : // //this could be fetched from anywhere later... a shared prefs or another database
+ 38 : // await Future.delayed(const Duration(milliseconds: 500));
+ 39 :
+ 40 : // return ['vHz2RLtfUMVRPFmd7VBEHA'];
+ 41 : // }
+ 42 :
+
+ |
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/usecases/index-sort-f.html b/coverage_report/usecases/index-sort-f.html
new file mode 100644
index 0000000..5c0407b
--- /dev/null
+++ b/coverage_report/usecases/index-sort-f.html
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+ LCOV - lcov.info - usecases
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
+
+
|
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+ File  |
+ Line Coverage  |
+ Function Coverage  |
+
+
+ | Rate |
+ Total |
+ Hit |
+ Rate |
+ Total |
+ Hit |
+
+
+ | fetch_restaurants.dart |
+
+
+ |
+ 0.0 % |
+ 9 |
+ |
+ - |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/usecases/index-sort-l.html b/coverage_report/usecases/index-sort-l.html
new file mode 100644
index 0000000..e9b7f69
--- /dev/null
+++ b/coverage_report/usecases/index-sort-l.html
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+ LCOV - lcov.info - usecases
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
+
+
|
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+ File  |
+ Line Coverage  |
+ Function Coverage  |
+
+
+ | Rate |
+ Total |
+ Hit |
+ Rate |
+ Total |
+ Hit |
+
+
+ | fetch_restaurants.dart |
+
+
+ |
+ 0.0 % |
+ 9 |
+ |
+ - |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/usecases/index.html b/coverage_report/usecases/index.html
new file mode 100644
index 0000000..46682c5
--- /dev/null
+++ b/coverage_report/usecases/index.html
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+ LCOV - lcov.info - usecases
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
+
+
|
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+ File  |
+ Line Coverage  |
+ Function Coverage  |
+
+
+ | Rate |
+ Total |
+ Hit |
+ Rate |
+ Total |
+ Hit |
+
+
+ | fetch_restaurants.dart |
+
+
+ |
+ 0.0 % |
+ 9 |
+ |
+ - |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/utils/get_random_avatar.dart.func-c.html b/coverage_report/utils/get_random_avatar.dart.func-c.html
new file mode 100644
index 0000000..ff5de2b
--- /dev/null
+++ b/coverage_report/utils/get_random_avatar.dart.func-c.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - utils/get_random_avatar.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/utils/get_random_avatar.dart.func.html b/coverage_report/utils/get_random_avatar.dart.func.html
new file mode 100644
index 0000000..b11e9da
--- /dev/null
+++ b/coverage_report/utils/get_random_avatar.dart.func.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - utils/get_random_avatar.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/utils/get_random_avatar.dart.gcov.html b/coverage_report/utils/get_random_avatar.dart.gcov.html
new file mode 100644
index 0000000..6cb5863
--- /dev/null
+++ b/coverage_report/utils/get_random_avatar.dart.gcov.html
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+ LCOV - lcov.info - utils/get_random_avatar.dart
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+
+
+ Line data Source code
+
+ 1 : import 'dart:math';
+ 2 : import 'package:flutter/material.dart';
+ 3 :
+ 4 0 : ImageProvider getRandomAvatar() {
+ 5 : // Lista de avatares
+ 6 0 : final List<String> avatars = [
+ 7 : 'assets/avatars/av1.png',
+ 8 : 'assets/avatars/av2.png',
+ 9 : 'assets/avatars/av3.png',
+ 10 : 'assets/avatars/av4.png',
+ 11 : 'assets/avatars/av5.png',
+ 12 : 'assets/avatars/av6.png',
+ 13 : 'assets/avatars/av7.png',
+ 14 : ];
+ 15 :
+ 16 : // Seleciona um Ãndice aleatório
+ 17 0 : final randomIndex = Random().nextInt(avatars.length);
+ 18 :
+ 19 : // Retorna a imagem correspondente
+ 20 0 : return AssetImage(avatars[randomIndex]);
+ 21 : }
+
+ |
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/utils/index-sort-f.html b/coverage_report/utils/index-sort-f.html
new file mode 100644
index 0000000..44c858c
--- /dev/null
+++ b/coverage_report/utils/index-sort-f.html
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+ LCOV - lcov.info - utils
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
+
+
|
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+ File  |
+ Line Coverage  |
+ Function Coverage  |
+
+
+ | Rate |
+ Total |
+ Hit |
+ Rate |
+ Total |
+ Hit |
+
+
+ | get_random_avatar.dart |
+
+
+ |
+ 0.0 % |
+ 4 |
+ |
+ - |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/utils/index-sort-l.html b/coverage_report/utils/index-sort-l.html
new file mode 100644
index 0000000..c771aa1
--- /dev/null
+++ b/coverage_report/utils/index-sort-l.html
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+ LCOV - lcov.info - utils
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
+
+
|
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+ File  |
+ Line Coverage  |
+ Function Coverage  |
+
+
+ | Rate |
+ Total |
+ Hit |
+ Rate |
+ Total |
+ Hit |
+
+
+ | get_random_avatar.dart |
+
+
+ |
+ 0.0 % |
+ 4 |
+ |
+ - |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/utils/index.html b/coverage_report/utils/index.html
new file mode 100644
index 0000000..8448817
--- /dev/null
+++ b/coverage_report/utils/index.html
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+ LCOV - lcov.info - utils
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
+
+
|
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+ File  |
+ Line Coverage  |
+ Function Coverage  |
+
+
+ | Rate |
+ Total |
+ Hit |
+ Rate |
+ Total |
+ Hit |
+
+
+ | get_random_avatar.dart |
+
+
+ |
+ 0.0 % |
+ 4 |
+ |
+ - |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/appbar.dart.func-c.html b/coverage_report/widgets/appbar.dart.func-c.html
new file mode 100644
index 0000000..3a2faab
--- /dev/null
+++ b/coverage_report/widgets/appbar.dart.func-c.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets/appbar.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/appbar.dart.func.html b/coverage_report/widgets/appbar.dart.func.html
new file mode 100644
index 0000000..7e9b876
--- /dev/null
+++ b/coverage_report/widgets/appbar.dart.func.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets/appbar.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/appbar.dart.gcov.html b/coverage_report/widgets/appbar.dart.gcov.html
new file mode 100644
index 0000000..91c3d47
--- /dev/null
+++ b/coverage_report/widgets/appbar.dart.gcov.html
@@ -0,0 +1,115 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets/appbar.dart
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+
+
+ Line data Source code
+
+ 1 : import 'package:flutter/material.dart';
+ 2 : import 'package:flutter_bloc/flutter_bloc.dart';
+ 3 : import 'package:restaurant_tour/cubit/restaurant_cubit.dart';
+ 4 : import 'package:restaurant_tour/models/restaurant.dart';
+ 5 :
+ 6 : class RestaurantDetailAppBar extends StatelessWidget
+ 7 : implements PreferredSizeWidget {
+ 8 : final Restaurant restaurant;
+ 9 :
+ 10 0 : const RestaurantDetailAppBar({super.key, required this.restaurant});
+ 11 :
+ 12 0 : @override
+ 13 : Widget build(BuildContext context) {
+ 14 : final isFavorite = context
+ 15 0 : .watch<RestaurantCubit>()
+ 16 0 : .state
+ 17 0 : .favoriteRestaurants
+ 18 0 : .contains(restaurant.id);
+ 19 0 : return AppBar(
+ 20 0 : title: Text(restaurant.name ?? ''),
+ 21 0 : actions: [
+ 22 0 : Padding(
+ 23 : padding: const EdgeInsets.only(right: 13.0),
+ 24 0 : child: IconButton(
+ 25 : icon: isFavorite
+ 26 : ? const Icon(Icons.favorite)
+ 27 : : const Icon(Icons.favorite_border_outlined),
+ 28 0 : onPressed: () => context
+ 29 0 : .read<RestaurantCubit>()
+ 30 0 : .favoriteAResturant(restaurant.id!),
+ 31 : ),
+ 32 : ),
+ 33 : ],
+ 34 : );
+ 35 : }
+ 36 :
+ 37 0 : @override
+ 38 : Size get preferredSize => const Size.fromHeight(kToolbarHeight);
+ 39 : }
+
+ |
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/divider.dart.func-c.html b/coverage_report/widgets/divider.dart.func-c.html
new file mode 100644
index 0000000..ec3eb75
--- /dev/null
+++ b/coverage_report/widgets/divider.dart.func-c.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets/divider.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/divider.dart.func.html b/coverage_report/widgets/divider.dart.func.html
new file mode 100644
index 0000000..791682b
--- /dev/null
+++ b/coverage_report/widgets/divider.dart.func.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets/divider.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/divider.dart.gcov.html b/coverage_report/widgets/divider.dart.gcov.html
new file mode 100644
index 0000000..fc2a9b4
--- /dev/null
+++ b/coverage_report/widgets/divider.dart.gcov.html
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets/divider.dart
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+
+
+ Line data Source code
+
+ 1 : import 'package:flutter/material.dart';
+ 2 :
+ 3 0 : Divider buildDivider() {
+ 4 : return const Divider(
+ 5 : thickness: 0.3,
+ 6 : );
+ 7 : }
+
+ |
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/hero_image_widget.dart.func-c.html b/coverage_report/widgets/hero_image_widget.dart.func-c.html
new file mode 100644
index 0000000..42f3d09
--- /dev/null
+++ b/coverage_report/widgets/hero_image_widget.dart.func-c.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets/hero_image_widget.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/hero_image_widget.dart.func.html b/coverage_report/widgets/hero_image_widget.dart.func.html
new file mode 100644
index 0000000..d85ad43
--- /dev/null
+++ b/coverage_report/widgets/hero_image_widget.dart.func.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets/hero_image_widget.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/hero_image_widget.dart.gcov.html b/coverage_report/widgets/hero_image_widget.dart.gcov.html
new file mode 100644
index 0000000..c86672c
--- /dev/null
+++ b/coverage_report/widgets/hero_image_widget.dart.gcov.html
@@ -0,0 +1,118 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets/hero_image_widget.dart
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+
+
+ Line data Source code
+
+ 1 : import 'package:flutter/material.dart';
+ 2 :
+ 3 : import '../models/restaurant.dart';
+ 4 :
+ 5 : class HeroImageWidget extends StatelessWidget {
+ 6 1 : const HeroImageWidget(
+ 7 : {super.key,
+ 8 : required this.restaurant,
+ 9 : this.borderRadius = 0,
+ 10 : required this.width,
+ 11 : required this.height});
+ 12 : final Restaurant restaurant;
+ 13 : final double borderRadius;
+ 14 : final double width;
+ 15 : final double height;
+ 16 1 : @override
+ 17 : Widget build(BuildContext context) {
+ 18 1 : return Hero(
+ 19 3 : tag: restaurant.id.toString(),
+ 20 1 : child: ClipRRect(
+ 21 2 : borderRadius: BorderRadius.circular(borderRadius),
+ 22 3 : child: restaurant.heroImage.isNotEmpty &&
+ 23 5 : Uri.tryParse(restaurant.heroImage)?.isAbsolute == true
+ 24 1 : ? Image.network(
+ 25 2 : restaurant.heroImage,
+ 26 : fit: BoxFit.cover,
+ 27 1 : width: width,
+ 28 1 : height: height,
+ 29 : )
+ 30 0 : : Container(
+ 31 0 : width: width,
+ 32 0 : height: height,
+ 33 : color: const Color.fromARGB(255, 197, 233, 199),
+ 34 0 : child: Image.asset(
+ 35 : 'assets/placeholder.png',
+ 36 : fit: BoxFit.fitHeight,
+ 37 : ),
+ 38 : ),
+ 39 : ),
+ 40 : );
+ 41 : }
+ 42 : }
+
+ |
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/index-sort-f.html b/coverage_report/widgets/index-sort-f.html
new file mode 100644
index 0000000..0f172c1
--- /dev/null
+++ b/coverage_report/widgets/index-sort-f.html
@@ -0,0 +1,189 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/index-sort-l.html b/coverage_report/widgets/index-sort-l.html
new file mode 100644
index 0000000..d9d81e1
--- /dev/null
+++ b/coverage_report/widgets/index-sort-l.html
@@ -0,0 +1,189 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/index.html b/coverage_report/widgets/index.html
new file mode 100644
index 0000000..470ddaf
--- /dev/null
+++ b/coverage_report/widgets/index.html
@@ -0,0 +1,189 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/rataurant_open_status.dart.func-c.html b/coverage_report/widgets/rataurant_open_status.dart.func-c.html
new file mode 100644
index 0000000..00a934d
--- /dev/null
+++ b/coverage_report/widgets/rataurant_open_status.dart.func-c.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets/rataurant_open_status.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/rataurant_open_status.dart.func.html b/coverage_report/widgets/rataurant_open_status.dart.func.html
new file mode 100644
index 0000000..3c5ae88
--- /dev/null
+++ b/coverage_report/widgets/rataurant_open_status.dart.func.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets/rataurant_open_status.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/rataurant_open_status.dart.gcov.html b/coverage_report/widgets/rataurant_open_status.dart.gcov.html
new file mode 100644
index 0000000..543cc8b
--- /dev/null
+++ b/coverage_report/widgets/rataurant_open_status.dart.gcov.html
@@ -0,0 +1,102 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets/rataurant_open_status.dart
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+
+
+ Line data Source code
+
+ 1 : import 'package:flutter/material.dart';
+ 2 :
+ 3 : class OpenStatusWidget extends StatelessWidget {
+ 4 1 : const OpenStatusWidget({super.key, required this.isOpen});
+ 5 : final bool isOpen;
+ 6 1 : @override
+ 7 : Widget build(BuildContext context) {
+ 8 1 : return Row(
+ 9 : mainAxisSize: MainAxisSize.min,
+ 10 1 : children: [
+ 11 1 : Text(
+ 12 1 : isOpen ? 'Open Now' : 'Closed Now',
+ 13 3 : style: Theme.of(context).textTheme.displaySmall,
+ 14 : ),
+ 15 : const SizedBox(
+ 16 : width: 8,
+ 17 : ),
+ 18 1 : Icon(
+ 19 : Icons.circle,
+ 20 : size: 8.0,
+ 21 1 : color: isOpen ? Colors.green : Colors.red,
+ 22 : )
+ 23 : ],
+ 24 : );
+ 25 : }
+ 26 : }
+
+ |
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/rating_and_open_status_widget.dart.func-c.html b/coverage_report/widgets/rating_and_open_status_widget.dart.func-c.html
new file mode 100644
index 0000000..f160466
--- /dev/null
+++ b/coverage_report/widgets/rating_and_open_status_widget.dart.func-c.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets/rating_and_open_status_widget.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/rating_and_open_status_widget.dart.func.html b/coverage_report/widgets/rating_and_open_status_widget.dart.func.html
new file mode 100644
index 0000000..aa9a287
--- /dev/null
+++ b/coverage_report/widgets/rating_and_open_status_widget.dart.func.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets/rating_and_open_status_widget.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/rating_and_open_status_widget.dart.gcov.html b/coverage_report/widgets/rating_and_open_status_widget.dart.gcov.html
new file mode 100644
index 0000000..3bd747b
--- /dev/null
+++ b/coverage_report/widgets/rating_and_open_status_widget.dart.gcov.html
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets/rating_and_open_status_widget.dart
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+
+
+ Line data Source code
+
+ 1 : import 'package:flutter/widgets.dart';
+ 2 :
+ 3 : import '../models/restaurant.dart';
+ 4 : import 'rating_widget.dart';
+ 5 : import 'widgets.dart';
+ 6 :
+ 7 : class RatingAndOpenStatusWidget extends StatelessWidget {
+ 8 1 : const RatingAndOpenStatusWidget({
+ 9 : super.key,
+ 10 : required this.restaurant,
+ 11 : });
+ 12 :
+ 13 : final Restaurant restaurant;
+ 14 :
+ 15 1 : @override
+ 16 : Widget build(BuildContext context) {
+ 17 1 : return Row(
+ 18 1 : children: [
+ 19 1 : StarRating(
+ 20 3 : rating: restaurant.rating?.round() ?? 0,
+ 21 : ),
+ 22 : const Spacer(),
+ 23 1 : OpenStatusWidget(
+ 24 2 : isOpen: restaurant.isOpen,
+ 25 : )
+ 26 : ],
+ 27 : );
+ 28 : }
+ 29 : }
+
+ |
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/rating_widget.dart.func-c.html b/coverage_report/widgets/rating_widget.dart.func-c.html
new file mode 100644
index 0000000..eb096e6
--- /dev/null
+++ b/coverage_report/widgets/rating_widget.dart.func-c.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets/rating_widget.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/rating_widget.dart.func.html b/coverage_report/widgets/rating_widget.dart.func.html
new file mode 100644
index 0000000..cdf239e
--- /dev/null
+++ b/coverage_report/widgets/rating_widget.dart.func.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets/rating_widget.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/rating_widget.dart.gcov.html b/coverage_report/widgets/rating_widget.dart.gcov.html
new file mode 100644
index 0000000..3f30547
--- /dev/null
+++ b/coverage_report/widgets/rating_widget.dart.gcov.html
@@ -0,0 +1,106 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets/rating_widget.dart
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+
+
+ Line data Source code
+
+ 1 : import 'package:flutter/material.dart';
+ 2 :
+ 3 : import '../theme/colors.dart';
+ 4 :
+ 5 : class StarRating extends StatelessWidget {
+ 6 : final int rating;
+ 7 : final double starSize;
+ 8 : final Color starColor;
+ 9 :
+ 10 1 : const StarRating({
+ 11 : super.key,
+ 12 : required this.rating, // Rating should be between 0 to 5
+ 13 : this.starSize = 12.0,
+ 14 : this.starColor = ThemeColors.starColor,
+ 15 3 : }) : assert(rating >= 0 && rating <= 5);
+ 16 :
+ 17 1 : @override
+ 18 : Widget build(BuildContext context) {
+ 19 1 : return Row(
+ 20 : mainAxisSize: MainAxisSize.min,
+ 21 3 : children: List.generate(rating, (index) {
+ 22 1 : return Icon(
+ 23 : Icons.star,
+ 24 1 : size: starSize,
+ 25 1 : color: starColor,
+ 26 : );
+ 27 : }),
+ 28 : );
+ 29 : }
+ 30 : }
+
+ |
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/restaurant_details.dart.func-c.html b/coverage_report/widgets/restaurant_details.dart.func-c.html
new file mode 100644
index 0000000..fe73f6e
--- /dev/null
+++ b/coverage_report/widgets/restaurant_details.dart.func-c.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets/restaurant_details.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/restaurant_details.dart.func.html b/coverage_report/widgets/restaurant_details.dart.func.html
new file mode 100644
index 0000000..644b718
--- /dev/null
+++ b/coverage_report/widgets/restaurant_details.dart.func.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets/restaurant_details.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/restaurant_details.dart.gcov.html b/coverage_report/widgets/restaurant_details.dart.gcov.html
new file mode 100644
index 0000000..a41b462
--- /dev/null
+++ b/coverage_report/widgets/restaurant_details.dart.gcov.html
@@ -0,0 +1,110 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets/restaurant_details.dart
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+
+
+ Line data Source code
+
+ 1 : import 'package:flutter/material.dart';
+ 2 : import 'package:restaurant_tour/models/restaurant.dart';
+ 3 :
+ 4 : class PriceAndClassificationRowWidget extends StatelessWidget {
+ 5 1 : const PriceAndClassificationRowWidget({
+ 6 : super.key,
+ 7 : required this.restaurant,
+ 8 : });
+ 9 :
+ 10 : final Restaurant restaurant;
+ 11 :
+ 12 1 : @override
+ 13 : Widget build(BuildContext context) {
+ 14 1 : return Row(
+ 15 1 : children: [
+ 16 1 : Text(
+ 17 2 : restaurant.price ?? '-',
+ 18 3 : style: Theme.of(context).textTheme.bodySmall,
+ 19 : ),
+ 20 : const SizedBox(
+ 21 : width: 6,
+ 22 : ),
+ 23 1 : Flexible(
+ 24 1 : child: Text(
+ 25 6 : restaurant.categories?.map((element) => element.title).first ?? '',
+ 26 3 : style: Theme.of(context).textTheme.bodySmall,
+ 27 : maxLines: 1,
+ 28 : softWrap: true,
+ 29 : ),
+ 30 : ),
+ 31 : ],
+ 32 : );
+ 33 : }
+ 34 : }
+
+ |
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/restaurant_ratings_review_section.dart.func-c.html b/coverage_report/widgets/restaurant_ratings_review_section.dart.func-c.html
new file mode 100644
index 0000000..e79140a
--- /dev/null
+++ b/coverage_report/widgets/restaurant_ratings_review_section.dart.func-c.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets/restaurant_ratings_review_section.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/restaurant_ratings_review_section.dart.func.html b/coverage_report/widgets/restaurant_ratings_review_section.dart.func.html
new file mode 100644
index 0000000..8e7d4d3
--- /dev/null
+++ b/coverage_report/widgets/restaurant_ratings_review_section.dart.func.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets/restaurant_ratings_review_section.dart - functions
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+ Function Name  |
+
+ Hit count  |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage_report/widgets/restaurant_ratings_review_section.dart.gcov.html b/coverage_report/widgets/restaurant_ratings_review_section.dart.gcov.html
new file mode 100644
index 0000000..517eef7
--- /dev/null
+++ b/coverage_report/widgets/restaurant_ratings_review_section.dart.gcov.html
@@ -0,0 +1,188 @@
+
+
+
+
+
+
+ LCOV - lcov.info - widgets/restaurant_ratings_review_section.dart
+
+
+
+
+
+
+ | LCOV - code coverage report |
+  |
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+  |
+
+ |
+
+
+  |
+
+
+
+
+
|
+
+
+
+ Line data Source code
+
+ 1 : import 'package:flutter/material.dart';
+ 2 : import 'package:restaurant_tour/models/models.dart';
+ 3 : import 'package:restaurant_tour/theme/text.dart';
+ 4 : import 'package:restaurant_tour/utils/get_random_avatar.dart';
+ 5 : import 'package:restaurant_tour/widgets/widgets.dart';
+ 6 : import '../theme/colors.dart';
+ 7 :
+ 8 : class BuildRatingSection extends StatelessWidget {
+ 9 0 : const BuildRatingSection({super.key, required this.restaurant});
+ 10 : final Restaurant restaurant;
+ 11 :
+ 12 0 : @override
+ 13 : Widget build(BuildContext context) {
+ 14 0 : return Column(
+ 15 : crossAxisAlignment: CrossAxisAlignment.start,
+ 16 0 : children: [
+ 17 0 : Text(
+ 18 : 'Overall Rating',
+ 19 0 : style: Theme.of(context).textTheme.bodySmall,
+ 20 : ),
+ 21 : const SizedBox(
+ 22 : height: 16,
+ 23 : ),
+ 24 0 : overallClassificationRow(context),
+ 25 : const SizedBox(
+ 26 : height: spacingXL,
+ 27 : ),
+ 28 0 : buildDivider(),
+ 29 : const SizedBox(
+ 30 : height: spacingXL,
+ 31 : ),
+ 32 0 : Text(
+ 33 0 : '${restaurant.reviews?.length} reviews',
+ 34 0 : style: Theme.of(context).textTheme.bodySmall,
+ 35 : ),
+ 36 : // const SizedBox(
+ 37 : // height: spacingXL,
+ 38 : // ),
+ 39 0 : ListView.builder(
+ 40 : shrinkWrap: true,
+ 41 : physics: const NeverScrollableScrollPhysics(),
+ 42 0 : itemCount: restaurant.reviews?.length,
+ 43 0 : itemBuilder: (context, index) {
+ 44 0 : var review = restaurant.reviews?[index];
+ 45 0 : return Column(
+ 46 : crossAxisAlignment: CrossAxisAlignment.start,
+ 47 0 : children: [
+ 48 : const SizedBox(
+ 49 : height: spacingM,
+ 50 : ),
+ 51 0 : StarRating(
+ 52 0 : rating: review?.rating ?? 0,
+ 53 : ),
+ 54 : const SizedBox(
+ 55 : height: spacingSM,
+ 56 : ),
+ 57 0 : review?.text != null
+ 58 0 : ? Padding(
+ 59 : padding: const EdgeInsets.only(top: 8.0),
+ 60 0 : child: Text(
+ 61 0 : review!.text!,
+ 62 0 : style: Theme.of(context).textTheme.bodyLarge,
+ 63 : ),
+ 64 : )
+ 65 0 : : Container(),
+ 66 : const SizedBox(
+ 67 : height: 8,
+ 68 : ),
+ 69 0 : Row(
+ 70 0 : children: [
+ 71 0 : CircleAvatar(
+ 72 : radius: 35,
+ 73 0 : backgroundImage: review?.user?.imageUrl != null
+ 74 0 : ? NetworkImage(review!.user!.imageUrl!)
+ 75 0 : : getRandomAvatar(),
+ 76 : ),
+ 77 : const SizedBox(
+ 78 : width: 8,
+ 79 : ),
+ 80 0 : Text(review?.user?.name ?? 'Not identified'),
+ 81 : ],
+ 82 : ),
+ 83 : const SizedBox(
+ 84 : height: spacingM,
+ 85 : ),
+ 86 0 : buildDivider()
+ 87 : ],
+ 88 : );
+ 89 : },
+ 90 : ),
+ 91 : ],
+ 92 : );
+ 93 : }
+ 94 :
+ 95 0 : Row overallClassificationRow(BuildContext context) {
+ 96 0 : return Row(
+ 97 0 : children: [
+ 98 0 : Text(
+ 99 0 : restaurant.rating.toString(),
+ 100 0 : style: Theme.of(context).textTheme.headlineMedium,
+ 101 : ),
+ 102 : const SizedBox(
+ 103 : width: 6,
+ 104 : ),
+ 105 : const Icon(
+ 106 : Icons.star,
+ 107 : color: ThemeColors.starColor,
+ 108 : ),
+ 109 : ],
+ 110 : );
+ 111 : }
+ 112 : }
+
+ |
+
+
+
+
+
+
+
+
+
diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig
index 592ceee..ec97fc6 100644
--- a/ios/Flutter/Debug.xcconfig
+++ b/ios/Flutter/Debug.xcconfig
@@ -1 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig
index 592ceee..c4855bf 100644
--- a/ios/Flutter/Release.xcconfig
+++ b/ios/Flutter/Release.xcconfig
@@ -1 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
diff --git a/ios/Podfile b/ios/Podfile
new file mode 100644
index 0000000..d97f17e
--- /dev/null
+++ b/ios/Podfile
@@ -0,0 +1,44 @@
+# Uncomment this line to define a global platform for your project
+# platform :ios, '12.0'
+
+# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
+ENV['COCOAPODS_DISABLE_STATS'] = 'true'
+
+project 'Runner', {
+ 'Debug' => :debug,
+ 'Profile' => :release,
+ 'Release' => :release,
+}
+
+def flutter_root
+ generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
+ unless File.exist?(generated_xcode_build_settings_path)
+ raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
+ end
+
+ File.foreach(generated_xcode_build_settings_path) do |line|
+ matches = line.match(/FLUTTER_ROOT\=(.*)/)
+ return matches[1].strip if matches
+ end
+ raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
+end
+
+require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
+
+flutter_ios_podfile_setup
+
+target 'Runner' do
+ use_frameworks!
+ use_modular_headers!
+
+ flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
+ target 'RunnerTests' do
+ inherit! :search_paths
+ end
+end
+
+post_install do |installer|
+ installer.pods_project.targets.each do |target|
+ flutter_additional_ios_build_settings(target)
+ end
+end
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
new file mode 100644
index 0000000..9d67035
--- /dev/null
+++ b/ios/Podfile.lock
@@ -0,0 +1,23 @@
+PODS:
+ - Flutter (1.0.0)
+ - shared_preferences_foundation (0.0.1):
+ - Flutter
+ - FlutterMacOS
+
+DEPENDENCIES:
+ - Flutter (from `Flutter`)
+ - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
+
+EXTERNAL SOURCES:
+ Flutter:
+ :path: Flutter
+ shared_preferences_foundation:
+ :path: ".symlinks/plugins/shared_preferences_foundation/darwin"
+
+SPEC CHECKSUMS:
+ Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
+ shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
+
+PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796
+
+COCOAPODS: 1.14.3
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 182fb57..0efa999 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -10,6 +10,8 @@
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
+ 5B9EB8175B8C5B859CCEC015 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F7A10419AE997EB6DE7E5D6A /* Pods_RunnerTests.framework */; };
+ 6321356C5CCA15700174FB76 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A9A3C3DE807B1C6583136EC /* Pods_Runner.framework */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
@@ -44,9 +46,13 @@
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; };
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 339EEEBAD5DCF72F3BEFB8C0 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
+ 4202DE8A265392A0073DDC58 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; };
+ 6A9A3C3DE807B1C6583136EC /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
+ 754CE2B68064AF3945817F8B /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
@@ -55,13 +61,26 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+ A74BE093EA688B08B5BBECD4 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
+ F4AC0A48403EA673C8AADA67 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
+ F7A10419AE997EB6DE7E5D6A /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ F964336D93D08154B23C613A /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
+ 3FFD19965B4C9D566984E5F5 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 5B9EB8175B8C5B859CCEC015 /* Pods_RunnerTests.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
97C146EB1CF9000F007C117D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 6321356C5CCA15700174FB76 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -76,6 +95,20 @@
path = RunnerTests;
sourceTree = "";
};
+ 8C577AD6DF1DDC3C789A7B26 /* Pods */ = {
+ isa = PBXGroup;
+ children = (
+ F4AC0A48403EA673C8AADA67 /* Pods-Runner.debug.xcconfig */,
+ A74BE093EA688B08B5BBECD4 /* Pods-Runner.release.xcconfig */,
+ F964336D93D08154B23C613A /* Pods-Runner.profile.xcconfig */,
+ 339EEEBAD5DCF72F3BEFB8C0 /* Pods-RunnerTests.debug.xcconfig */,
+ 4202DE8A265392A0073DDC58 /* Pods-RunnerTests.release.xcconfig */,
+ 754CE2B68064AF3945817F8B /* Pods-RunnerTests.profile.xcconfig */,
+ );
+ name = Pods;
+ path = Pods;
+ sourceTree = "";
+ };
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
@@ -94,6 +127,8 @@
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
331C8082294A63A400263BE5 /* RunnerTests */,
+ 8C577AD6DF1DDC3C789A7B26 /* Pods */,
+ F800066FBB912D75920385E0 /* Frameworks */,
);
sourceTree = "";
};
@@ -121,6 +156,15 @@
path = Runner;
sourceTree = "";
};
+ F800066FBB912D75920385E0 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 6A9A3C3DE807B1C6583136EC /* Pods_Runner.framework */,
+ F7A10419AE997EB6DE7E5D6A /* Pods_RunnerTests.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "";
+ };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -128,8 +172,10 @@
isa = PBXNativeTarget;
buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
buildPhases = (
+ 5BFF67856F74324DED4DA1A8 /* [CP] Check Pods Manifest.lock */,
331C807D294A63A400263BE5 /* Sources */,
331C807F294A63A400263BE5 /* Resources */,
+ 3FFD19965B4C9D566984E5F5 /* Frameworks */,
);
buildRules = (
);
@@ -145,12 +191,14 @@
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
+ FF18833D2F062EF8455E3171 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+ 33BB0A415525F547416C12A9 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@@ -222,6 +270,23 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
+ 33BB0A415525F547416C12A9 /* [CP] Embed Pods Frameworks */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
+ );
+ name = "[CP] Embed Pods Frameworks";
+ outputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
@@ -238,6 +303,28 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
+ 5BFF67856F74324DED4DA1A8 /* [CP] Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ );
+ inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
+ outputFileListPaths = (
+ );
+ outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ showEnvVarsInLog = 0;
+ };
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
@@ -253,6 +340,28 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
+ FF18833D2F062EF8455E3171 /* [CP] Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ );
+ inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
+ outputFileListPaths = (
+ );
+ outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ showEnvVarsInLog = 0;
+ };
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -379,6 +488,7 @@
};
331C8088294A63A400263BE5 /* Debug */ = {
isa = XCBuildConfiguration;
+ baseConfigurationReference = 339EEEBAD5DCF72F3BEFB8C0 /* Pods-RunnerTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
@@ -396,6 +506,7 @@
};
331C8089294A63A400263BE5 /* Release */ = {
isa = XCBuildConfiguration;
+ baseConfigurationReference = 4202DE8A265392A0073DDC58 /* Pods-RunnerTests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
@@ -411,6 +522,7 @@
};
331C808A294A63A400263BE5 /* Profile */ = {
isa = XCBuildConfiguration;
+ baseConfigurationReference = 754CE2B68064AF3945817F8B /* Pods-RunnerTests.profile.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata
index 1d526a1..21a3cc1 100644
--- a/ios/Runner.xcworkspace/contents.xcworkspacedata
+++ b/ios/Runner.xcworkspace/contents.xcworkspacedata
@@ -4,4 +4,7 @@
+
+
diff --git a/lib/cubit/cubit.dart b/lib/cubit/cubit.dart
new file mode 100644
index 0000000..868fb90
--- /dev/null
+++ b/lib/cubit/cubit.dart
@@ -0,0 +1 @@
+export 'restaurant_cubit.dart';
diff --git a/lib/cubit/restaurant_cubit.dart b/lib/cubit/restaurant_cubit.dart
new file mode 100644
index 0000000..ddde3a1
--- /dev/null
+++ b/lib/cubit/restaurant_cubit.dart
@@ -0,0 +1,54 @@
+import 'package:bloc/bloc.dart';
+import 'package:equatable/equatable.dart';
+import 'package:flutter/material.dart';
+import 'package:restaurant_tour/models/restaurant.dart';
+
+import '../usecases/fetch_restaurants.dart';
+
+part 'restaurant_state.dart';
+
+class RestaurantCubit extends Cubit {
+ RestaurantCubit(this.fetchRestaurantsUseCase)
+ : super(const RestaurantInitial(favoriteRestaurants: []));
+ final FetchRestaurants fetchRestaurantsUseCase;
+
+ Future fetchRestaurants() async {
+ emit(const LoadingRestaurantsState(favoriteRestaurants: []));
+ RestaurantQueryResult? result =
+ await fetchRestaurantsUseCase.getRestaurants();
+ List favoriteRestaurants =
+ await fetchRestaurantsUseCase.getFavoriteRestaurants();
+ if (result != null) {
+ emit(
+ RestaurantsLoadedState(
+ result: result,
+ favoriteRestaurants: favoriteRestaurants,
+ ),
+ );
+ } else {
+ emit(
+ const ErrorState(
+ message:
+ 'The server encountered a problem and we couldn\'t load the list.',
+ favoriteRestaurants: [],
+ ),
+ );
+ }
+ }
+
+ Future favoriteAResturant(String id) async {
+ final favoriteRestaurants = List.from(state.favoriteRestaurants);
+ if (favoriteRestaurants.contains(id)) {
+ favoriteRestaurants.remove(id);
+ } else {
+ favoriteRestaurants.add(id);
+ }
+ // await fetchRestaurantsUseCase.saveFavoriteRestaurants(favoriteRestaurants);
+ emit(
+ FavoriteRestaurantState(
+ result: state.result!,
+ favoriteRestaurants: List.of(favoriteRestaurants),
+ ),
+ );
+ }
+}
diff --git a/lib/cubit/restaurant_state.dart b/lib/cubit/restaurant_state.dart
new file mode 100644
index 0000000..c3b75ac
--- /dev/null
+++ b/lib/cubit/restaurant_state.dart
@@ -0,0 +1,104 @@
+// ignore_for_file: overridden_fields
+
+part of 'restaurant_cubit.dart';
+
+@immutable
+abstract class RestaurantState extends Equatable {
+ final List favoriteRestaurants;
+ final RestaurantQueryResult? result;
+
+ const RestaurantState({
+ required this.favoriteRestaurants,
+ this.result,
+ });
+
+ RestaurantState copyWith({List? favoriteRestaurants});
+ @override
+ List