Fix lint warnings and cleanup unused code after RadioGroup migration

Remove unused imports, fields, variables, and dead code introduced
during the RadioGroup widget migration and prior changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Doug Borg
2026-02-09 13:36:18 -07:00
parent 98b73fe019
commit 037165653c
11 changed files with 6 additions and 45 deletions

View File

@@ -813,7 +813,7 @@ class AppState extends ChangeNotifier {
// ---------- Utility Methods ----------
/// Generate a default changeset comment for a submission
/// Handles special case of <Existing tags> profile by using "a" instead
/// Handles special case of `<Existing tags>` profile by using "a" instead
static String generateDefaultChangesetComment({
required NodeProfile? profile,
required UploadOperation operation,

View File

@@ -266,7 +266,7 @@ class NodeProfile {
int get hashCode => id.hashCode;
/// Create a temporary empty profile for editing existing nodes
/// Used as the default "<Existing tags>" option when editing nodes
/// Used as the default `<Existing tags>` option when editing nodes
/// All existing tags will flow through as additionalExistingTags
static NodeProfile createExistingTagsProfile(OsmNode node) {
// Calculate FOV from existing direction ranges if applicable

View File

@@ -1,5 +1,4 @@
import 'dart:async';
import 'dart:typed_data';
import 'dart:ui';
import 'package:flutter_map/flutter_map.dart';

View File

@@ -8,7 +8,6 @@ class DistanceService {
// Conversion constants
static const double _metersToFeet = 3.28084;
static const double _metersToMiles = 0.000621371;
static const double _kmToMiles = 0.621371;
/// Format distance for display based on unit preference
///

View File

@@ -7,7 +7,6 @@ import 'package:xml/xml.dart';
import '../../models/node_profile.dart';
import '../../models/osm_node.dart';
import '../../app_state.dart';
import '../network_status.dart';
/// Fetches surveillance nodes from the direct OSM API using bbox query.
/// This is a fallback for when Overpass is not available (e.g., sandbox mode).

View File

@@ -1,5 +1,3 @@
import 'dart:typed_data';
import 'package:flutter/foundation.dart';
import 'package:http/http.dart' as http;

View File

@@ -54,23 +54,6 @@ class Uploader {
return UploadResult.failure(errorMessage: errorMsg);
}
// Generate changeset XML
String action;
switch (p.operation) {
case UploadOperation.create:
action = 'Add';
break;
case UploadOperation.modify:
action = 'Update';
break;
case UploadOperation.delete:
action = 'Delete';
break;
case UploadOperation.extract:
action = 'Extract';
break;
}
// Use the user's changeset comment, with XML sanitization
final sanitizedComment = _sanitizeXmlText(p.changesetComment);
final csXml = '''

View File

@@ -140,16 +140,6 @@ class SessionState extends ChangeNotifier {
notifyListeners();
}
bool _profileMatchesTags(NodeProfile profile, Map<String, String> tags) {
// Simple matching: check if all profile tags are present in node tags
for (final entry in profile.tags.entries) {
if (tags[entry.key] != entry.value) {
return false;
}
}
return true;
}
/// Calculate additional existing tags for a given profile change
Map<String, String> _calculateAdditionalExistingTags(NodeProfile? newProfile, OsmNode originalNode) {
final additionalTags = <String, String>{};
@@ -479,7 +469,7 @@ class SessionState extends ChangeNotifier {
}
/// Generate a default changeset comment for a submission
/// Handles special case of <Existing tags> profile by using "a" instead
/// Handles special case of `<Existing tags>` profile by using "a" instead
String _generateDefaultChangesetComment({
required NodeProfile? profile,
required UploadOperation operation,

View File

@@ -4,15 +4,11 @@ import 'package:flutter_map_animations/flutter_map_animations.dart';
import 'package:latlong2/latlong.dart';
import 'package:provider/provider.dart';
import '../app_state.dart' show AppState, FollowMeMode, UploadMode;
import '../app_state.dart' show AppState, FollowMeMode;
import '../services/offline_area_service.dart';
import '../services/network_status.dart';
import '../models/osm_node.dart';
import '../models/node_profile.dart';
import '../models/suspected_location.dart';
import '../models/tile_provider.dart';
import '../state/session_state.dart';
import 'debouncer.dart';
import 'node_provider_with_cache.dart';
import 'map/map_overlays.dart';
@@ -170,9 +166,7 @@ class MapViewState extends State<MapView> {
} catch (_) {
return [];
}
return mapBounds != null
? NodeProviderWithCache.instance.getCachedNodesForBounds(mapBounds)
: [];
return NodeProviderWithCache.instance.getCachedNodesForBounds(mapBounds);
} catch (e) {
debugPrint('[MapView] Could not get nearby nodes: $e');
return [];

View File

@@ -62,7 +62,6 @@ void main() {
data = json.decode(content) as Map<String, dynamic>;
} catch (e) {
fail('$name is not valid JSON: $e');
return; // unreachable, keeps analyzer happy
}
expect(
data['language'],

View File

@@ -1,5 +1,5 @@
import 'package:flutter_test/flutter_test.dart';
import '../../lib/services/network_status.dart';
import 'package:deflockapp/services/network_status.dart';
void main() {
group('NetworkStatus', () {