mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-26 23:09:21 +00:00
52 lines
1.3 KiB
Dart
52 lines
1.3 KiB
Dart
import 'package:comunic/ui/routes/account_settings/account_image_settings.dart';
|
|
import 'package:comunic/utils/intl_utils.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:settings_ui/settings_ui.dart';
|
|
|
|
/// Account settings route
|
|
///
|
|
/// @author Pierre HUBERT
|
|
|
|
class AccountSettingsRoute extends StatelessWidget {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
title: Text(tr("Account settings")),
|
|
),
|
|
body: _AccountSettingsBody(),
|
|
);
|
|
}
|
|
}
|
|
|
|
class _AccountSettingsBody extends StatefulWidget {
|
|
@override
|
|
__AccountSettingsBodyState createState() => __AccountSettingsBodyState();
|
|
}
|
|
|
|
class __AccountSettingsBodyState extends State<_AccountSettingsBody> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SettingsList(
|
|
sections: [
|
|
SettingsSection(
|
|
title: tr("Account settings"),
|
|
tiles: [
|
|
SettingsTile(
|
|
title: tr("Account image"),
|
|
subtitle: tr("Customize your account image"),
|
|
leading: Icon(Icons.account_circle),
|
|
onTap: () => _openSection(AccountImageSettingsScreen()),
|
|
)
|
|
],
|
|
)
|
|
],
|
|
);
|
|
}
|
|
|
|
/// Open a settings setings
|
|
void _openSection(Widget w) {
|
|
Navigator.of(context).push(MaterialPageRoute(builder: (c) => w));
|
|
}
|
|
}
|