Skip to content

Commit d739a14

Browse files
Fix broken dependency resolution and Discover tab crash
- Remove unused vector_math dep conflicting with flutter_test, pin google_fonts/vibration to versions resolvable on stable Flutter - Access ExplorationService via AppState in DiscoverScreen instead of a nonexistent provider (crashed the Discover tab) - Update stale tests to the redesigned onboarding and nav structure 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
1 parent c293a51 commit d739a14

5 files changed

Lines changed: 48 additions & 132 deletions

File tree

lib/features/map/presentation/discover_screen.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import 'package:access_map/app/app_state.dart';
2-
import 'package:access_map/core/services/exploration_service.dart';
32
import 'package:access_map/core/theme/app_theme.dart';
43
import 'package:access_map/features/places/presentation/place_details_screen.dart';
54
import 'package:access_map/shared/models/accessibility_need.dart';
@@ -29,7 +28,7 @@ class _DiscoverScreenState extends State<DiscoverScreen> {
2928
@override
3029
Widget build(BuildContext context) {
3130
final state = context.watch<AppState>();
32-
final exploration = context.watch<ExplorationService>();
31+
final exploration = state.explorationService;
3332

3433
// Exclude the place currently being navigated to
3534
final activeNavId = exploration.activeDestination?.id;

pubspec.lock

Lines changed: 33 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ packages:
3737
dependency: transitive
3838
description:
3939
name: characters
40-
sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
40+
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
4141
url: "https://pub.dev"
4242
source: hosted
43-
version: "1.4.1"
43+
version: "1.4.0"
4444
checked_yaml:
4545
dependency: transitive
4646
description:
@@ -65,14 +65,6 @@ packages:
6565
url: "https://pub.dev"
6666
source: hosted
6767
version: "1.1.2"
68-
code_assets:
69-
dependency: transitive
70-
description:
71-
name: code_assets
72-
sha256: cfd4f5f575a49c5f10ca856e9846073f1e6c3ee94912377eea5f6cefc5272941
73-
url: "https://pub.dev"
74-
source: hosted
75-
version: "2.0.0"
7668
collection:
7769
dependency: transitive
7870
description:
@@ -109,18 +101,18 @@ packages:
109101
dependency: transitive
110102
description:
111103
name: device_info_plus
112-
sha256: "0891702f96b2e465fe567b7ec448380e6b1c14f60af552a8536d9f583b6b8442"
104+
sha256: b4fed1b2835da9d670d7bed7db79ae2a94b0f5ad6312268158a9b5479abbacdd
113105
url: "https://pub.dev"
114106
source: hosted
115-
version: "13.2.0"
107+
version: "12.4.0"
116108
device_info_plus_platform_interface:
117109
dependency: transitive
118110
description:
119111
name: device_info_plus_platform_interface
120-
sha256: "04b173a92e2d9161dfead145667037c8d834db725ce2e7b942bfe18fd2f45a46"
112+
sha256: e1ea89119e34903dca74b883d0dd78eb762814f97fb6c76f35e9ff74d261a18f
121113
url: "https://pub.dev"
122114
source: hosted
123-
version: "8.1.0"
115+
version: "7.0.3"
124116
fake_async:
125117
dependency: transitive
126118
description:
@@ -137,14 +129,6 @@ packages:
137129
url: "https://pub.dev"
138130
source: hosted
139131
version: "2.2.0"
140-
ffi_leak_tracker:
141-
dependency: transitive
142-
description:
143-
name: ffi_leak_tracker
144-
sha256: "4093d4ef9ca06ffe2786e73bfb25e22aa92112b9bb4ec941f11e3e6b61489a97"
145-
url: "https://pub.dev"
146-
source: hosted
147-
version: "0.1.2"
148132
file:
149133
dependency: transitive
150134
description:
@@ -308,18 +292,10 @@ packages:
308292
dependency: "direct main"
309293
description:
310294
name: google_fonts
311-
sha256: e3cb3ee6b47fd2472c23de6da5744796a4da195137759ddb3fbcc9467b7b3c7d
295+
sha256: ba03d03bcaa2f6cb7bd920e3b5027181db75ab524f8891c8bc3aa603885b8055
312296
url: "https://pub.dev"
313297
source: hosted
314-
version: "8.2.1"
315-
hooks:
316-
dependency: transitive
317-
description:
318-
name: hooks
319-
sha256: eaac480a35ec0814146c2c48d96aaa829e0e44a7662c88ae84c9edf4bc35651f
320-
url: "https://pub.dev"
321-
source: hosted
322-
version: "2.2.0"
298+
version: "6.3.3"
323299
http:
324300
dependency: "direct main"
325301
description:
@@ -352,30 +328,6 @@ packages:
352328
url: "https://pub.dev"
353329
source: hosted
354330
version: "0.20.3"
355-
jni:
356-
dependency: transitive
357-
description:
358-
name: jni
359-
sha256: f038e58b4dc2c9037f50e233175086337e0b305e356d28211bf55f21c504cbd3
360-
url: "https://pub.dev"
361-
source: hosted
362-
version: "1.0.3"
363-
jni_flutter:
364-
dependency: transitive
365-
description:
366-
name: jni_flutter
367-
sha256: b2310cdd4c18c65c081ab141a41efa94aa26c65431803703ece51996f174f351
368-
url: "https://pub.dev"
369-
source: hosted
370-
version: "1.0.3"
371-
jni_util:
372-
dependency: transitive
373-
description:
374-
name: jni_util
375-
sha256: "1ba86da04a5f2bf18fde2edb235587e70c5b0fc5bd4ba955f46b00942c3fc35f"
376-
url: "https://pub.dev"
377-
source: hosted
378-
version: "1.0.0"
379331
json_annotation:
380332
dependency: transitive
381333
description:
@@ -452,26 +404,26 @@ packages:
452404
dependency: transitive
453405
description:
454406
name: matcher
455-
sha256: "31bd099b47c10cd1aeb55146a2d46ce0277630ecef3f7dae54ad7873f36696cd"
407+
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
456408
url: "https://pub.dev"
457409
source: hosted
458-
version: "0.12.20"
410+
version: "0.12.17"
459411
material_color_utilities:
460412
dependency: transitive
461413
description:
462414
name: material_color_utilities
463-
sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
415+
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
464416
url: "https://pub.dev"
465417
source: hosted
466-
version: "0.13.0"
418+
version: "0.11.1"
467419
meta:
468420
dependency: transitive
469421
description:
470422
name: meta
471-
sha256: "307249ce4ff29d58a18e97f6345f539382eb9c9c29ecda628900f31de0443dd9"
423+
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
472424
url: "https://pub.dev"
473425
source: hosted
474-
version: "1.19.0"
426+
version: "1.16.0"
475427
mgrs_dart:
476428
dependency: transitive
477429
description:
@@ -488,22 +440,6 @@ packages:
488440
url: "https://pub.dev"
489441
source: hosted
490442
version: "1.0.0"
491-
objective_c:
492-
dependency: transitive
493-
description:
494-
name: objective_c
495-
sha256: ad56fd53a78ff6b1472fa59ff2a4e8b8ccabafc586fc263a1dfad0b99b5553e3
496-
url: "https://pub.dev"
497-
source: hosted
498-
version: "9.6.0"
499-
package_config:
500-
dependency: transitive
501-
description:
502-
name: package_config
503-
sha256: ffcf4cf3d6c0b74ac43708d9f56625506e8a68aa935abe9d267a7330f320eb5d
504-
url: "https://pub.dev"
505-
source: hosted
506-
version: "3.0.0"
507443
path:
508444
dependency: transitive
509445
description:
@@ -516,26 +452,26 @@ packages:
516452
dependency: transitive
517453
description:
518454
name: path_provider
519-
sha256: a7f4874f987173da295a61c181b8ee71dab59b332a486b391babf26a1b884825
455+
sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd"
520456
url: "https://pub.dev"
521457
source: hosted
522-
version: "2.1.6"
458+
version: "2.1.5"
523459
path_provider_android:
524460
dependency: transitive
525461
description:
526462
name: path_provider_android
527-
sha256: "69cbd515a62b94d32a7944f086b2f82b4ac40a1d45bebfc00813a430ab2dabcd"
463+
sha256: "149441ca6e4f38193b2e004c0ca6376a3d11f51fa5a77552d8bd4d2b0c0912ba"
528464
url: "https://pub.dev"
529465
source: hosted
530-
version: "2.3.1"
466+
version: "2.2.23"
531467
path_provider_foundation:
532468
dependency: transitive
533469
description:
534470
name: path_provider_foundation
535-
sha256: "2a376b7d6392d80cd3705782d2caa734ca4727776db0b6ec36ef3f1855197699"
471+
sha256: "6d13aece7b3f5c5a9731eaf553ff9dcbc2eff41087fd2df587fd0fed9a3eb0c4"
536472
url: "https://pub.dev"
537473
source: hosted
538-
version: "2.6.0"
474+
version: "2.5.1"
539475
path_provider_linux:
540476
dependency: transitive
541477
description:
@@ -608,14 +544,6 @@ packages:
608544
url: "https://pub.dev"
609545
source: hosted
610546
version: "6.1.5+1"
611-
pub_semver:
612-
dependency: transitive
613-
description:
614-
name: pub_semver
615-
sha256: "261236774e8b1d69cfc6b9eabbc96c40f25e7a2d6b171f3385d4f65d5734fb24"
616-
url: "https://pub.dev"
617-
source: hosted
618-
version: "2.2.1"
619547
qr:
620548
dependency: transitive
621549
description:
@@ -632,14 +560,6 @@ packages:
632560
url: "https://pub.dev"
633561
source: hosted
634562
version: "4.1.0"
635-
record_use:
636-
dependency: transitive
637-
description:
638-
name: record_use
639-
sha256: "1cb8564af8d43b464294411db9217f5ec04891c6f22ee2c32d73ae05e88a6bd2"
640-
url: "https://pub.dev"
641-
source: hosted
642-
version: "1.1.1"
643563
shared_preferences:
644564
dependency: "direct main"
645565
description:
@@ -769,10 +689,10 @@ packages:
769689
dependency: transitive
770690
description:
771691
name: test_api
772-
sha256: "2a122cbe059f8b610d3a5415f42e255b6c17b1f21eee1d960f31080237fb4f11"
692+
sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00"
773693
url: "https://pub.dev"
774694
source: hosted
775-
version: "0.7.12"
695+
version: "0.7.6"
776696
typed_data:
777697
dependency: transitive
778698
description:
@@ -862,21 +782,21 @@ packages:
862782
source: hosted
863783
version: "4.6.0"
864784
vector_math:
865-
dependency: "direct main"
785+
dependency: transitive
866786
description:
867787
name: vector_math
868-
sha256: f36f9f3be64c6198714492bb455c11056e33e2f85d9a0b676a48301e44fdcf47
788+
sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
869789
url: "https://pub.dev"
870790
source: hosted
871-
version: "2.4.2"
791+
version: "2.2.0"
872792
vibration:
873793
dependency: "direct main"
874794
description:
875795
name: vibration
876-
sha256: "3424f7856b971a2ce94d22be3a3abfb5b9b5984562fdedd621f4e67574be7254"
796+
sha256: "9bb06614c69260f8bd11c80fe01ed7988905cf00e3417d656c2647e41f261d87"
877797
url: "https://pub.dev"
878798
source: hosted
879-
version: "3.2.1"
799+
version: "3.1.8"
880800
vibration_platform_interface:
881801
dependency: transitive
882802
description:
@@ -905,18 +825,18 @@ packages:
905825
dependency: transitive
906826
description:
907827
name: win32
908-
sha256: a0b93865d5644f11cf6a8c3f6db909f1ec168958b5805f6cc684adea957cd63d
828+
sha256: d7cb55e04cd34096cd3a79b3330245f54cb96a370a1c27adb3c84b917de8b08e
909829
url: "https://pub.dev"
910830
source: hosted
911-
version: "6.4.0"
831+
version: "5.15.0"
912832
win32_registry:
913833
dependency: transitive
914834
description:
915835
name: win32_registry
916-
sha256: "73b1d78920a9d6e03f8b4e43e612b87bf3152a0e5c5e5150267762b7c4116904"
836+
sha256: "6f1b564492d0147b330dd794fee8f512cec4977957f310f9951b5f9d83618dae"
917837
url: "https://pub.dev"
918838
source: hosted
919-
version: "3.0.3"
839+
version: "2.1.0"
920840
wkt_parser:
921841
dependency: transitive
922842
description:
@@ -942,5 +862,5 @@ packages:
942862
source: hosted
943863
version: "3.1.4"
944864
sdks:
945-
dart: ">=3.11.0 <4.0.0"
946-
flutter: ">=3.41.0"
865+
dart: ">=3.9.2 <4.0.0"
866+
flutter: ">=3.35.0"

pubspec.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@ dependencies:
2222
geocoding: ^3.0.0
2323
intl: ^0.20.2
2424
flutter_compass: ^0.8.1
25-
vibration: ^3.2.1
26-
vector_math: ^2.4.2
27-
google_fonts: ^8.2.1
25+
vibration: ^3.1.8
26+
google_fonts: ^6.2.1
2827
qr_flutter: ^4.1.0
2928
http: ^1.2.2
3029

test/add_location_flow_test.dart

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,32 +47,28 @@ Future<void> scrollUntilVisible(
4747
}
4848

4949
void main() {
50-
/// Onboard as PA Assisted + Can't See and land on the map.
50+
/// Onboard with the Blind / Low Vision focus and land on the map.
5151
Future<AppState> onboard(WidgetTester tester) async {
5252
SharedPreferences.setMockInitialValues({});
5353
await tester.pumpWidget(const AccessMapApp());
5454
await settle(tester);
55-
await tester.tap(find.text('PA Assisted'));
55+
await tester.tap(find.text('Blind / Low Vision'));
5656
await tester.pump();
57-
await tester.tap(find.text('Continue'));
58-
await settle(tester);
59-
await tester.tap(find.text("Can't See"));
60-
await tester.pump();
61-
await tester.ensureVisible(find.text('Open Map'));
57+
await tester.ensureVisible(find.text('GET STARTED & EXPLORE MAP'));
6258
await tester.pump();
63-
await tester.tap(find.text('Open Map'));
59+
await tester.tap(find.text('GET STARTED & EXPLORE MAP'));
6460
// Bounded pumps: the map's tile layer retries failed (offline) requests
6561
// forever, so pumpAndSettle would never return here.
6662
await tester.pump(const Duration(milliseconds: 700));
6763
await tester.pump(const Duration(milliseconds: 400));
6864
return tester.element(find.byType(MaterialApp)).read<AppState>();
6965
}
7066

71-
/// Enter the Add Location wizard from the Contribute tab.
67+
/// Enter the Add Location wizard from the Community (contributions) tab.
7268
Future<void> openWizard(WidgetTester tester) async {
7369
// Nav-bar icons are unique even though the IndexedStack keeps every
74-
// tab's AppBar title alive (find.text('Contribute') would match twice).
75-
await tester.tap(find.byIcon(Icons.volunteer_activism_outlined));
70+
// tab's AppBar title alive (find.text('Community') would match twice).
71+
await tester.tap(find.byIcon(Icons.people_alt_outlined));
7672
await settle(tester);
7773
await tester.tap(find.byKey(const ValueKey('add-location-card')));
7874
await settle(tester);
@@ -343,7 +339,7 @@ void main() {
343339
findsNothing);
344340

345341
// Switch profile to wheelchair user → wheelchair line appears (#41).
346-
state.updateDemoProfile(needs: [AccessibilityNeed.wheelchairUser]);
342+
state.updateProfile(needs: [AccessibilityNeed.wheelchairMobility]);
347343
await settle(tester);
348344
expect(find.text('Wheelchair-Friendly - awaiting community ratings'),
349345
findsOneWidget);

test/widget_test.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@ void main() {
3636
await tester.ensureVisible(ctaFinder);
3737
await tester.pumpAndSettle();
3838
await tester.tap(ctaFinder);
39-
await tester.pumpAndSettle();
40-
await tester.pump(const Duration(milliseconds: 500));
39+
// Bounded pumps: the map's tile layer retries failed (offline) requests
40+
// forever, so pumpAndSettle would never return after entering the map.
41+
await tester.pump(const Duration(milliseconds: 700));
42+
await tester.pump(const Duration(milliseconds: 400));
4143

4244
expect(find.text('Map'), findsWidgets);
4345
expect(find.text('Search accessible places...'), findsOneWidget);

0 commit comments

Comments
 (0)