2a35fe5532
- Collapsible search in notes and tasks: magnifying glass in AppBar expands to a text field inline; close button resets the filter - Offline capture queue: failed quick-captures (NetworkException) are persisted to SharedPreferences and retried automatically on next successful submit or app start; badge shows pending count - App icon: book-with-sparkle logo from FabledAssistant SVG rendered at all Android densities with adaptive icon (indigo #6366f1 bg) - Dark mode subtitle fix: use colorScheme.onSurfaceVariant for note preview and conversation timestamp text - Remove swipe-to-delete (accidental deletions); long-press remains - Chat: SSE streaming reliability, polling fallback, title patching - Settings: theme toggle (system/light/dark) persisted to prefs - Notes: delete button in edit screen; body preview in list - Tasks: fix delete dialog context; description search support Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
68 lines
2.1 KiB
Dart
68 lines
2.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
|
|
import '../../core/constants.dart';
|
|
import '../../providers/auth_provider.dart';
|
|
import '../../providers/settings_provider.dart';
|
|
|
|
class SettingsScreen extends ConsumerWidget {
|
|
const SettingsScreen({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
final serverUrl = ref.watch(serverUrlProvider);
|
|
final themeMode = ref.watch(themeModeProvider);
|
|
|
|
return Scaffold(
|
|
appBar: AppBar(title: const Text('Settings')),
|
|
body: ListView(
|
|
children: [
|
|
ListTile(
|
|
title: const Text('Server URL'),
|
|
subtitle: Text(serverUrl ?? 'Not configured'),
|
|
leading: const Icon(Icons.dns),
|
|
onTap: () => context.go(Routes.setup),
|
|
),
|
|
const Divider(),
|
|
ListTile(
|
|
title: const Text('Appearance'),
|
|
leading: const Icon(Icons.brightness_6),
|
|
trailing: SegmentedButton<ThemeMode>(
|
|
segments: const [
|
|
ButtonSegment(
|
|
value: ThemeMode.system,
|
|
icon: Icon(Icons.brightness_auto),
|
|
tooltip: 'System',
|
|
),
|
|
ButtonSegment(
|
|
value: ThemeMode.light,
|
|
icon: Icon(Icons.light_mode),
|
|
tooltip: 'Light',
|
|
),
|
|
ButtonSegment(
|
|
value: ThemeMode.dark,
|
|
icon: Icon(Icons.dark_mode),
|
|
tooltip: 'Dark',
|
|
),
|
|
],
|
|
selected: {themeMode},
|
|
onSelectionChanged: (modes) =>
|
|
ref.read(themeModeProvider.notifier).setMode(modes.first),
|
|
),
|
|
),
|
|
const Divider(),
|
|
ListTile(
|
|
title: const Text('Sign Out'),
|
|
leading: const Icon(Icons.logout),
|
|
onTap: () async {
|
|
await ref.read(authProvider.notifier).logout();
|
|
if (context.mounted) context.go(Routes.login);
|
|
},
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|