first app design

This commit is contained in:
root
2026-05-24 02:35:37 -04:00
parent c842eed601
commit d04c8ce437
138 changed files with 9672 additions and 0 deletions
@@ -0,0 +1,45 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart';
import '../../../l10n/app_localizations.dart';
class ClientShell extends ConsumerWidget {
final Widget child;
const ClientShell({super.key, required this.child});
@override
Widget build(BuildContext context, WidgetRef ref) {
final location = GoRouterState.of(context).matchedLocation;
final l10n = AppLocalizations.of(context);
int currentIndex = 0;
if (location == '/client/bookings') currentIndex = 1;
return Scaffold(
body: child,
bottomNavigationBar: NavigationBar(
selectedIndex: currentIndex,
onDestinationSelected: (i) {
if (i == 0) {
context.go('/client');
} else {
context.go('/client/bookings');
}
},
destinations: [
NavigationDestination(
icon: const Icon(Icons.search_outlined),
selectedIcon: const Icon(Icons.search),
label: l10n.browse,
),
NavigationDestination(
icon: const Icon(Icons.bookmark_outline),
selectedIcon: const Icon(Icons.bookmark),
label: l10n.myBookings,
),
],
),
);
}
}