- Introduced a new Flutter project for the cxyz Android manga/comic reader, including essential files such as pubspec.yaml, AndroidManifest.xml, and Gradle configuration. - Added .gitignore files to exclude unnecessary files and directories for both the main project and Android-specific files. - Implemented initial README.md with project description, features, setup instructions, and API details for ComicLand, MangaRead, and MangaTown. - Configured analysis options and dependencies in pubspec.yaml to support Flutter development. - Established a pnpm workspace and lockfile for dependency management. - Included various Android resources such as icons, styles, and launch backgrounds for a complete application setup.
49 lines
1.4 KiB
Dart
49 lines
1.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
|
|
class AppShell extends StatelessWidget {
|
|
const AppShell({super.key, required this.navigationShell});
|
|
|
|
final StatefulNavigationShell navigationShell;
|
|
|
|
void _onTap(int index) {
|
|
navigationShell.goBranch(
|
|
index,
|
|
initialLocation: index == navigationShell.currentIndex,
|
|
);
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: navigationShell,
|
|
bottomNavigationBar: NavigationBar(
|
|
selectedIndex: navigationShell.currentIndex,
|
|
onDestinationSelected: _onTap,
|
|
destinations: const [
|
|
NavigationDestination(
|
|
icon: Icon(Icons.explore_outlined),
|
|
selectedIcon: Icon(Icons.explore),
|
|
label: 'Catalog',
|
|
),
|
|
NavigationDestination(
|
|
icon: Icon(Icons.collections_bookmark_outlined),
|
|
selectedIcon: Icon(Icons.collections_bookmark),
|
|
label: 'Library',
|
|
),
|
|
NavigationDestination(
|
|
icon: Icon(Icons.history_outlined),
|
|
selectedIcon: Icon(Icons.history),
|
|
label: 'History',
|
|
),
|
|
NavigationDestination(
|
|
icon: Icon(Icons.download_outlined),
|
|
selectedIcon: Icon(Icons.download),
|
|
label: 'Downloads',
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|