Files
companion/lib/features/settings/settings_screen.dart
T
2026-05-07 18:35:58 +02:00

34 lines
1002 B
Dart

import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart';
import '../../providers.dart';
class SettingsScreen extends ConsumerWidget {
const SettingsScreen({super.key});
@override
Widget build(BuildContext context, WidgetRef ref) {
final config = ref.watch(serverConfigProvider);
return Scaffold(
appBar: AppBar(title: const Text('Settings')),
body: ListView(
children: [
ListTile(
title: const Text('Server'),
subtitle: config == null
? const Text('Not connected')
: Text('${config.host}:${config.port}'),
trailing: const Icon(Icons.chevron_right),
onTap: () {}, // TODO: show server config sheet
),
const Divider(),
// TODO: admin account section (change password).
const AboutListTile(applicationName: 'Companion'),
],
),
);
}
}