Show hoseline
This commit is contained in:
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'info_view.dart';
|
||||
import 'last_heard_view.dart';
|
||||
import 'devices_view.dart';
|
||||
import 'hose_view.dart';
|
||||
|
||||
class MainView extends StatefulWidget {
|
||||
const MainView({super.key});
|
||||
@@ -15,6 +16,7 @@ class _MainViewState extends State<MainView> {
|
||||
|
||||
final List<Widget> _views = const [
|
||||
DevicesView(),
|
||||
HoseView(),
|
||||
LastHeardView(),
|
||||
InfoView(),
|
||||
];
|
||||
@@ -24,6 +26,7 @@ class _MainViewState extends State<MainView> {
|
||||
return Scaffold(
|
||||
body: _views[_selectedIndex],
|
||||
bottomNavigationBar: BottomNavigationBar(
|
||||
type: BottomNavigationBarType.fixed,
|
||||
currentIndex: _selectedIndex,
|
||||
onTap: (index) => setState(() => _selectedIndex = index),
|
||||
items: const [
|
||||
@@ -31,6 +34,10 @@ class _MainViewState extends State<MainView> {
|
||||
icon: Icon(Icons.devices),
|
||||
label: 'Devices',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.water_drop),
|
||||
label: 'Hose',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.history),
|
||||
label: 'Last Heard',
|
||||
|
||||
Reference in New Issue
Block a user