mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-08 02:07:57 -06:00
49 lines
1.4 KiB
Dart
49 lines
1.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:paperless_mobile/generated/l10n.dart';
|
|
|
|
class BottomNavBar extends StatelessWidget {
|
|
final int selectedIndex;
|
|
final void Function(int) onNavigationChanged;
|
|
|
|
const BottomNavBar(
|
|
{Key? key,
|
|
required this.selectedIndex,
|
|
required this.onNavigationChanged})
|
|
: super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return NavigationBar(
|
|
elevation: 4.0,
|
|
onDestinationSelected: onNavigationChanged,
|
|
selectedIndex: selectedIndex,
|
|
destinations: [
|
|
NavigationDestination(
|
|
icon: const Icon(Icons.description_outlined),
|
|
selectedIcon: Icon(
|
|
Icons.description,
|
|
color: Theme.of(context).colorScheme.primary,
|
|
),
|
|
label: S.of(context).bottomNavDocumentsPageLabel,
|
|
),
|
|
NavigationDestination(
|
|
icon: const Icon(Icons.document_scanner_outlined),
|
|
selectedIcon: Icon(
|
|
Icons.document_scanner,
|
|
color: Theme.of(context).colorScheme.primary,
|
|
),
|
|
label: S.of(context).bottomNavScannerPageLabel,
|
|
),
|
|
NavigationDestination(
|
|
icon: const Icon(Icons.sell_outlined),
|
|
selectedIcon: Icon(
|
|
Icons.sell,
|
|
color: Theme.of(context).colorScheme.primary,
|
|
),
|
|
label: S.of(context).bottomNavLabelsPageLabel,
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|