From 7d9d12d7a76e00e818298ec1e4f8e8057ce6dfac Mon Sep 17 00:00:00 2001 From: zkhan Date: Fri, 16 Aug 2024 08:36:16 -0400 Subject: [PATCH] reorg --- lib/data/main_database_helper.dart | 4 ++-- lib/data/realm_helper.dart | 24 +++++++++---------- lib/{ => destination}/airport.dart | 4 ++-- lib/{ => destination}/airway.dart | 4 ++-- lib/{ => destination}/destination.dart | 2 +- .../destination_calculations.dart | 4 ++-- lib/{ => destination}/nav.dart | 2 +- lib/find_screen.dart | 2 +- lib/instrument_list.dart | 4 ++-- lib/longpress_widget.dart | 6 ++--- lib/map_screen.dart | 4 ++-- lib/plan/plan_file_widget.dart | 2 +- lib/plan/plan_item_widget.dart | 4 ++-- lib/plan/plan_line_widget.dart | 4 ++-- lib/plan/plan_route.dart | 6 ++--- lib/plan/waypoint.dart | 2 +- lib/plate_screen.dart | 2 +- lib/storage.dart | 2 +- 18 files changed, 41 insertions(+), 41 deletions(-) rename lib/{ => destination}/airport.dart (99%) rename lib/{ => destination}/airway.dart (98%) rename lib/{ => destination}/destination.dart (99%) rename lib/{ => destination}/destination_calculations.dart (95%) rename lib/{ => destination}/nav.dart (87%) diff --git a/lib/data/main_database_helper.dart b/lib/data/main_database_helper.dart index a319632..89ce156 100644 --- a/lib/data/main_database_helper.dart +++ b/lib/data/main_database_helper.dart @@ -7,8 +7,8 @@ import 'package:latlong2/latlong.dart'; import 'package:path/path.dart'; import 'package:sqflite/sqflite.dart'; -import '../destination.dart'; -import '../saa.dart'; +import 'package:avaremp/destination/destination.dart'; +import 'package:avaremp/saa.dart'; import 'cifp.dart'; class MainDatabaseHelper { diff --git a/lib/data/realm_helper.dart b/lib/data/realm_helper.dart index 57e1922..5a65c83 100644 --- a/lib/data/realm_helper.dart +++ b/lib/data/realm_helper.dart @@ -15,18 +15,18 @@ import 'package:avaremp/data/weather_winds.dart'; import 'package:avaremp/wnb.dart'; import 'package:latlong2/latlong.dart'; import 'package:realm/realm.dart'; -import '../aircraft.dart'; -import '../checklist.dart'; -import '../destination.dart'; -import '../plan/plan_route.dart'; -import '../storage.dart'; -import '../weather/airep.dart'; -import '../weather/airsigmet.dart'; -import '../weather/metar.dart'; -import '../weather/notam.dart'; -import '../weather/taf.dart'; -import '../weather/tfr.dart'; -import '../weather/winds_aloft.dart'; +import 'package:avaremp/aircraft.dart'; +import 'package:avaremp/checklist.dart'; +import 'package:avaremp/destination/destination.dart'; +import 'package:avaremp/plan/plan_route.dart'; +import 'package:avaremp/storage.dart'; +import 'package:avaremp/weather/airep.dart'; +import 'package:avaremp/weather/airsigmet.dart'; +import 'package:avaremp/weather/metar.dart'; +import 'package:avaremp/weather/notam.dart'; +import 'package:avaremp/weather/taf.dart'; +import 'package:avaremp/weather/tfr.dart'; +import 'package:avaremp/weather/winds_aloft.dart'; class RealmHelper { diff --git a/lib/airport.dart b/lib/destination/airport.dart similarity index 99% rename from lib/airport.dart rename to lib/destination/airport.dart index c97f457..21bac08 100644 --- a/lib/airport.dart +++ b/lib/destination/airport.dart @@ -1,13 +1,13 @@ import 'dart:math'; -import 'package:avaremp/destination.dart'; +import 'destination.dart'; import 'package:avaremp/geo_calculations.dart'; import 'package:avaremp/storage.dart'; import 'package:avaremp/weather/metar.dart'; import 'package:flutter/material.dart'; import 'package:latlong2/latlong.dart'; -import 'constants.dart'; +import '../constants.dart'; class Airport { diff --git a/lib/airway.dart b/lib/destination/airway.dart similarity index 98% rename from lib/airway.dart rename to lib/destination/airway.dart index b1b8982..bc19db8 100644 --- a/lib/airway.dart +++ b/lib/destination/airway.dart @@ -1,9 +1,9 @@ -import 'package:avaremp/destination.dart'; +import 'destination.dart'; import 'package:avaremp/geo_calculations.dart'; import 'package:avaremp/plan/waypoint.dart'; import 'package:latlong2/latlong.dart'; -import 'data/main_database_helper.dart'; +import '../data/main_database_helper.dart'; // airway calculations diff --git a/lib/destination.dart b/lib/destination/destination.dart similarity index 99% rename from lib/destination.dart rename to lib/destination/destination.dart index a1f9602..a068b2e 100644 --- a/lib/destination.dart +++ b/lib/destination/destination.dart @@ -5,7 +5,7 @@ import 'package:latlong2/latlong.dart'; import 'package:material_design_icons_flutter/material_design_icons_flutter.dart'; import 'destination_calculations.dart'; -import 'data/main_database_helper.dart'; +import 'package:avaremp/data/main_database_helper.dart'; class Destination { diff --git a/lib/destination_calculations.dart b/lib/destination/destination_calculations.dart similarity index 95% rename from lib/destination_calculations.dart rename to lib/destination/destination_calculations.dart index 054fbad..0ea5495 100644 --- a/lib/destination_calculations.dart +++ b/lib/destination/destination_calculations.dart @@ -1,9 +1,9 @@ import 'dart:math'; -import 'package:avaremp/destination.dart'; +import 'package:avaremp/destination/destination.dart'; import 'package:latlong2/latlong.dart'; -import 'geo_calculations.dart'; +import '../geo_calculations.dart'; class DestinationCalculations { diff --git a/lib/nav.dart b/lib/destination/nav.dart similarity index 87% rename from lib/nav.dart rename to lib/destination/nav.dart index 98124c2..2c354e7 100644 --- a/lib/nav.dart +++ b/lib/destination/nav.dart @@ -1,5 +1,5 @@ import 'package:auto_size_text/auto_size_text.dart'; -import 'package:avaremp/destination.dart'; +import 'package:avaremp/destination/destination.dart'; import 'package:flutter/material.dart'; class Nav { diff --git a/lib/find_screen.dart b/lib/find_screen.dart index 90aa859..c221c36 100644 --- a/lib/find_screen.dart +++ b/lib/find_screen.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; import 'package:latlong2/latlong.dart'; import 'chart.dart'; import 'constants.dart'; -import 'destination.dart'; +import 'package:avaremp/destination/destination.dart'; import 'gps.dart'; import 'data/main_database_helper.dart'; import 'main_screen.dart'; diff --git a/lib/instrument_list.dart b/lib/instrument_list.dart index 424e196..2de1c23 100644 --- a/lib/instrument_list.dart +++ b/lib/instrument_list.dart @@ -1,6 +1,6 @@ import 'dart:math'; -import 'package:avaremp/destination_calculations.dart'; +import 'package:avaremp/destination/destination_calculations.dart'; import 'package:avaremp/geo_calculations.dart'; import 'package:avaremp/pfd_painter.dart'; import 'package:avaremp/plan/plan_route.dart'; @@ -13,7 +13,7 @@ import 'package:intl/intl.dart'; import 'package:latlong2/latlong.dart'; import 'constants.dart'; -import 'destination.dart'; +import 'package:avaremp/destination/destination.dart'; import 'gps.dart'; diff --git a/lib/longpress_widget.dart b/lib/longpress_widget.dart index 7c6c8b2..b55fa45 100644 --- a/lib/longpress_widget.dart +++ b/lib/longpress_widget.dart @@ -17,11 +17,11 @@ import 'package:flutter/material.dart'; import 'package:latlong2/latlong.dart'; import 'package:toastification/toastification.dart'; -import 'airport.dart'; +import 'destination/airport.dart'; import 'constants.dart'; -import 'destination.dart'; +import 'package:avaremp/destination/destination.dart'; import 'weather/metar.dart'; -import 'nav.dart'; +import 'package:avaremp/destination/nav.dart'; class LongPressWidget extends StatefulWidget { final Destination destination; diff --git a/lib/map_screen.dart b/lib/map_screen.dart index e30f2dc..455136e 100644 --- a/lib/map_screen.dart +++ b/lib/map_screen.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'dart:io'; import 'dart:math'; import 'package:auto_size_text/auto_size_text.dart'; -import 'package:avaremp/airport.dart'; +import 'package:avaremp/destination/airport.dart'; import 'package:avaremp/documents_screen.dart'; import 'package:avaremp/gdl90/nexrad_cache.dart'; import 'package:avaremp/geo_calculations.dart'; @@ -29,7 +29,7 @@ import 'package:material_design_icons_flutter/material_design_icons_flutter.dart import 'package:path/path.dart'; import 'chart.dart'; import 'constants.dart'; -import 'destination.dart'; +import 'package:avaremp/destination/destination.dart'; import 'download_screen.dart'; import 'gps.dart'; import 'longpress_widget.dart'; diff --git a/lib/plan/plan_file_widget.dart b/lib/plan/plan_file_widget.dart index b07d7e2..0eb84e6 100644 --- a/lib/plan/plan_file_widget.dart +++ b/lib/plan/plan_file_widget.dart @@ -9,7 +9,7 @@ import 'package:flutter/material.dart'; import 'package:avaremp/aircraft.dart'; import 'package:avaremp/constants.dart'; -import 'package:avaremp/destination.dart'; +import 'package:avaremp/destination/destination.dart'; class PlanFileWidget extends StatefulWidget { const PlanFileWidget({super.key}); diff --git a/lib/plan/plan_item_widget.dart b/lib/plan/plan_item_widget.dart index ef1a695..72b4bc9 100644 --- a/lib/plan/plan_item_widget.dart +++ b/lib/plan/plan_item_widget.dart @@ -1,9 +1,9 @@ import 'plan_line_widget.dart'; import 'package:avaremp/plan/waypoint.dart'; import 'package:flutter/material.dart'; -import 'package:avaremp/airway.dart'; +import 'package:avaremp/destination/airway.dart'; import 'package:avaremp/constants.dart'; -import 'package:avaremp/destination.dart'; +import 'package:avaremp/destination/destination.dart'; class PlanItemWidget extends StatefulWidget { final Waypoint waypoint; diff --git a/lib/plan/plan_line_widget.dart b/lib/plan/plan_line_widget.dart index efa3deb..9e2f738 100644 --- a/lib/plan/plan_line_widget.dart +++ b/lib/plan/plan_line_widget.dart @@ -1,8 +1,8 @@ -import 'package:avaremp/destination_calculations.dart'; +import 'package:avaremp/destination/destination_calculations.dart'; import 'package:flutter/material.dart'; import 'package:avaremp/constants.dart'; -import 'package:avaremp/destination.dart'; +import 'package:avaremp/destination/destination.dart'; class PlanLineWidget extends StatefulWidget { diff --git a/lib/plan/plan_route.dart b/lib/plan/plan_route.dart index 847fa84..43d6702 100644 --- a/lib/plan/plan_route.dart +++ b/lib/plan/plan_route.dart @@ -1,7 +1,7 @@ import 'dart:convert'; -import 'package:avaremp/airway.dart'; +import 'package:avaremp/destination/airway.dart'; import 'package:avaremp/data/main_database_helper.dart'; import 'package:avaremp/faa_dates.dart'; import 'package:avaremp/geo_calculations.dart'; @@ -16,8 +16,8 @@ import 'package:latlong2/latlong.dart'; import 'dart:math'; import 'package:http/http.dart' as http; -import 'package:avaremp/destination.dart'; -import 'package:avaremp/destination_calculations.dart'; +import 'package:avaremp/destination/destination.dart'; +import 'package:avaremp/destination/destination_calculations.dart'; import 'package:avaremp/gps.dart'; class PlanRoute { diff --git a/lib/plan/waypoint.dart b/lib/plan/waypoint.dart index 839cad5..fd9c622 100644 --- a/lib/plan/waypoint.dart +++ b/lib/plan/waypoint.dart @@ -1,5 +1,5 @@ -import '../destination.dart'; +import 'package:avaremp/destination/destination.dart'; class Waypoint { diff --git a/lib/plate_screen.dart b/lib/plate_screen.dart index 8999631..210ec11 100644 --- a/lib/plate_screen.dart +++ b/lib/plate_screen.dart @@ -1,7 +1,7 @@ import 'dart:math'; import 'dart:ui' as ui; -import 'package:avaremp/destination.dart'; +import 'package:avaremp/destination/destination.dart'; import 'package:avaremp/geo_calculations.dart'; import 'package:avaremp/path_utils.dart'; import 'package:avaremp/storage.dart'; diff --git a/lib/storage.dart b/lib/storage.dart index 38ccf57..dddafcd 100644 --- a/lib/storage.dart +++ b/lib/storage.dart @@ -48,7 +48,7 @@ import 'package:wakelock_plus/wakelock_plus.dart'; import 'app_settings.dart'; import 'data/db_general.dart'; import 'data/realm_helper.dart'; -import 'destination.dart'; +import 'package:avaremp/destination/destination.dart'; import 'download_manager.dart'; import 'flight_timer.dart'; import 'gdl90/message.dart';