Add new features and update configurations for improved functionality

This commit is contained in:
ImBenji
2026-04-11 12:34:00 +01:00
parent fa4415553d
commit 0b6b604c56
125 changed files with 14119 additions and 1664 deletions
+68
View File
@@ -0,0 +1,68 @@
import "package:go_router/go_router.dart";
import "package:shadcn_flutter/shadcn_flutter.dart";
import "widgets/setting_card.dart";
class SettingsPage extends StatelessWidget {
const SettingsPage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
headers: [
AppBar(
title: const Text("Settings"),
leading: [
IconButton.ghost(
icon: const Icon(LucideIcons.arrowLeft),
onPressed: () => context.go('/'),
),
],
),
],
child: ListView(
padding: const EdgeInsets.all(16),
children: [
SettingCard(
title: "Appearance",
description: "Customize theme, colors, and layout",
icon: LucideIcons.palette,
onTap: () {
// Could navigate to appearance settings
},
),
const Gap(12),
SettingCard(
title: "Models",
description: "Configure AI model preferences",
icon: LucideIcons.brain,
onTap: () {
// Could navigate to model settings
},
),
const Gap(12),
SettingCard(
title: "Advanced",
description: "Developer options and advanced settings",
icon: LucideIcons.settings2,
onTap: () {
// Could navigate to advanced settings
},
),
],
),
);
}
}
/// GoRouter routes for the settings page
abstract class SettingsRoute {
static const path = '/settings';
static const name = 'settings';
static GoRoute get route => GoRoute(
path: path,
name: name,
builder: (context, state) => const SettingsPage(),
);
}
@@ -0,0 +1,48 @@
import "package:shadcn_flutter/shadcn_flutter.dart";
class SettingCard extends StatelessWidget {
const SettingCard({
super.key,
required this.title,
required this.description,
required this.icon,
this.onTap,
});
final String title;
final String description;
final IconData icon;
final VoidCallback? onTap;
@override
Widget build(BuildContext context) {
return Card(
child: Padding(
padding: const EdgeInsets.all(16),
child: Row(
children: [
Icon(icon).iconLarge,
const Gap(12),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(title).textLarge,
const Gap(4),
Text(description).textSmall.muted,
],
),
),
if (onTap != null) ...[
const Gap(8),
IconButton.ghost(
onPressed: onTap,
icon: const Icon(LucideIcons.chevronRight),
),
],
],
),
),
);
}
}