32 lines
855 B
Dart
32 lines
855 B
Dart
import 'package:flutter/material.dart';
|
||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||
|
||
import 'package:im_app/features/settings/presentation/settings_view_model.dart';
|
||
|
||
/// 设置页
|
||
///
|
||
/// 所有用户操作通过 [SettingsViewModel] 处理,View 不直接调用路由。
|
||
class SettingsPage extends ConsumerWidget {
|
||
const SettingsPage({super.key});
|
||
|
||
@override
|
||
Widget build(BuildContext context, WidgetRef ref) {
|
||
return Scaffold(
|
||
appBar: AppBar(
|
||
title: const Text('设置'),
|
||
),
|
||
body: ListView(
|
||
children: [
|
||
ListTile(
|
||
title: const Text('主题'),
|
||
trailing: const Icon(Icons.chevron_right),
|
||
onTap: () => ref
|
||
.read(settingsViewModelProvider.notifier)
|
||
.navigateToTheme(context),
|
||
),
|
||
],
|
||
),
|
||
);
|
||
}
|
||
}
|