feat: navigation setup.

This commit is contained in:
Aunali321 2022-07-31 13:30:11 +05:30
parent fcc268c9da
commit 6cbc122714
9 changed files with 333 additions and 17 deletions

Binary file not shown.

View File

@ -0,0 +1,17 @@
<svg width="278" height="278" viewBox="0 0 278 278" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="0.504395" y="0.878906" width="277" height="277" fill="#111623"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M175.572 86.8149H115.865V100.914H175.572V86.8149ZM105.865 86.8149V100.914H101.731C93.447 100.914 86.7312 107.63 86.7312 115.914V152.309H69.5005C63.9776 152.309 59.5005 156.786 59.5005 162.309V170.311C59.5005 175.834 63.9776 180.311 69.5005 180.311H86.7312V184.943C86.7312 193.228 93.4469 199.943 101.731 199.943H189.504C197.789 199.943 204.504 193.228 204.504 184.943V115.914C204.504 107.63 197.789 100.914 189.504 100.914H185.572V86.8149C185.572 81.2921 181.095 76.8149 175.572 76.8149H115.865C110.342 76.8149 105.865 81.2921 105.865 86.8149ZM86.7312 180.311H133.128C138.651 180.311 143.128 175.834 143.128 170.311V162.309C143.128 156.786 138.651 152.309 133.128 152.309H86.7312V180.311Z" fill="#F5F5F5"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M86.7312 180.311H69.5005C63.9776 180.311 59.5005 175.834 59.5005 170.311V162.309C59.5005 156.786 63.9776 152.309 69.5005 152.309H86.7312V180.311Z" fill="#FF6B78"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M86.7312 180.311H69.5005C63.9776 180.311 59.5005 175.834 59.5005 170.311V162.309C59.5005 156.786 63.9776 152.309 69.5005 152.309H86.7312V180.311Z" fill="url(#paint0_linear_39_40)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M86.7312 180.311H69.5005C63.9776 180.311 59.5005 175.834 59.5005 170.311V162.309C59.5005 156.786 63.9776 152.309 69.5005 152.309H86.7312V180.311Z" fill="url(#paint1_linear_39_40)"/>
<defs>
<linearGradient id="paint0_linear_39_40" x1="42.4557" y1="104.883" x2="122.266" y2="207.514" gradientUnits="userSpaceOnUse">
<stop stop-color="#4C53F5"/>
<stop offset="1" stop-color="#66E3FF"/>
</linearGradient>
<linearGradient id="paint1_linear_39_40" x1="42.4557" y1="104.883" x2="122.266" y2="207.514" gradientUnits="userSpaceOnUse">
<stop stop-color="#353DFF"/>
<stop offset="1" stop-color="#3DDCFF"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

8
lib/constants.dart Normal file
View File

@ -0,0 +1,8 @@
import 'package:flutter/material.dart';
const purple80 = Color(0xFFD0BCFF);
const purpleGrey80 = Color(0xFFCCC2DC);
const pink80 = Color(0xFFEFB8C8);
const purple40 = Color(0xFF6650a4);
const purpleGrey40 = Color(0xFF625b71);
const pink40 = Color(0xFF7D5260);

View File

@ -1,5 +1,7 @@
import 'package:flutter/material.dart';
import 'package:revanced_manager_flutter/ui/screens/home_screen.dart';
import 'package:revanced_manager_flutter/ui/screens/patcher_screen.dart';
import 'constants.dart';
void main() {
runApp(const MyApp());
@ -11,11 +13,70 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'ReVanced Manager',
theme: ThemeData(
primarySwatch: Colors.blue,
theme: ThemeData.light().copyWith(
backgroundColor: Colors.red,
useMaterial3: true,
colorScheme: const ColorScheme.light(
primary: purple40,
secondary: purpleGrey40,
tertiary: pink40,
background: Colors.red,
),
),
darkTheme: ThemeData.dark().copyWith(
backgroundColor: Colors.red,
useMaterial3: true,
scaffoldBackgroundColor: const Color(0xff0A0D11),
colorScheme: const ColorScheme.dark(
primary: purple80,
secondary: purpleGrey80,
tertiary: pink80,
background: Colors.red,
),
),
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 = [
HomeScreen(),
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",
),
],
),
home: const HomeScreen(),
);
}
}

View File

@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
class HomeScreen extends StatelessWidget {
const HomeScreen({Key? key}) : super(key: key);
@ -6,11 +7,55 @@ class HomeScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('ReVanced Manager'),
),
body: const Center(
child: Text('Home Screen'),
body: SafeArea(
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 0.0,
horizontal: 24.0,
),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"ReVanced Manager",
style: GoogleFonts.manrope(
fontSize: 24,
fontWeight: FontWeight.w500,
),
),
IconButton(
onPressed: () {},
icon: const Icon(
Icons.more_vert,
),
)
],
),
const SizedBox(height: 12),
Align(
alignment: Alignment.topLeft,
child: Text(
"Dashboard",
style: GoogleFonts.lato(
fontSize: 32,
),
),
),
const SizedBox(height: 12),
Align(
alignment: Alignment.topLeft,
child: Text(
"ReVanced Updates",
style: GoogleFonts.lato(
fontSize: 22,
),
),
),
],
),
),
),
);
}

View File

@ -0,0 +1,12 @@
import 'package:flutter/material.dart';
import 'package:flutter/src/foundation/key.dart';
import 'package:flutter/src/widgets/framework.dart';
class PatcherScreen extends StatelessWidget {
const PatcherScreen({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold();
}
}

View File

@ -5,6 +5,8 @@
import FlutterMacOS
import Foundation
import path_provider_macos
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
}

View File

@ -43,6 +43,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.16.0"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.2"
cupertino_icons:
dependency: "direct main"
description:
@ -57,6 +64,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
ffi:
dependency: transitive
description:
name: ffi
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
file:
dependency: transitive
description:
name: file
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.2"
flutter:
dependency: "direct main"
description: flutter
@ -69,11 +90,39 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
flutter_svg:
dependency: "direct main"
description:
name: flutter_svg
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.1+1"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
google_fonts:
dependency: "direct main"
description:
name: google_fonts
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
http:
dependency: transitive
description:
name: http
url: "https://pub.dartlang.org"
source: hosted
version: "0.13.4"
http_parser:
dependency: transitive
description:
name: http_parser
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.1"
lints:
dependency: transitive
description:
@ -109,6 +158,97 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
path_drawing:
dependency: transitive
description:
name: path_drawing
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
path_parsing:
dependency: transitive
description:
name: path_parsing
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
path_provider:
dependency: transitive
description:
name: path_provider
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.17"
path_provider_ios:
dependency: transitive
description:
name: path_provider_ios
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.7"
path_provider_macos:
dependency: transitive
description:
name: path_provider_macos
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.6"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.4"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "5.0.0"
platform:
dependency: transitive
description:
name: platform
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.0"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.2"
process:
dependency: transitive
description:
name: process
url: "https://pub.dartlang.org"
source: hosted
version: "4.2.4"
sky_engine:
dependency: transitive
description: flutter
@ -156,6 +296,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.9"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
vector_math:
dependency: transitive
description:
@ -163,5 +310,27 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.2"
win32:
dependency: transitive
description:
name: win32
url: "https://pub.dartlang.org"
source: hosted
version: "2.7.0"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0+1"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.0"
sdks:
dart: ">=2.17.5 <3.0.0"
flutter: ">=3.0.0"

View File

@ -34,6 +34,8 @@ dependencies:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
flutter_svg: ^1.1.1+1
google_fonts: ^3.0.1
dev_dependencies:
flutter_test:
@ -58,9 +60,9 @@ flutter:
uses-material-design: true
# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
assets:
- lib/assets/images/
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware
@ -73,12 +75,12 @@ flutter:
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
fonts:
- family: Manrope
fonts:
- asset: lib/assets/fonts/Manrope.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf