mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
64 lines
1.5 KiB
Dart
64 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:revanced_manager_flutter/theme.dart';
|
|
import 'package:revanced_manager_flutter/ui/screens/home_screen.dart';
|
|
import 'package:revanced_manager_flutter/ui/screens/patcher_screen.dart';
|
|
|
|
void main() {
|
|
runApp(const MyApp());
|
|
}
|
|
|
|
class MyApp extends StatelessWidget {
|
|
const MyApp({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
debugShowCheckedModeBanner: false,
|
|
title: 'ReVanced Manager',
|
|
theme: lightTheme,
|
|
darkTheme: darkTheme,
|
|
home: const Navigation(),
|
|
);
|
|
}
|
|
}
|
|
|
|
class Navigation extends StatefulWidget {
|
|
const Navigation({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
State<Navigation> createState() => _NavigationState();
|
|
}
|
|
|
|
class _NavigationState extends State<Navigation> {
|
|
int currentPageIndex = 0;
|
|
final List<Widget> screens = [
|
|
const HomeScreen(),
|
|
const PatcherScreen(),
|
|
];
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: screens[currentPageIndex],
|
|
bottomNavigationBar: NavigationBar(
|
|
onDestinationSelected: (int index) {
|
|
setState(() {
|
|
currentPageIndex = index;
|
|
});
|
|
},
|
|
selectedIndex: currentPageIndex,
|
|
destinations: const <Widget>[
|
|
NavigationDestination(
|
|
icon: Icon(Icons.dashboard),
|
|
label: "Dashboard",
|
|
),
|
|
NavigationDestination(
|
|
icon: Icon(Icons.build),
|
|
label: "Patcher",
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|