presentation views

This commit is contained in:
kodjodevf 2023-04-03 15:10:10 +01:00
parent 07b2a656fc
commit 268efa5fd2
13 changed files with 668 additions and 6 deletions

View file

@ -14,6 +14,7 @@ class MyApp extends ConsumerWidget {
Widget build(BuildContext context, WidgetRef ref) {
final router = ref.watch(routerProvider);
return MaterialApp.router(
theme: ThemeData(useMaterial3: true),
debugShowCheckedModeBanner: false,
routeInformationParser: router.routeInformationParser,
routerDelegate: router.routerDelegate,

View file

@ -1,10 +1,49 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:mangayomi/views/browse/extension.dart';
import 'package:mangayomi/views/browse/migrate.dart';
import 'package:mangayomi/views/browse/sources.dart';
class BrowseScreen extends StatelessWidget {
const BrowseScreen({super.key});
@override
Widget build(BuildContext context) {
return const Placeholder();
return DefaultTabController(
length: 3,
child: Scaffold(
appBar: AppBar(
elevation: 0,
backgroundColor: Colors.transparent,
title: Text(
'Browse',
style: TextStyle(color: Theme.of(context).hintColor),
),
actions: [
IconButton(
splashRadius: 20,
onPressed: () {},
icon: Icon(Icons.travel_explore,
color: Theme.of(context).hintColor)),
IconButton(
splashRadius: 20,
onPressed: () {},
icon: Icon(Icons.filter_list_sharp,
color: Theme.of(context).hintColor)),
],
bottom: TabBar(
labelColor: Theme.of(context).hintColor,
isScrollable: true,
tabs: const [
Tab(text: "Sources"),
Tab(text: "Extension"),
Tab(text: "Migrate"),
],
),
),
body: const TabBarView(
children: [SourcesScreen(), ExtensionScreen(), MigrateScreen()]),
),
);
}
}

View file

@ -0,0 +1,30 @@
import 'package:flutter/material.dart';
class ExtensionScreen extends StatefulWidget {
const ExtensionScreen({super.key});
@override
State<ExtensionScreen> createState() => _ExtensionScreenState();
}
class _ExtensionScreenState extends State<ExtensionScreen> {
@override
Widget build(BuildContext context) {
return Column(
children: [
ListTile(
onTap: () {},
leading: Container(
height: 37,
width: 37,
decoration: BoxDecoration(
color: Colors.grey, borderRadius: BorderRadius.circular(5)),
),
subtitle: const Text('English'),
title: const Text('MangaHere'),
trailing: TextButton(onPressed: () {}, child: Text("Update")),
)
],
);
}
}

View file

@ -0,0 +1,17 @@
import 'package:flutter/material.dart';
class MigrateScreen extends StatefulWidget {
const MigrateScreen({super.key});
@override
State<MigrateScreen> createState() => _MigrateScreenState();
}
class _MigrateScreenState extends State<MigrateScreen> {
@override
Widget build(BuildContext context) {
return Center(
child: Text('Migrate'),
);
}
}

View file

@ -0,0 +1,43 @@
import 'package:flutter/material.dart';
class SourcesScreen extends StatefulWidget {
const SourcesScreen({super.key});
@override
State<SourcesScreen> createState() => _SourcesScreenState();
}
class _SourcesScreenState extends State<SourcesScreen> {
@override
Widget build(BuildContext context) {
return Column(
children: [
ListTile(
onTap: () {},
leading: Container(
height: 37,
width: 37,
decoration: BoxDecoration(
color: Colors.grey, borderRadius: BorderRadius.circular(5)),
),
subtitle: const Text('English'),
title: const Text('MangaHere'),
trailing: SizedBox(
width: 110,
child: Row(mainAxisAlignment: MainAxisAlignment.spaceAround,
children: const [
Text(
"Latest",
style: TextStyle(fontWeight: FontWeight.bold),
),
Icon(
Icons.push_pin_outlined,
color: Colors.black,
)
],
)),
)
],
);
}
}

View file

@ -48,7 +48,7 @@ class _GeneralScreenState extends ConsumerState<GeneralScreen> {
labelTextStyle: MaterialStateProperty.all(
const TextStyle(fontWeight: FontWeight.w500)),
indicatorShape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12)),
borderRadius: BorderRadius.circular(15)),
height: 20,
labelBehavior: NavigationDestinationLabelBehavior.alwaysShow,
),

View file

@ -1,3 +1,4 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
class HistoryScreen extends StatelessWidget {
@ -5,6 +6,145 @@ class HistoryScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return const Placeholder();
return Scaffold(
appBar: AppBar(
elevation: 0,
backgroundColor: Colors.transparent,
title: Text(
'History',
style: TextStyle(color: Theme.of(context).hintColor),
),
actions: [
IconButton(
splashRadius: 20,
onPressed: () {},
icon: Icon(Icons.search, color: Theme.of(context).hintColor)),
IconButton(
splashRadius: 20,
onPressed: () {},
icon: Icon(Icons.delete_sweep_outlined,
color: Theme.of(context).hintColor)),
],
),
body: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
children: [
Row(
children: [
Text('12-12-2023'),
],
),
SizedBox(
height: 105,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
child: GestureDetector(
onTap: () {},
child: ClipRRect(
borderRadius: BorderRadius.circular(7),
child: CachedNetworkImage(
imageUrl:
'https://static.fnac-static.com/multimedia/Images/FR/NR/21/db/c2/12770081/1540-1/tsp20230314072112/Blue-Lock.jpg',
width: 60,
height: 100,
fit: BoxFit.cover),
),
),
),
Flexible(
child: Row(
children: [
Flexible(
child: GestureDetector(
onTap: () {},
child: Container(
color: Colors.transparent,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Blue Lock',
style: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold),
textAlign: TextAlign.center,
),
Text(
'Chap 01',
style: const TextStyle(
fontSize: 11,
fontWeight: FontWeight.w300),
),
Row(
crossAxisAlignment:
CrossAxisAlignment.end,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
'22:02',
style: const TextStyle(
fontSize: 11,
fontWeight: FontWeight.bold),
),
],
),
],
),
),
),
),
),
IconButton(
onPressed: () {
showDialog(
context: context,
builder: (context) {
return AlertDialog(
title: Text(
'Delete',
),
actions: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceAround,
children: [
TextButton(
onPressed: () {
Navigator.pop(context);
},
child: Text('No')),
TextButton(
onPressed: () {
Navigator.pop(context);
},
child: Text('Yes')),
],
)
],
);
});
},
icon: const Icon(
Icons.delete,
size: 25,
)),
],
),
)
],
),
)
],
),
),
);
}
}

View file

@ -5,6 +5,49 @@ class LibraryScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return const Placeholder();
return Scaffold(
appBar: AppBar(
elevation: 0,
backgroundColor: Colors.transparent,
title: Text(
'Library',
style: TextStyle(color: Theme.of(context).hintColor),
),
actions: [
IconButton(
splashRadius: 20,
onPressed: () {},
icon: Icon(Icons.search, color: Theme.of(context).hintColor)),
IconButton(
splashRadius: 20,
onPressed: () {},
icon: Icon(Icons.filter_list_sharp,
color: Theme.of(context).hintColor)),
PopupMenuButton(
color: Theme.of(context).hintColor,
itemBuilder: (context) {
return [
const PopupMenuItem<int>(
value: 0,
child: Text("1"),
),
const PopupMenuItem<int>(
value: 1,
child: Text("2"),
),
const PopupMenuItem<int>(
value: 2,
child: Text("3"),
),
];
},
onSelected: (value) {
if (value == 0) {
} else if (value == 1) {
} else if (value == 2) {}
}),
],
),
);
}
}

View file

@ -1,3 +1,4 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class MoreScreen extends StatelessWidget {
@ -5,6 +6,102 @@ class MoreScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return const Placeholder();
return Scaffold(
body: Column(
children: [
const SizedBox(height: 150, child: Center(child: Text("LOGO"))),
Flexible(
flex: 3,
child: Column(
children: [
const Divider(),
ListTile(
dense: true,
onTap: () {},
leading:
const SizedBox(height: 40, child: Icon(Icons.cloud_off)),
subtitle: const Text('Filter all entries in your library'),
title: const Text('Donloaded only'),
trailing: Switch(
value: false,
onChanged: (value) {},
),
),
ListTile(
dense: true,
onTap: () {},
leading: const SizedBox(
height: 40, child: Icon(CupertinoIcons.eyeglasses)),
subtitle: const Text('pauses reading history'),
title: const Text('Incognito mode'),
trailing: Switch(
value: false,
onChanged: (value) {},
),
),
const Divider(),
ListTile(
dense: true,
onTap: () {},
leading: const SizedBox(
height: 40, child: Icon(Icons.download_outlined)),
title: const Text('Donwload queue'),
),
ListTile(
dense: true,
onTap: () {},
leading: Container(
height: 20,
width: 20,
color: Colors.grey,
),
title: const Text('Categories'),
),
ListTile(
dense: true,
onTap: () {},
leading: Container(
height: 20,
width: 20,
color: Colors.grey,
),
title: const Text('Statistics'),
),
ListTile(
dense: true,
onTap: () {},
leading: const SizedBox(
height: 40,
child: Icon(Icons.settings_backup_restore_sharp)),
title: const Text('Backup and restore'),
),
const Divider(),
ListTile(
dense: true,
onTap: () {},
leading: const SizedBox(
height: 40, child: Icon(Icons.settings_outlined)),
title: const Text('Backup and restore'),
),
ListTile(
dense: true,
onTap: () {},
leading: const SizedBox(
height: 40, child: Icon(Icons.info_outline)),
title: const Text('About'),
),
ListTile(
dense: true,
onTap: () {},
leading: const SizedBox(
height: 40, child: Icon(Icons.help_outline)),
title: const Text('Help'),
),
],
),
),
],
),
);
}
}

View file

@ -5,6 +5,21 @@ class UpdatesScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return const Placeholder();
return Scaffold(
appBar: AppBar(
elevation: 0,
backgroundColor: Colors.transparent,
title: Text(
'Updates',
style: TextStyle(color: Theme.of(context).hintColor),
),
actions: [
IconButton(
splashRadius: 20,
onPressed: () {},
icon: Icon(Icons.refresh, color: Theme.of(context).hintColor)),
],
),
);
}
}

View file

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

View file

@ -17,6 +17,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.1"
cached_network_image:
dependency: "direct main"
description:
name: cached_network_image
sha256: fd3d0dc1d451f9a252b32d95d3f0c3c487bc41a75eba2e6097cb0b9c71491b15
url: "https://pub.dev"
source: hosted
version: "3.2.3"
cached_network_image_platform_interface:
dependency: transitive
description:
name: cached_network_image_platform_interface
sha256: bb2b8403b4ccdc60ef5f25c70dead1f3d32d24b9d6117cfc087f496b178594a7
url: "https://pub.dev"
source: hosted
version: "2.0.0"
cached_network_image_web:
dependency: transitive
description:
name: cached_network_image_web
sha256: b8eb814ebfcb4dea049680f8c1ffb2df399e4d03bf7a352c775e26fa06e02fa0
url: "https://pub.dev"
source: hosted
version: "1.0.2"
characters:
dependency: transitive
description:
@ -41,6 +65,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.17.0"
crypto:
dependency: transitive
description:
name: crypto
sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67
url: "https://pub.dev"
source: hosted
version: "3.0.2"
cupertino_icons:
dependency: "direct main"
description:
@ -57,11 +89,43 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.1"
ffi:
dependency: transitive
description:
name: ffi
sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978
url: "https://pub.dev"
source: hosted
version: "2.0.1"
file:
dependency: transitive
description:
name: file
sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d"
url: "https://pub.dev"
source: hosted
version: "6.1.4"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_blurhash:
dependency: transitive
description:
name: flutter_blurhash
sha256: "05001537bd3fac7644fa6558b09ec8c0a3f2eba78c0765f88912882b1331a5c6"
url: "https://pub.dev"
source: hosted
version: "0.7.0"
flutter_cache_manager:
dependency: transitive
description:
name: flutter_cache_manager
sha256: "32cd900555219333326a2d0653aaaf8671264c29befa65bbd9856d204a4c9fb3"
url: "https://pub.dev"
source: hosted
version: "3.3.0"
flutter_lints:
dependency: "direct dev"
description:
@ -104,6 +168,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.3"
http:
dependency: transitive
description:
name: http
sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482"
url: "https://pub.dev"
source: hosted
version: "0.13.5"
http_parser:
dependency: transitive
description:
name: http_parser
sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
url: "https://pub.dev"
source: hosted
version: "4.0.2"
js:
dependency: transitive
description:
@ -152,6 +232,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.8.0"
octo_image:
dependency: transitive
description:
name: octo_image
sha256: "107f3ed1330006a3bea63615e81cf637433f5135a52466c7caa0e7152bca9143"
url: "https://pub.dev"
source: hosted
version: "1.0.2"
path:
dependency: transitive
description:
@ -160,6 +248,86 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.8.2"
path_provider:
dependency: transitive
description:
name: path_provider
sha256: c7edf82217d4b2952b2129a61d3ad60f1075b9299e629e149a8d2e39c2e6aad4
url: "https://pub.dev"
source: hosted
version: "2.0.14"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
sha256: "019f18c9c10ae370b08dce1f3e3b73bc9f58e7f087bb5e921f06529438ac0ae7"
url: "https://pub.dev"
source: hosted
version: "2.0.24"
path_provider_foundation:
dependency: transitive
description:
name: path_provider_foundation
sha256: "818b2dc38b0f178e0ea3f7cf3b28146faab11375985d815942a68eee11c2d0f7"
url: "https://pub.dev"
source: hosted
version: "2.2.1"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
sha256: "2ae08f2216225427e64ad224a24354221c2c7907e448e6e0e8b57b1eb9f10ad1"
url: "https://pub.dev"
source: hosted
version: "2.1.10"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec"
url: "https://pub.dev"
source: hosted
version: "2.0.6"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
sha256: f53720498d5a543f9607db4b0e997c4b5438884de25b0f73098cc2671a51b130
url: "https://pub.dev"
source: hosted
version: "2.1.5"
pedantic:
dependency: transitive
description:
name: pedantic
sha256: "67fc27ed9639506c856c840ccce7594d0bdcd91bc8d53d6e52359449a1d50602"
url: "https://pub.dev"
source: hosted
version: "1.11.1"
platform:
dependency: transitive
description:
name: platform
sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76"
url: "https://pub.dev"
source: hosted
version: "3.1.0"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc"
url: "https://pub.dev"
source: hosted
version: "2.1.4"
process:
dependency: transitive
description:
name: process
sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09"
url: "https://pub.dev"
source: hosted
version: "4.2.4"
riverpod:
dependency: transitive
description:
@ -168,6 +336,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.3.2"
rxdart:
dependency: transitive
description:
name: rxdart
sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb"
url: "https://pub.dev"
source: hosted
version: "0.27.7"
sky_engine:
dependency: transitive
description: flutter
@ -181,6 +357,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.9.1"
sqflite:
dependency: transitive
description:
name: sqflite
sha256: "500d6fec583d2c021f2d25a056d96654f910662c64f836cd2063167b8f1fa758"
url: "https://pub.dev"
source: hosted
version: "2.2.6"
sqflite_common:
dependency: transitive
description:
name: sqflite_common
sha256: "963dad8c4aa2f814ce7d2d5b1da2f36f31bd1a439d8f27e3dc189bb9d26bc684"
url: "https://pub.dev"
source: hosted
version: "2.4.3"
stack_trace:
dependency: transitive
description:
@ -213,6 +405,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.2.0"
synchronized:
dependency: transitive
description:
name: synchronized
sha256: "33b31b6beb98100bf9add464a36a8dd03eb10c7a8cf15aeec535e9b054aaf04b"
url: "https://pub.dev"
source: hosted
version: "3.0.1"
term_glyph:
dependency: transitive
description:
@ -229,6 +429,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.4.16"
typed_data:
dependency: transitive
description:
name: typed_data
sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5"
url: "https://pub.dev"
source: hosted
version: "1.3.1"
uuid:
dependency: transitive
description:
name: uuid
sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313"
url: "https://pub.dev"
source: hosted
version: "3.0.7"
vector_math:
dependency: transitive
description:
@ -237,6 +453,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
win32:
dependency: transitive
description:
name: win32
sha256: c9ebe7ee4ab0c2194e65d3a07d8c54c5d00bb001b76081c4a04cdb8448b59e46
url: "https://pub.dev"
source: hosted
version: "3.1.3"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1
url: "https://pub.dev"
source: hosted
version: "1.0.0"
sdks:
dart: ">=2.19.5 <3.0.0"
flutter: ">=3.3.0"

View file

@ -33,6 +33,7 @@ dependencies:
go_router: ^6.5.2
flutter_riverpod: ^2.3.2
hidable: ^1.0.3
cached_network_image: ^3.2.3
# The following adds the Cupertino Icons font to your application.