File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -290,7 +290,6 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
290290 }
291291
292292 void _handleNodeDeepLink (OsmNode node) {
293- // Fly to node at zoom 16
294293 try {
295294 _mapController.animateTo (
296295 dest: node.coord,
@@ -302,7 +301,6 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
302301 debugPrint ('[HomeScreen] Could not animate to deep link node: $e ' );
303302 }
304303
305- // Open the node details sheet after map animation settles
306304 Future .delayed (const Duration (milliseconds: 700 ), () {
307305 if (mounted) {
308306 openNodeTagSheet (node);
Original file line number Diff line number Diff line change @@ -2,12 +2,12 @@ import 'dart:async';
22import 'dart:convert' ;
33import 'package:app_links/app_links.dart' ;
44import 'package:flutter/material.dart' ;
5- import 'package:http/http.dart' as http;
65import 'package:latlong2/latlong.dart' ;
76
87import '../models/node_profile.dart' ;
98import '../models/operator_profile.dart' ;
109import '../models/osm_node.dart' ;
10+ import 'http_client.dart' ;
1111import 'profile_import_service.dart' ;
1212import 'operator_profile_import_service.dart' ;
1313import '../screens/profile_editor.dart' ;
@@ -107,7 +107,8 @@ class DeepLinkService {
107107 Future <OsmNode ?> _fetchNodeById (int nodeId) async {
108108 try {
109109 final url = Uri .parse ('https://api.openstreetmap.org/api/0.6/node/$nodeId .json' );
110- final response = await http.get (url);
110+ final client = UserAgentClient ();
111+ final response = await client.get (url);
111112 if (response.statusCode != 200 ) return null ;
112113
113114 final json = jsonDecode (response.body);
You can’t perform that action at this time.
0 commit comments