diff --git a/lib/screens/HomePage.dart b/lib/screens/HomePage.dart index 5266eb5..ba60bd4 100644 --- a/lib/screens/HomePage.dart +++ b/lib/screens/HomePage.dart @@ -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}); @@ -112,6 +113,7 @@ class _HomePageState extends State { PopupMenuItem( value: "Settings", child: Text("Settings"), + onTap: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>NotificationPage())), ), ]) ], diff --git a/lib/screens/Notificationpage.dart b/lib/screens/Notificationpage.dart new file mode 100644 index 0000000..57d534d --- /dev/null +++ b/lib/screens/Notificationpage.dart @@ -0,0 +1,155 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; + +class NotificationPage extends StatefulWidget { + const NotificationPage({super.key}); + + @override + State createState() => _NotificationPageState(); +} + +class _NotificationPageState extends State { + 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( + itemBuilder: (context) => >[ + 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; + }); + }, + ), + ), + + + + ], + ), + ), + + + + ], + ), + ); + } +}