Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/screens/HomePage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import 'package:flutter/material.dart';
import 'package:test_app/screens/ChatPage.dart';
import 'package:test_app/screens/Notificationpage.dart';

class HomePage extends StatefulWidget {
const HomePage({super.key});
Expand Down Expand Up @@ -112,6 +113,7 @@ class _HomePageState extends State<HomePage> {
PopupMenuItem(
value: "Settings",
child: Text("Settings"),
onTap: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>NotificationPage())),
),
])
],
Expand Down
155 changes: 155 additions & 0 deletions lib/screens/Notificationpage.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

class NotificationPage extends StatefulWidget {
const NotificationPage({super.key});

@override
State<NotificationPage> createState() => _NotificationPageState();
}

class _NotificationPageState extends State<NotificationPage> {
bool _notificationTone = false;
bool _notificationReaction = false;
bool _notificationTopScreen = false;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: Text('Notification'),
actions: [
PopupMenuButton<String>(
itemBuilder: (context) => <PopupMenuEntry<String>>[
PopupMenuItem(child: Icon(Icons.more_vert))
])
],
),
body: ListView(
children: [
ListTile(
title: Text("Conversation tones"),
subtitle: Text("play sounds for incoming and outgoing messsages"),
trailing: Switch(
value:_notificationTone,
onChanged: (value) {
setState(() {
_notificationTone = value;
});
},
),
),
Container(
decoration: BoxDecoration(border: Border(bottom: BorderSide(color: Colors.black, width: 2),top: BorderSide(color: Colors.black, width: 2))),
child: Column(
children: [
Text("messages", textAlign: TextAlign.left,),
ListTile(
title: Text("Notification Tone"),
subtitle: Text("Default (milky way)"),
),



ListTile(
title: Text("Vibrate"),
subtitle: Text("Default "),
),
ListTile(
title: Text("pop notification "),
subtitle: Text("not available"),
),
ListTile(
title: Text("Light"),
subtitle: Text("white"),
),
ListTile(
title: Text("Use high priority notification"),
subtitle: Text("show preview of the notification at the top of the screen"),
trailing: Switch(
value:_notificationTopScreen,
onChanged: (value) {
setState(() {
_notificationTopScreen = value;
});
},
),),
ListTile(
title: Text("Reaction Notifications"),
subtitle: Text("show notification to the messages you send"),
trailing: Switch(
value:_notificationReaction,
onChanged: (value) {
setState(() {
_notificationReaction= value;
});
},
),
),



],
),
),
Container(
decoration: BoxDecoration(border: Border(bottom: BorderSide(color: Colors.black, width: 2))),
child: Column(
children: [
Text("groups", textAlign: TextAlign.left,),
ListTile(
title: Text("Notification Tone"),
subtitle: Text("Default (milky way)"),
),



ListTile(
title: Text("Vibrate"),
subtitle: Text("Default "),
),
ListTile(
title: Text("pop notification "),
subtitle: Text("not available"),
),
ListTile(
title: Text("Light"),
subtitle: Text("white"),
),
ListTile(
title: Text("Use high priority notification"),
subtitle: Text("show preview of the notification at the top of the screen"),
trailing: Switch(
value:_notificationTopScreen,
onChanged: (value) {
setState(() {
_notificationTopScreen = value;
});
},
),),
ListTile(
title: Text("Reaction Notifications"),
subtitle: Text("show notification to the messages you send"),
trailing: Switch(
value:_notificationReaction,
onChanged: (value) {
setState(() {
_notificationReaction= value;
});
},
),
),



],
),
),



],
),
);
}
}