diff --git a/assets/images/ic_launcher.png b/assets/images/ic_launcher.png new file mode 100644 index 0000000..a893372 Binary files /dev/null and b/assets/images/ic_launcher.png differ diff --git a/assets/images/waving_hand.png b/assets/images/waving_hand.png deleted file mode 100644 index 8083da5..0000000 Binary files a/assets/images/waving_hand.png and /dev/null differ diff --git a/lib/navigation/navigation_drawer.dart b/lib/navigation/navigation_drawer.dart index 67c1c2e..a8f1ac7 100644 --- a/lib/navigation/navigation_drawer.dart +++ b/lib/navigation/navigation_drawer.dart @@ -1,11 +1,11 @@ import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import 'package:lsa_gloves/pages/ble_data_collection_page.dart'; import 'package:lsa_gloves/pages/ble_devices_connection_page.dart'; import 'package:lsa_gloves/connection/wifi/socket.dart'; import 'package:lsa_gloves/pages/data_visualization_page.dart'; import 'package:lsa_gloves/pages/file_manager_page.dart'; import 'package:lsa_gloves/pages/interpretation_page.dart'; +import 'package:material_design_icons_flutter/material_design_icons_flutter.dart'; class NavDrawer extends StatelessWidget { const NavDrawer({Key? key}) : super(key: key); @@ -44,10 +44,7 @@ class NavDrawer extends StatelessWidget { builder: (context) => FileManagerPage(), maintainState: false)); }), ListTile( - leading: Container( - width: 25, - height: 25, - child: ImageIcon(AssetImage("assets/images/waving_hand.png"))), + leading: Icon(MdiIcons.handWaveOutline), title: const Text("Recolectar data"), onTap: () { Navigator.of(context).push(MaterialPageRoute( @@ -67,7 +64,8 @@ class NavDrawer extends StatelessWidget { title: const Text("Interpretación"), onTap: () { Navigator.of(context).push(MaterialPageRoute( - builder: (context) => InterpretationPage(), maintainState: false)); + builder: (context) => InterpretationPage(), + maintainState: false)); }) ])); } diff --git a/lib/pages/home_page.dart b/lib/pages/home_page.dart index 610ae59..f46b0f3 100644 --- a/lib/pages/home_page.dart +++ b/lib/pages/home_page.dart @@ -1,7 +1,12 @@ - import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:material_design_icons_flutter/material_design_icons_flutter.dart'; import '../navigation/navigation_drawer.dart'; +import 'ble_data_collection_page.dart'; +import 'ble_devices_connection_page.dart'; +import 'data_visualization_page.dart'; +import 'file_manager_page.dart'; +import 'interpretation_page.dart'; class HomePage extends StatefulWidget { const HomePage({Key? key}) : super(key: key); @@ -11,18 +16,141 @@ class HomePage extends StatefulWidget { } class _HomePageState extends State { - @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - title: Text('LSA Gloves'), - ), - drawer: NavDrawer(), - body: Center( - child: Text("QUE PONEMOS EN LA HOME ??"), - )); + appBar: AppBar( + title: Text('LSA Gloves'), + ), + drawer: NavDrawer(), + body: Center( + child: GridView.count( + primary: false, + padding: const EdgeInsets.all(8), + crossAxisSpacing: 10, + mainAxisSpacing: 10, + crossAxisCount: 2, + children: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).push(MaterialPageRoute( + builder: (context) => BleGloveConnectionPage(), + maintainState: false)); + }, + child: Container( + padding: const EdgeInsets.all(8), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Icon(Icons.bluetooth, size: 100), + Text( + "Conexión", + textScaleFactor: 1.5, + ) + ], + ), + )), + ElevatedButton( + onPressed: () { + Navigator.of(context).push(MaterialPageRoute( + builder: (context) => FileManagerPage(), + maintainState: false)); + }, + child: Container( + padding: const EdgeInsets.all(8), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Icon(Icons.file_copy_outlined, size: 100), + Text( + "Archivos", + textScaleFactor: 1.5, + ) + ], + ), + )), + ElevatedButton( + onPressed: () { + Navigator.of(context).push(MaterialPageRoute( + builder: (context) => InterpretationPage(), + maintainState: false)); + }, + child: Container( + padding: const EdgeInsets.all(8), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Icon(Icons.translate, size: 100), + Text( + "Interpretación", + textScaleFactor: 1.5, + ) + ], + ), + )), + ElevatedButton( + onPressed: () { + Navigator.of(context).push(MaterialPageRoute( + builder: (context) => BleDataCollectionPage(), + maintainState: false)); + }, + child: Container( + padding: const EdgeInsets.all(8), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Icon( + MdiIcons.handWaveOutline, + size: 100, + ), + Text( + "Recolección", + textScaleFactor: 1.5, + ) + ], + ), + )), + ElevatedButton( + onPressed: () { + Navigator.of(context).push(MaterialPageRoute( + builder: (context) => DataVisualizationPage(), + maintainState: false)); + }, + child: Container( + padding: const EdgeInsets.all(8), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Icon( + MdiIcons.chartLine, + size: 100, + ), + Text( + "Visualizador", + textScaleFactor: 1.5, + ) + ], + ), + )), + ElevatedButton( + onPressed: () => {}, + child: Container( + padding: const EdgeInsets.all(8), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Icon( + MdiIcons.informationOutline, + size: 100, + ), + Text( + "Acerca", + textScaleFactor: 1.5, + ) + ], + ), + )), + ], + ))); } - - } diff --git a/pubspec.lock b/pubspec.lock index 64cbfe3..813bc63 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -28,7 +28,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.6.1" + version: "2.8.2" boolean_selector: dependency: transitive description: @@ -42,14 +42,14 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" clock: dependency: transitive description: @@ -162,14 +162,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10" + version: "0.12.11" + material_design_icons_flutter: + dependency: "direct main" + description: + name: material_design_icons_flutter + url: "https://pub.dartlang.org" + source: hosted + version: "5.0.6595" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.7.0" nested: dependency: transitive description: @@ -349,7 +356,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.4.3" typed_data: dependency: transitive description: @@ -370,7 +377,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" win32: dependency: transitive description: @@ -386,5 +393,5 @@ packages: source: hosted version: "0.2.0" sdks: - dart: ">=2.13.0 <3.0.0" + dart: ">=2.14.0 <3.0.0" flutter: ">=2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 249c4a3..7442c53 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -37,6 +37,8 @@ dependencies: synchronized: ^3.0.0 syncfusion_flutter_charts: ^19.3.45 intl: "^0.17.0" + material_design_icons_flutter: 5.0.6595 + dev_dependencies: flutter_test: @@ -58,7 +60,7 @@ flutter: - assets/audios/ - assets/secrets.json - assets/images/ - - assets/images/waving_hand.png + - assets/images/ic_launcher.png # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware.