File tree Expand file tree Collapse file tree 14 files changed +7
-50
lines changed
lib/data/repositories/booking
experimental/web_dashboard Expand file tree Collapse file tree 14 files changed +7
-50
lines changed Original file line number Diff line number Diff line change 4
4
5
5
import 'dart:async' ;
6
6
7
- import 'package:collection/collection.dart' ;
8
-
9
7
import '../../../domain/models/booking/booking.dart' ;
10
8
import '../../../domain/models/booking/booking_summary.dart' ;
11
9
import '../../../utils/result.dart' ;
12
-
13
10
import '../../services/local/local_data_service.dart' ;
14
11
import 'booking_repository.dart' ;
15
12
@@ -35,7 +32,7 @@ class BookingRepositoryLocal implements BookingRepository {
35
32
36
33
@override
37
34
Future <Result <Booking >> getBooking (int id) async {
38
- final booking = _bookings.firstWhereOrNull ((booking) => booking.id == id);
35
+ final booking = _bookings.where ((booking) => booking.id == id).firstOrNull ;
39
36
if (booking == null ) {
40
37
return Result .error (Exception ('Booking not found' ));
41
38
}
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ environment:
9
9
10
10
dependencies :
11
11
cached_network_image : ^3.4.1
12
- collection : ^1.18.0
13
12
flutter :
14
13
sdk : flutter
15
14
flutter_localizations :
Original file line number Diff line number Diff line change 4
4
5
5
import 'dart:convert' ;
6
6
7
- import 'package:collection/collection.dart' ;
8
7
import 'package:shelf/shelf.dart' ;
9
8
import 'package:shelf_router/shelf_router.dart' ;
10
9
@@ -61,9 +60,8 @@ class BookingApi {
61
60
// Get a booking by id
62
61
router.get ('/<id>' , (Request request, String id) {
63
62
final bookingId = int .parse (id);
64
- final booking = _bookings.firstWhereOrNull (
65
- (booking) => booking.id == bookingId,
66
- );
63
+ final booking =
64
+ _bookings.where ((booking) => booking.id == bookingId).firstOrNull;
67
65
68
66
if (booking == null ) {
69
67
return Response .notFound ('Invalid id' );
@@ -104,9 +102,8 @@ class BookingApi {
104
102
// Delete booking
105
103
router.delete ('/<id>' , (Request request, String id) async {
106
104
final bookingId = int .parse (id);
107
- final booking = _bookings.firstWhereOrNull (
108
- (booking) => booking.id == bookingId,
109
- );
105
+ final booking =
106
+ _bookings.where ((booking) => booking.id == bookingId).firstOrNull;
110
107
if (booking == null ) {
111
108
return Response .notFound ('Invalid id' );
112
109
}
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ dependencies:
12
12
shelf_router : ^1.1.0
13
13
freezed_annotation : ^2.4.4
14
14
json_annotation : ^4.9.0
15
- collection : ^1.19.0
16
15
17
16
dev_dependencies :
18
17
http : ^1.1.0
Original file line number Diff line number Diff line change 30
30
.pub /
31
31
/build /
32
32
33
- # Web related
34
- lib /generated_plugin_registrant.dart
35
-
36
33
# Exceptions to above rules.
37
34
! /packages /flutter_tools /test /data /dart_dependencies_test /** /.packages
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ environment:
8
8
9
9
dependencies :
10
10
cloud_firestore : ^5.0.1
11
- collection : ^1.16.0
12
11
community_charts_flutter : ^1.0.2
13
12
cupertino_icons : ^1.0.0
14
13
firebase_auth : ^5.1.0
Original file line number Diff line number Diff line change 31
31
.pub /
32
32
/build /
33
33
34
- # Web related
35
- lib /generated_plugin_registrant.dart
36
-
37
34
# Symbolication related
38
35
app. * .symbols
39
36
Original file line number Diff line number Diff line change 31
31
.pub /
32
32
/build /
33
33
34
- # Web related
35
- lib /generated_plugin_registrant.dart
36
-
37
34
# Symbolication related
38
35
app. * .symbols
39
36
Original file line number Diff line number Diff line change @@ -6,23 +6,11 @@ import 'dart:io' show Platform;
6
6
7
7
import 'package:flutter/foundation.dart' show kIsWeb;
8
8
import 'package:flutter/material.dart' ;
9
- import 'package:url_strategy/url_strategy.dart' ;
10
9
import 'package:window_size/window_size.dart' ;
11
10
12
11
import 'src/app.dart' ;
13
12
14
13
void main () {
15
- // Use package:url_strategy until this pull request is released:
16
- // https://github.com/flutter/flutter/pull/77103
17
-
18
- // Use to setHashUrlStrategy() to use "/#/" in the address bar (default). Use
19
- // setPathUrlStrategy() to use the path. You may need to configure your web
20
- // server to redirect all paths to index.html.
21
- //
22
- // On mobile platforms, both functions are no-ops.
23
- setHashUrlStrategy ();
24
- // setPathUrlStrategy();
25
-
26
14
setupWindow ();
27
15
runApp (const Bookstore ());
28
16
}
Original file line number Diff line number Diff line change @@ -8,15 +8,11 @@ environment:
8
8
9
9
dependencies :
10
10
adaptive_navigation : ^0.0.3
11
- collection : ^1.17.0
12
11
cupertino_icons : ^1.0.2
13
12
flutter :
14
13
sdk : flutter
15
14
go_router : ^14.0.0
16
- path_to_regexp : ^0.4.0
17
- quiver : ^3.1.0
18
15
url_launcher : ^6.1.1
19
- url_strategy : ^0.3.0
20
16
window_size :
21
17
git :
22
18
url : https://github.com/google/flutter-desktop-embedding.git
Original file line number Diff line number Diff line change 69
69
! ** /ios /** /default.pbxuser
70
70
! ** /ios /** /default.perspectivev3
71
71
! /packages /flutter_tools /test /data /dart_dependencies_test /** /.packages
72
-
73
- # Flutter Web files
74
- lib /generated_plugin_registrant.dart
Original file line number Diff line number Diff line change 5
5
import 'dart:async' ;
6
6
import 'dart:math' ;
7
7
8
- import 'package:collection/collection.dart' ;
9
8
import 'package:flutter/material.dart' ;
10
9
import 'package:go_router/go_router.dart' ;
11
10
import 'package:google_maps_flutter/google_maps_flutter.dart' ;
@@ -279,9 +278,8 @@ class _PlaceMapState extends State<PlaceMap> {
279
278
// At this point, we know the places have been updated from the list
280
279
// view. We need to reconfigure the map to respect the updates.
281
280
for (final place in newConfiguration.places) {
282
- final oldPlace = _configuration! .places.firstWhereOrNull (
283
- (p) => p.id == place.id,
284
- );
281
+ final oldPlace =
282
+ _configuration! .places.where ((p) => p.id == place.id).firstOrNull;
285
283
if (oldPlace == null || oldPlace != place) {
286
284
// New place or updated place.
287
285
_updateExistingPlaceMarker (place: place);
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ dependencies:
15
15
provider : ^6.0.2
16
16
uuid : ^4.0.0
17
17
go_router : " >=10.0.0 <15.0.0"
18
- collection : ^1.16.0
19
18
20
19
dev_dependencies :
21
20
analysis_defaults :
Original file line number Diff line number Diff line change @@ -32,9 +32,6 @@ migrate_working_dir/
32
32
.pub /
33
33
/build /
34
34
35
- # Web related
36
- lib /generated_plugin_registrant.dart
37
-
38
35
# Symbolication related
39
36
app. * .symbols
40
37
You can’t perform that action at this time.
0 commit comments