122 lines
4.3 KiB
Dart
122 lines
4.3 KiB
Dart
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:easy_settings_screen/easy_settings_screen.dart';
|
|
|
|
void main() {
|
|
runApp(MyApp());
|
|
}
|
|
|
|
class MyApp extends StatelessWidget {
|
|
const MyApp({super.key});
|
|
static const gravatarUrl =
|
|
'https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp&f=y';
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
home: Scaffold(
|
|
backgroundColor: Colors.white.withValues(alpha: .94),
|
|
appBar: AppBar(
|
|
title: Text(
|
|
"Settings",
|
|
style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold),
|
|
),
|
|
centerTitle: true,
|
|
backgroundColor: Colors.transparent,
|
|
elevation: 0,
|
|
),
|
|
body: Padding(
|
|
padding: const EdgeInsets.all(10),
|
|
child: ListView(
|
|
children: [
|
|
// user card
|
|
SimpleUserCard(
|
|
userName: "Nom de l'utilisateur",
|
|
userProfilePic: NetworkImage(gravatarUrl),
|
|
),
|
|
SettingsGroup(
|
|
backgroundColor: Colors.blue,
|
|
items: [
|
|
SettingsItem(
|
|
onTap: () {},
|
|
icons: CupertinoIcons.pencil_outline,
|
|
iconStyle: IconStyle(),
|
|
title:
|
|
'Appearance Appearance Appearance Appearance Appearance Appearance Appearance Appearance Appearance Appearance Appearance Appearance Appearance Appearance Appearance Appearance Appearance Appearance Appearance Appearance',
|
|
subtitle:
|
|
"Make Ziar'App yours Appearance Appearance Appearance Appearance Appearance Appearance Appearance Appearance Appearance Appearance Appearance Appearance Appearance Appearance Appearance Appearance Appearance Appearance Appearance Appearance",
|
|
titleMaxLine: 1,
|
|
subtitleMaxLine: 1,
|
|
),
|
|
SettingsItem(
|
|
onTap: () {},
|
|
icons: Icons.fingerprint,
|
|
iconStyle: IconStyle(
|
|
iconsColor: Colors.white,
|
|
withBackground: true,
|
|
backgroundColor: Colors.red,
|
|
),
|
|
title: 'Privacy',
|
|
subtitle: "Lock Ziar'App to improve your privacy",
|
|
),
|
|
SettingsItem(
|
|
onTap: () {},
|
|
icons: Icons.dark_mode_rounded,
|
|
iconStyle: IconStyle(
|
|
iconsColor: Colors.white,
|
|
withBackground: true,
|
|
backgroundColor: Colors.red,
|
|
),
|
|
title: 'Dark mode',
|
|
subtitle: "Automatic",
|
|
trailing: Switch.adaptive(
|
|
value: false,
|
|
onChanged: (value) {},
|
|
),
|
|
),
|
|
],
|
|
),
|
|
SettingsGroup(
|
|
items: [
|
|
SettingsItem(
|
|
onTap: () {},
|
|
icons: Icons.info_rounded,
|
|
iconStyle: IconStyle(backgroundColor: Colors.purple),
|
|
title: 'About',
|
|
subtitle: "Learn more about Ziar'App",
|
|
),
|
|
],
|
|
),
|
|
// You can add a settings title
|
|
SettingsGroup(
|
|
settingsGroupTitle: "Account",
|
|
items: [
|
|
SettingsItem(
|
|
onTap: () {},
|
|
icons: Icons.exit_to_app_rounded,
|
|
title: "Sign Out",
|
|
),
|
|
SettingsItem(
|
|
onTap: () {},
|
|
icons: CupertinoIcons.repeat,
|
|
title: "Change email",
|
|
),
|
|
SettingsItem(
|
|
onTap: () {},
|
|
icons: CupertinoIcons.delete_solid,
|
|
title: "Delete account",
|
|
titleStyle: TextStyle(
|
|
color: Colors.red,
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|