Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,16 @@ English (`en`) and Spanish (`es`) are enabled via `AppLocalizations.supportedLoc
- Placeholders require an `example` string in metadata.
- Changing ARB files requires a full restart for hot reload to pick up generated code.
- If `lib/l10n/untranslated_messages.txt` is non-empty, add translations before release.

## Supabase

To download latest changes to functions:

```bash
supabase functions download
```

To deploy local changes to functions:
```bash
supabase functions deploy push
```
34 changes: 34 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
PODS:
- Alamofire (5.11.1)
- app_links (6.4.1):
- Flutter
- Firebase/CoreOnly (12.4.0):
Expand Down Expand Up @@ -53,6 +54,12 @@ PODS:
- FirebaseRemoteConfigInterop (12.4.0)
- FirebaseSharedSwift (12.4.0)
- Flutter (1.0.0)
- flutter_osm_plugin (0.0.1):
- Alamofire
- Flutter
- OSMFlutterFramework
- Polyline
- Yams
- GoogleDataTransport (10.1.0):
- nanopb (~> 3.30910.0)
- PromisesObjC (~> 2.4)
Expand Down Expand Up @@ -87,9 +94,15 @@ PODS:
- nanopb/encode (= 3.30910.0)
- nanopb/decode (3.30910.0)
- nanopb/encode (3.30910.0)
- OSMFlutterFramework (0.8.4)
- package_info_plus (0.4.5):
- Flutter
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- permission_handler_apple (9.3.0):
- Flutter
- Polyline (5.1.0)
- PostHog (3.36.0)
- posthog_flutter (0.0.1):
- Flutter
Expand All @@ -103,22 +116,27 @@ PODS:
- FlutterMacOS
- url_launcher_ios (0.0.1):
- Flutter
- Yams (5.0.6)

DEPENDENCIES:
- app_links (from `.symlinks/plugins/app_links/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
- firebase_remote_config (from `.symlinks/plugins/firebase_remote_config/ios`)
- Flutter (from `Flutter`)
- flutter_osm_plugin (from `.symlinks/plugins/flutter_osm_plugin/ios`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- posthog_flutter (from `.symlinks/plugins/posthog_flutter/ios`)
- share_plus (from `.symlinks/plugins/share_plus/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)

SPEC REPOS:
trunk:
- Alamofire
- Firebase
- FirebaseABTesting
- FirebaseCore
Expand All @@ -131,8 +149,11 @@ SPEC REPOS:
- GoogleDataTransport
- GoogleUtilities
- nanopb
- OSMFlutterFramework
- Polyline
- PostHog
- PromisesObjC
- Yams

EXTERNAL SOURCES:
app_links:
Expand All @@ -145,10 +166,16 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/firebase_remote_config/ios"
Flutter:
:path: Flutter
flutter_osm_plugin:
:path: ".symlinks/plugins/flutter_osm_plugin/ios"
image_picker_ios:
:path: ".symlinks/plugins/image_picker_ios/ios"
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
permission_handler_apple:
:path: ".symlinks/plugins/permission_handler_apple/ios"
posthog_flutter:
:path: ".symlinks/plugins/posthog_flutter/ios"
share_plus:
Expand All @@ -159,6 +186,7 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/url_launcher_ios/ios"

SPEC CHECKSUMS:
Alamofire: eec6cd8f73b242b59e34153a606a909eb9864b14
app_links: 585674be3c6661708e6cd794ab4f39fb9d8356f9
Firebase: f07b15ae5a6ec0f93713e30b923d9970d144af3e
firebase_core: e6b8bb503b7d1d9856e698d4f193f7b414e6bf1f
Expand All @@ -173,17 +201,23 @@ SPEC CHECKSUMS:
FirebaseRemoteConfigInterop: 1e31ec72b89c9924367c59bfb5ec9ab60d1d6766
FirebaseSharedSwift: 93426a1de92f19e1199fac5295a4f8df16458daa
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
flutter_osm_plugin: 60be722901333b6107275c9c51ffb79167b6d99d
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1
image_picker_ios: 4f2f91b01abdb52842a8e277617df877e40f905b
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
OSMFlutterFramework: 2f1260ac2854d3398b92403f2d5e012b4ca2c620
package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
path_provider_foundation: 0b743cbb62d8e47eab856f09262bb8c1ddcfe6ba
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
Polyline: 2a1f29f87f8d9b7de868940f4f76deb8c678a5b1
PostHog: 8e04df01d59971f1fd85d0273e18ba61076fef72
posthog_flutter: c7888a7df4a4eb0a6473c50da2e12520c33408c4
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
share_plus: 8b6f8b3447e494cca5317c8c3073de39b3600d1f
shared_preferences_foundation: 5086985c1d43c5ba4d5e69a4e8083a389e2909e6
url_launcher_ios: bb13df5870e8c4234ca12609d04010a21be43dfa
Yams: e10dae147f517ed57ecae37c5e8681bdf8fcab65

PODFILE CHECKSUM: 53a6aebc29ccee84c41f92f409fc20cd4ca011f1

Expand Down
6 changes: 5 additions & 1 deletion lib/core/app_startup/app_startup.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:riverpod_annotation/riverpod_annotation.dart';
import 'package:anystep/core/config/remote_config/remote_config.dart';
import 'package:anystep/core/shared_prefs/shared_prefs.dart';

part 'app_startup.g.dart';
Expand All @@ -8,5 +9,8 @@ Future<void> appStartup(Ref ref) async {
ref.onDispose(() {
ref.invalidate(appPreferencesProvider);
});
await Future.wait([ref.watch(appPreferencesProvider.future)]);
await Future.wait([
ref.watch(appPreferencesProvider.future),
ref.watch(remoteConfigProvider.future),
]);
}
2 changes: 1 addition & 1 deletion lib/core/app_startup/app_startup.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions lib/core/common/utils/geo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ final geoHasher = GeoHasher();
/// Utility function to calculate geohash from latitude and longitude.
String? calculateGeohash(double? latitude, double? longitude, {int precision = 9}) {
if (latitude == null || longitude == null) return null;
final geohash = geoHasher.encode(latitude, longitude, precision: precision);
return geohash;
// dart_geohash expects (longitude, latitude)
try {
final geohash = geoHasher.encode(longitude, latitude, precision: precision);
return geohash;
} catch (_) {
return null;
}
}
25 changes: 25 additions & 0 deletions lib/core/common/utils/state_utils.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import 'package:anystep/core/common/data/json_data.dart';

String? normalizeUsState(String? input) {
if (input == null) return null;
final trimmed = input.trim();
if (trimmed.isEmpty) return null;

final lettersOnly = trimmed.replaceAll(RegExp(r'[^A-Za-z]'), '');
if (lettersOnly.length == 2) {
final upper = lettersOnly.toUpperCase();
return states.containsKey(upper) ? upper : null;
}

final normalizedInput = _normalizeAlpha(trimmed);
for (final entry in states.entries) {
if (_normalizeAlpha(entry.value) == normalizedInput) {
return entry.key;
}
}
return null;
}

bool isValidUsState(String? input) => normalizeUsState(input) != null;

String _normalizeAlpha(String value) => value.replaceAll(RegExp(r'[^A-Za-z]'), '').toLowerCase();
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ class _AddressAutocompleteFieldState extends ConsumerState<AddressAutocompleteFi
_error = null;
});
try {
final details = await ref.read(placesApiClientProvider).placeDetails(prediction.placeId);
final parsed = placeDetailsToAddress(details);
final parsed = placeDetailsToAddress(prediction.details);
final form = widget.formKey.currentState;
if (form == null) return;
form.fields['street']?.didChange(parsed.street);
Expand Down
Loading