Commit also includes: - Initial implementation of shocker limits - minor code cleanup - version bump to 2.2 **Release 2.5 due very soon!**
39 lines
998 B
Dart
39 lines
998 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class BottomBar extends StatelessWidget {
|
|
final int currentIndex;
|
|
final Function(int) onTap;
|
|
|
|
const BottomBar({
|
|
required this.currentIndex,
|
|
required this.onTap,
|
|
Key? key,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return BottomNavigationBar(
|
|
currentIndex: currentIndex,
|
|
onTap: onTap,
|
|
items: const [
|
|
BottomNavigationBarItem(
|
|
icon: Icon(Icons.home),
|
|
label: 'Home',
|
|
),
|
|
BottomNavigationBarItem(
|
|
icon: Icon(Icons.settings),
|
|
label: 'Settings',
|
|
),
|
|
BottomNavigationBarItem(
|
|
icon: Icon(Icons.list),
|
|
label: 'Logs',
|
|
),
|
|
],
|
|
selectedItemColor: const Color.fromARGB(255, 211, 187, 255),
|
|
unselectedItemColor: Theme.of(context).textTheme.bodySmall?.color,
|
|
showUnselectedLabels: true,
|
|
selectedLabelStyle: const TextStyle(fontWeight: FontWeight.bold),
|
|
);
|
|
}
|
|
}
|