diff --git a/lib/datacollection/measurements_collector.dart b/lib/datacollection/measurements_collector.dart index b6ad1be..6c57f5e 100644 --- a/lib/datacollection/measurements_collector.dart +++ b/lib/datacollection/measurements_collector.dart @@ -3,7 +3,7 @@ import 'package:flutter_blue/flutter_blue.dart'; import 'package:lsa_gloves/datacollection/measurements_listener.dart'; import 'package:lsa_gloves/datacollection/measurements_writer.dart'; import 'dart:developer' as developer; -import 'package:lsa_gloves/model/glove_measurement.dart'; +import 'package:lsa_gloves/glove/glove_measurement.dart'; /// Class to take in charge the responsibility of receiving and processing /// the measurements taken from the device. diff --git a/lib/datacollection/measurements_listener.dart b/lib/datacollection/measurements_listener.dart index 72e1651..29adbb1 100644 --- a/lib/datacollection/measurements_listener.dart +++ b/lib/datacollection/measurements_listener.dart @@ -1,4 +1,4 @@ -import 'package:lsa_gloves/model/glove_measurement.dart'; +import 'package:lsa_gloves/glove/glove_measurement.dart'; /// "Interface" for classes that need to react to measurement events. abstract class MeasurementsListener { diff --git a/lib/datacollection/measurements_writer.dart b/lib/datacollection/measurements_writer.dart index 3557195..a396b13 100644 --- a/lib/datacollection/measurements_writer.dart +++ b/lib/datacollection/measurements_writer.dart @@ -1,7 +1,7 @@ import 'package:flutter_blue/flutter_blue.dart'; import 'package:lsa_gloves/datacollection/measurements_listener.dart'; import 'package:lsa_gloves/datacollection/storage.dart'; -import 'package:lsa_gloves/model/glove_measurement.dart'; +import 'package:lsa_gloves/glove/glove_measurement.dart'; /// Writer class to receive GloveMeasurements and store them into files. class MeasurementsWriter with MeasurementsListener { diff --git a/lib/datacollection/storage.dart b/lib/datacollection/storage.dart index ee3e4e2..1c92c45 100644 --- a/lib/datacollection/storage.dart +++ b/lib/datacollection/storage.dart @@ -1,8 +1,8 @@ import 'dart:async'; import 'dart:io'; import 'dart:convert'; -import 'package:lsa_gloves/model/finger.dart'; -import 'package:lsa_gloves/model/glove_measurement.dart'; +import 'package:lsa_gloves/glove/finger.dart'; +import 'package:lsa_gloves/glove/glove_measurement.dart'; import 'package:lsa_gloves/edgeimpulse/api_client.dart'; import 'package:path_provider/path_provider.dart'; import 'dart:developer' as developer; diff --git a/lib/model/acceleration.dart b/lib/glove/acceleration.dart similarity index 91% rename from lib/model/acceleration.dart rename to lib/glove/acceleration.dart index 59ff4e4..d807f4f 100644 --- a/lib/model/acceleration.dart +++ b/lib/glove/acceleration.dart @@ -1,5 +1,5 @@ -import 'package:lsa_gloves/model/vector3.dart'; +import 'package:lsa_gloves/glove/vector3.dart'; /// Class to encapsulate the acceleration values received from the glove. class Acceleration with Vector3 { diff --git a/lib/model/finger.dart b/lib/glove/finger.dart similarity index 100% rename from lib/model/finger.dart rename to lib/glove/finger.dart diff --git a/lib/model/glove_measurement.dart b/lib/glove/glove_measurement.dart similarity index 100% rename from lib/model/glove_measurement.dart rename to lib/glove/glove_measurement.dart diff --git a/lib/model/gyro.dart b/lib/glove/gyro.dart similarity index 90% rename from lib/model/gyro.dart rename to lib/glove/gyro.dart index b4d81c4..a8ebc5f 100644 --- a/lib/model/gyro.dart +++ b/lib/glove/gyro.dart @@ -1,5 +1,5 @@ -import 'package:lsa_gloves/model/vector3.dart'; +import 'package:lsa_gloves/glove/vector3.dart'; /// Class to encapsulate the gyroscope values received from the glove. class Gyro with Vector3 { diff --git a/lib/model/sensor_value.dart b/lib/glove/sensor_value.dart similarity index 100% rename from lib/model/sensor_value.dart rename to lib/glove/sensor_value.dart diff --git a/lib/model/vector3.dart b/lib/glove/vector3.dart similarity index 100% rename from lib/model/vector3.dart rename to lib/glove/vector3.dart diff --git a/lib/main.dart b/lib/main.dart index 1e40267..41cae65 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -11,13 +11,12 @@ void main() { runApp( ChangeNotifierProvider( create: (_) => BluetoothBackend(), - child: MyApp(), + child: LsaGlovesApp(), ) ); } -class MyApp extends StatelessWidget { - // This widget is the root of your application. +class LsaGlovesApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( diff --git a/lib/pages/ble_data_collection_page.dart b/lib/pages/ble_data_collection_page.dart index 5ccea25..cb7b6ed 100644 --- a/lib/pages/ble_data_collection_page.dart +++ b/lib/pages/ble_data_collection_page.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; import 'package:lsa_gloves/connection/ble/bluetooth_backend.dart'; import 'package:lsa_gloves/datacollection/measurements_collector.dart'; import 'package:lsa_gloves/datacollection/measurements_listener.dart'; -import 'package:lsa_gloves/model/glove_measurement.dart'; +import 'package:lsa_gloves/glove/glove_measurement.dart'; import 'package:provider/provider.dart'; import 'package:simple_timer/simple_timer.dart'; import 'dart:developer' as developer; diff --git a/lib/pages/data_visualization_page.dart b/lib/pages/data_visualization_page.dart index 96254a4..fb3bb76 100644 --- a/lib/pages/data_visualization_page.dart +++ b/lib/pages/data_visualization_page.dart @@ -3,10 +3,10 @@ import 'package:intl/intl.dart'; import 'package:lsa_gloves/connection/ble/bluetooth_backend.dart'; import 'package:lsa_gloves/datacollection/measurements_collector.dart'; import 'package:lsa_gloves/datacollection/measurements_listener.dart'; -import 'package:lsa_gloves/model/finger.dart'; -import 'package:lsa_gloves/model/glove_measurement.dart'; -import 'package:lsa_gloves/model/sensor_value.dart'; -import 'package:lsa_gloves/model/vector3.dart'; +import 'package:lsa_gloves/glove/finger.dart'; +import 'package:lsa_gloves/glove/glove_measurement.dart'; +import 'package:lsa_gloves/glove/sensor_value.dart'; +import 'package:lsa_gloves/glove/vector3.dart'; import 'package:lsa_gloves/navigation/navigation_drawer.dart'; import 'package:provider/provider.dart'; import 'package:syncfusion_flutter_charts/charts.dart'; diff --git a/lib/pages/file_content_chart_page.dart b/lib/pages/file_content_chart_page.dart index 9875c51..68df00a 100644 --- a/lib/pages/file_content_chart_page.dart +++ b/lib/pages/file_content_chart_page.dart @@ -2,11 +2,11 @@ import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; import 'package:lsa_gloves/connection/ble/bluetooth_backend.dart'; import 'package:lsa_gloves/datacollection/storage.dart'; -import 'package:lsa_gloves/model/acceleration.dart'; -import 'package:lsa_gloves/model/finger.dart'; -import 'package:lsa_gloves/model/gyro.dart'; -import 'package:lsa_gloves/model/sensor_value.dart'; -import 'package:lsa_gloves/model/vector3.dart'; +import 'package:lsa_gloves/glove/acceleration.dart'; +import 'package:lsa_gloves/glove/finger.dart'; +import 'package:lsa_gloves/glove/gyro.dart'; +import 'package:lsa_gloves/glove/sensor_value.dart'; +import 'package:lsa_gloves/glove/vector3.dart'; import 'package:lsa_gloves/navigation/navigation_drawer.dart'; import 'package:provider/provider.dart'; import 'package:syncfusion_flutter_charts/charts.dart'; diff --git a/test/widget_test.dart b/test/widget_test.dart index 2f166ea..408ecec 100644 --- a/test/widget_test.dart +++ b/test/widget_test.dart @@ -13,7 +13,7 @@ import 'package:lsa_gloves/main.dart'; void main() { testWidgets('Counter increments smoke test', (WidgetTester tester) async { // Build our app and trigger a frame. - await tester.pumpWidget(MyApp()); + await tester.pumpWidget(LsaGlovesApp()); // Verify that our counter starts at 0. expect(find.text('0'), findsOneWidget);