feat: about screen

This commit is contained in:
edde746
2025-10-22 16:28:57 +02:00
parent 24981977c0
commit 6d7de29db1
5 changed files with 231 additions and 4 deletions
+167
View File
@@ -0,0 +1,167 @@
import 'package:flutter/material.dart';
import '../widgets/desktop_app_bar.dart';
class AboutScreen extends StatelessWidget {
const AboutScreen({super.key});
@override
Widget build(BuildContext context) {
const appName = 'Plezy';
const appVersion = '1.0.0';
return Scaffold(
body: CustomScrollView(
slivers: [
DesktopSliverAppBar(
title: const Text('About'),
pinned: true,
leading: Container(
margin: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: Colors.black.withValues(alpha: 0.5),
shape: BoxShape.circle,
),
child: IconButton(
icon: const Icon(Icons.arrow_back, color: Colors.white),
onPressed: () => Navigator.of(context).pop(),
padding: EdgeInsets.zero,
),
),
),
SliverPadding(
padding: const EdgeInsets.all(16),
sliver: SliverList(
delegate: SliverChildListDelegate([
// App Icon and Name
Center(
child: Column(
children: [
const SizedBox(height: 24),
Image.asset(
'assets/plezy.png',
width: 80,
height: 80,
),
const SizedBox(height: 16),
Text(
appName,
style: Theme.of(context).textTheme.headlineMedium?.copyWith(
fontWeight: FontWeight.bold,
),
),
const SizedBox(height: 8),
Text(
'Version $appVersion',
style: Theme.of(
context,
).textTheme.bodyMedium?.copyWith(color: Colors.grey),
),
const SizedBox(height: 24),
Text(
'A beautiful Plex client for Flutter',
style: Theme.of(context).textTheme.bodyLarge,
textAlign: TextAlign.center,
),
],
),
),
const SizedBox(height: 40),
// Open Source Licenses
Card(
child: ListTile(
leading: const Icon(Icons.description),
title: const Text('Open Source Licenses'),
subtitle: const Text('View licenses of third-party libraries'),
trailing: const Icon(Icons.chevron_right),
onTap: () {
showLicensePage(
context: context,
applicationName: appName,
applicationVersion: appVersion,
applicationIcon: Image.asset(
'assets/plezy.png',
width: 48,
height: 48,
),
);
},
),
),
const SizedBox(height: 16),
// Key Dependencies
Card(
child: Padding(
padding: const EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Key Dependencies',
style: Theme.of(context).textTheme.titleMedium?.copyWith(
fontWeight: FontWeight.bold,
),
),
const SizedBox(height: 12),
_buildDependencyItem('http', 'HTTP networking'),
_buildDependencyItem('dio', 'Advanced HTTP client'),
_buildDependencyItem('cached_network_image', 'Image caching'),
_buildDependencyItem('media_kit', 'Video playback'),
_buildDependencyItem('shared_preferences', 'Local storage'),
_buildDependencyItem('xml', 'XML parsing'),
_buildDependencyItem('url_launcher', 'External links'),
_buildDependencyItem(
'window_manager',
'Desktop window management',
),
_buildDependencyItem(
'macos_window_utils',
'macOS window controls',
),
_buildDependencyItem('logger', 'Logging'),
],
),
),
),
const SizedBox(height: 24),
]),
),
),
],
),
);
}
Widget _buildDependencyItem(String name, String description) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 4),
child: Row(
children: [
const Icon(Icons.circle, size: 6),
const SizedBox(width: 8),
Expanded(
child: RichText(
text: TextSpan(
children: [
TextSpan(
text: name,
style: const TextStyle(fontWeight: FontWeight.w600),
),
TextSpan(
text: ' - $description',
style: const TextStyle(color: Colors.grey),
),
],
style: const TextStyle(fontSize: 13, color: Colors.white),
),
),
),
],
),
);
}
}
+4 -4
View File
@@ -95,10 +95,10 @@ class _AuthScreenState extends State<AuthScreen> {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Icon(
Icons.video_library,
size: 80,
color: Theme.of(context).colorScheme.primary,
Image.asset(
'assets/plezy.png',
width: 120,
height: 120,
),
const SizedBox(height: 24),
Text(
+18
View File
@@ -14,6 +14,7 @@ import '../mixins/refreshable.dart';
import '../utils/app_logger.dart';
import 'video_player_screen.dart';
import 'main_screen.dart';
import 'about_screen.dart';
class DiscoverScreen extends StatefulWidget {
final PlexClient client;
@@ -336,6 +337,13 @@ class _DiscoverScreenState extends State<DiscoverScreen> with Refreshable {
_handleSwitchServer();
} else if (value == 'logout') {
_handleLogout();
} else if (value == 'about') {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const AboutScreen(),
),
);
}
},
itemBuilder: (context) => [
@@ -349,6 +357,16 @@ class _DiscoverScreenState extends State<DiscoverScreen> with Refreshable {
],
),
),
const PopupMenuItem(
value: 'about',
child: Row(
children: [
Icon(Icons.info_outline),
SizedBox(width: 8),
Text('About'),
],
),
),
const PopupMenuItem(
value: 'logout',
child: Row(
+40
View File
@@ -294,6 +294,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "5.0.0"
flutter_svg:
dependency: "direct main"
description:
name: flutter_svg
sha256: b9c2ad5872518a27507ab432d1fb97e8813b05f0fc693f9d40fad06d073e0678
url: "https://pub.dev"
source: hosted
version: "2.2.1"
flutter_test:
dependency: "direct dev"
description: flutter
@@ -577,6 +585,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.9.1"
path_parsing:
dependency: transitive
description:
name: path_parsing
sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
path_provider:
dependency: transitive
description:
@@ -1062,6 +1078,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.5.1"
vector_graphics:
dependency: transitive
description:
name: vector_graphics
sha256: a4f059dc26fc8295b5921376600a194c4ec7d55e72f2fe4c7d2831e103d461e6
url: "https://pub.dev"
source: hosted
version: "1.1.19"
vector_graphics_codec:
dependency: transitive
description:
name: vector_graphics_codec
sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146"
url: "https://pub.dev"
source: hosted
version: "1.1.13"
vector_graphics_compiler:
dependency: transitive
description:
name: vector_graphics_compiler
sha256: d354a7ec6931e6047785f4db12a1f61ec3d43b207fc0790f863818543f8ff0dc
url: "https://pub.dev"
source: hosted
version: "1.1.19"
vector_math:
dependency: transitive
description:
+2
View File
@@ -24,6 +24,7 @@ dependencies:
uuid: ^4.4.0
window_manager: ^0.4.3
logger: ^2.0.2
flutter_svg: ^2.0.10
dependency_overrides:
media_kit:
@@ -43,6 +44,7 @@ flutter:
uses-material-design: true
assets:
- lib/data/iso_639_codes.json
- assets/plezy.png
flutter_launcher_icons:
android: true