From 2625a2ec6cc1d008c14f9d1ebde9953aef19b5b6 Mon Sep 17 00:00:00 2001 From: Joshua Date: Sun, 7 Jul 2024 12:44:03 -0600 Subject: [PATCH] starting docs --- mobile/app/lib/main.dart | 18 +++++++++++------- mobile/app/test/widget_test.dart | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/mobile/app/lib/main.dart b/mobile/app/lib/main.dart index 95974ea..30672db 100644 --- a/mobile/app/lib/main.dart +++ b/mobile/app/lib/main.dart @@ -1,3 +1,4 @@ +import 'package:app/pages/conversation_widget.dart'; import 'package:app/pages/settings_widget.dart'; import 'package:app/pages/conversations_list_widget.dart'; import 'package:flutter/material.dart'; @@ -23,12 +24,16 @@ BottomNavigationBarItem _buildNavigationItem(int index) { IconData iconData = Icons.error; switch (index) { case 0: + label = 'Settings'; + iconData = Icons.settings; + break; + case 1: label = 'Home'; iconData = Icons.home; break; - case 1: - label = 'Settings'; - iconData = Icons.settings; + case 2: + label = 'Chat'; + iconData = Icons.bubble_chart; break; } return BottomNavigationBarItem( @@ -48,14 +53,13 @@ void main() { class MyApp extends ConsumerWidget { MyApp({super.key}); - final selectedIndexProvider = StateProvider((_) => 0); // Initial state + final selectedIndexProvider = StateProvider((_) => 2); // Initial state // This list holds the pages to navigate between final List _pages = [ - // Replace with the widget for your first page (e.g., HomeScreen()) - const Center(child: ConversationsListWidget()), - // Replace with the widget for your second page (e.g., SettingsPage()) const Center(child: SettingsWidget()), + const Center(child: ConversationsListWidget()), + const Center(child: ConversationWidget()), ]; // This widget is the root of your application. diff --git a/mobile/app/test/widget_test.dart b/mobile/app/test/widget_test.dart index 4e2a713..1a3d2a8 100644 --- a/mobile/app/test/widget_test.dart +++ b/mobile/app/test/widget_test.dart @@ -13,7 +13,7 @@ import 'package:app/main.dart'; void main() { testWidgets('Counter increments smoke test', (WidgetTester tester) async { // Build our app and trigger a frame. - await tester.pumpWidget(const MyApp()); + await tester.pumpWidget(MyApp()); // Verify that our counter starts at 0. expect(find.text('0'), findsOneWidget);