mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-07-06 17:31:33 +00:00
feat: add About section with app metadata and source code link in YouPage
This commit is contained in:
parent
fd10791e6a
commit
d7f90fb7ff
4 changed files with 67 additions and 19 deletions
BIN
assets/images/vaani_logo_foreground.png
Normal file
BIN
assets/images/vaani_logo_foreground.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
|
|
@ -3,6 +3,7 @@ import 'package:go_router/go_router.dart';
|
|||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:vaani/api/api_provider.dart';
|
||||
import 'package:vaani/router/router.dart';
|
||||
import 'package:vaani/settings/constants.dart';
|
||||
import 'package:vaani/shared/utils.dart';
|
||||
import 'package:vaani/shared/widgets/not_implemented.dart';
|
||||
|
||||
|
|
@ -83,21 +84,6 @@ class YouPage extends HookConsumerWidget {
|
|||
title: const Text('My Playlists'),
|
||||
onTap: () {
|
||||
// Handle navigation to playlists
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.help),
|
||||
title: const Text('Help'),
|
||||
onTap: () {
|
||||
// Handle navigation to help website
|
||||
showNotImplementedToast(context);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.info),
|
||||
title: const Text('About'),
|
||||
onTap: () {
|
||||
// Handle navigation to about
|
||||
showNotImplementedToast(context);
|
||||
},
|
||||
),
|
||||
|
|
@ -111,10 +97,40 @@ class YouPage extends HookConsumerWidget {
|
|||
);
|
||||
},
|
||||
),
|
||||
// const SizedBox(height: 16),
|
||||
// const Text('App Version: 1.0.0'),
|
||||
// const Text('Server Version: 1.0.0'),
|
||||
// const Text('Author: Your Name'),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.help),
|
||||
title: const Text('Help'),
|
||||
onTap: () {
|
||||
// Handle navigation to help website
|
||||
showNotImplementedToast(context);
|
||||
},
|
||||
),
|
||||
|
||||
AboutListTile(
|
||||
icon: const Icon(Icons.info),
|
||||
applicationName: AppMetadata.appName,
|
||||
applicationVersion: AppMetadata.version,
|
||||
applicationLegalese:
|
||||
'Made with ❤️ by ${AppMetadata.author}',
|
||||
aboutBoxChildren: [
|
||||
// link to github repo
|
||||
ListTile(
|
||||
leading: Icon(Icons.code),
|
||||
title: Text('Source Code'),
|
||||
onTap: () {
|
||||
handleLaunchUrl(AppMetadata.githubRepo);
|
||||
},
|
||||
),
|
||||
],
|
||||
// apply blend mode to the icon to match the primary color
|
||||
applicationIcon: ColorFiltered(
|
||||
colorFilter: ColorFilter.mode(
|
||||
Theme.of(context).colorScheme.primary,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
child: const VaaniLogo(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
@ -166,3 +182,29 @@ class UserBar extends HookConsumerWidget {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
class VaaniLogo extends StatelessWidget {
|
||||
const VaaniLogo({
|
||||
super.key,
|
||||
this.size,
|
||||
this.duration = const Duration(milliseconds: 750),
|
||||
this.curve = Curves.fastOutSlowIn,
|
||||
});
|
||||
|
||||
final double? size;
|
||||
final Duration duration;
|
||||
final Curve curve;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final IconThemeData iconTheme = IconTheme.of(context);
|
||||
final double? iconSize = size ?? iconTheme.size;
|
||||
return AnimatedContainer(
|
||||
width: iconSize,
|
||||
height: iconSize,
|
||||
duration: duration,
|
||||
curve: curve,
|
||||
child: Image.asset('assets/images/vaani_logo_foreground.png'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,5 +10,10 @@ class AppMetadata {
|
|||
// for deeplinking
|
||||
static const String appScheme = 'vaani';
|
||||
|
||||
static const version = '1.0.0';
|
||||
static const author = 'Dr.Blank';
|
||||
|
||||
static Uri githubRepo = Uri.parse('https://github.com/Dr-Blank/Vaani');
|
||||
|
||||
static get appNameLowerCase => appName.toLowerCase().replaceAll(' ', '_');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@ flutter:
|
|||
- assets/
|
||||
- assets/animations/
|
||||
- assets/sounds/
|
||||
- assets/images/
|
||||
# - images/a_dot_burr.jpeg
|
||||
# - images/a_dot_ham.jpeg
|
||||
# An image asset can refer to one or more resolution-specific "variants", see
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue