mirror of
https://github.com/madari-media/madari-oss.git
synced 2026-03-28 20:58:45 +00:00
57 lines
1.5 KiB
Dart
57 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class NotificationsScreen extends StatefulWidget {
|
|
const NotificationsScreen({super.key});
|
|
|
|
@override
|
|
State<NotificationsScreen> createState() => _NotificationsScreenState();
|
|
}
|
|
|
|
class _NotificationsScreenState extends State<NotificationsScreen> {
|
|
bool pushNotifications = true;
|
|
bool soundEnabled = true;
|
|
bool vibrationEnabled = true;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
title: const Text('Notifications'),
|
|
),
|
|
body: ListView(
|
|
children: [
|
|
SwitchListTile(
|
|
title: const Text('Push Notifications'),
|
|
subtitle: const Text('Enable push notifications'),
|
|
value: pushNotifications,
|
|
onChanged: (bool value) {
|
|
setState(() {
|
|
pushNotifications = value;
|
|
});
|
|
},
|
|
),
|
|
SwitchListTile(
|
|
title: const Text('Sound'),
|
|
subtitle: const Text('Play sound for notifications'),
|
|
value: soundEnabled,
|
|
onChanged: (bool value) {
|
|
setState(() {
|
|
soundEnabled = value;
|
|
});
|
|
},
|
|
),
|
|
SwitchListTile(
|
|
title: const Text('Vibration'),
|
|
subtitle: const Text('Vibrate for notifications'),
|
|
value: vibrationEnabled,
|
|
onChanged: (bool value) {
|
|
setState(() {
|
|
vibrationEnabled = value;
|
|
});
|
|
},
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|