diff --git a/assets/images/png/notifcation.png b/assets/images/png/notifcation.png new file mode 100644 index 0000000..cc1e471 Binary files /dev/null and b/assets/images/png/notifcation.png differ diff --git a/assets/images/png/notification1.png b/assets/images/png/notification1.png new file mode 100644 index 0000000..fbaaf1d Binary files /dev/null and b/assets/images/png/notification1.png differ diff --git a/assets/images/png/notification2.png b/assets/images/png/notification2.png new file mode 100644 index 0000000..35b05fa Binary files /dev/null and b/assets/images/png/notification2.png differ diff --git a/assets/images/png/notification3.png b/assets/images/png/notification3.png new file mode 100644 index 0000000..ab9288f Binary files /dev/null and b/assets/images/png/notification3.png differ diff --git a/lib/Feed Module/Main_Screens/Community/Community.dart b/lib/Feed Module/Main_Screens/Community/Community.dart index a4a9bd7..22b8f2c 100644 --- a/lib/Feed Module/Main_Screens/Community/Community.dart +++ b/lib/Feed Module/Main_Screens/Community/Community.dart @@ -68,10 +68,15 @@ class _CommunityScreenState extends State { width: 25.w, ), sizedBoxWidth(10.w), - Image.asset( - 'assets/images/png/Frame 9.png', - height: 25.h, - width: 25.w, + GestureDetector( + onTap: () { + Get.toNamed(RouteName.notificaationpage); + }, + child: Image.asset( + 'assets/images/png/Frame 9.png', + height: 25.h, + width: 25.w, + ), ), sizedBoxWidth(16.w), ], diff --git a/lib/Feed Module/Notification/View/notification.dart b/lib/Feed Module/Notification/View/notification.dart new file mode 100644 index 0000000..f9f1b24 --- /dev/null +++ b/lib/Feed Module/Notification/View/notification.dart @@ -0,0 +1,251 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:glassmorphism/glassmorphism.dart'; +import 'package:regroup/Utils/Common/CommonAppbar.dart'; +import 'package:regroup/Utils/Common/CustomNextButton.dart'; +import 'package:regroup/Utils/Common/blureffect.dart'; +import 'package:regroup/Utils/Common/sized_box.dart'; +import 'package:regroup/Utils/texts.dart'; + +class NotificationPage extends StatefulWidget { + const NotificationPage({super.key}); + + @override + State createState() => _NotificationPageState(); +} + +class _NotificationPageState extends State { + List notificationcontents = [ + { + 'image': "assets/images/png/notification1.png", + 'follow': false, + 'name': 'Lorem Ipsum is simply dummy text of \nthe printing and . . . ', + 'messagereq': true, + }, + { + 'image': "assets/images/png/notification2.png", + 'follow': true, + 'name': 'Davis Bothman', + 'messagereq': false, + }, + { + 'image': "assets/images/png/notification3.png", + 'follow': false, + 'name': 'Lorem Ipsum is simply dummy \ntext of the printing and . . . ', + 'messagereq': false, + }, + { + 'image': "assets/images/png/notification2.png", + 'follow': true, + 'name': 'Davis Bothman', + 'messagereq': false, + }, + { + 'image': "assets/images/png/notification3.png", + 'follow': false, + 'name': 'Lorem Ipsum is simply dummy \ntext of the printing and . . . ', + 'messagereq': false, + }, + ]; + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Color.fromARGB(255, 18, 32, 47), + appBar: CommonAppbar( + titleTxt: 'Notifications', + ), + body: Stack( + children: [ + // const CommonBlurLeftRed(), + Positioned(top: 10, left: -30, child: CommonBlurLeftSecond()), + // const CommonBlurRightRed(), + // const CommonBlurLeft(), + Positioned(top: 150, right: -30, child: CommonBlurRightSecond()), + Positioned(top: 350, left: -30, child: CommonBlurLeftBlue()), + GlassmorphicContainer( + width: MediaQuery.of(context).size.width, + height: + // 500.h, + MediaQuery.of(context).size.height, + borderRadius: 2, + blur: 10, + alignment: Alignment.bottomLeft, + border: 2, + linearGradient: LinearGradient( + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + colors: [ + Color(0XFF222935).withOpacity(0.60), + Color(0XFF222935).withOpacity(0.60), + Color(0XFF222935).withOpacity(0.60), + Color(0XFF222935).withOpacity(0.60), + + // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), + // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), + // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), + // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), + ], + ), + borderGradient: LinearGradient( + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + colors: [ + // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), + // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), + Color(0XFF222935).withOpacity(0.60), + + Color(0XFF222935).withOpacity(0.60), + ], + ), + child: Column( + children: [ + ListView.separated( + separatorBuilder: (context, index) { + return Divider( + thickness: 0.6.h, + color: Color(0xffFFFFFF).withOpacity(0.72), + ); + }, + itemCount: notificationcontents.length, + shrinkWrap: true, + padding: const EdgeInsets.only(top: 10.0), + physics: const NeverScrollableScrollPhysics(), + itemBuilder: (context, index) { + return Notificationlist( + name: notificationcontents[index]['name'], + followrequest: notificationcontents[index]['follow'], + imageurl: notificationcontents[index]['image'], + msgrequest: notificationcontents[index]['messagereq'], + ); + }, + ), + ], + )), + ], + ), + ); + } +} + +class Notificationlist extends StatefulWidget { + final String imageurl; + final bool msgrequest; + final String name; + final bool followrequest; + + // const Notificationlist({super.key}); + Notificationlist({ + Key? key, + required this.imageurl, + required this.msgrequest, + required this.name, + required this.followrequest, + }) : super(key: key); + + @override + State createState() => _NotificationlistState(); +} + +class _NotificationlistState extends State { + @override + Widget build(BuildContext context) { + return Padding( + padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 10.h), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: 60, + height: 60, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage(widget.imageurl), + fit: BoxFit.fill, + ), + ), + ), + sizedBoxWidth(10.w), + widget.msgrequest == true + ? Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + text14400white(widget.name), + sizedBoxHeight(6.h), + text12400white('3 mins ago'), + sizedBoxHeight(10.h), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + SizedBox( + width: 135.w, + height: 30.h, + child: + CustomButton(text: 'Accept', onPressed: () {})), + sizedBoxWidth(10.w), + SizedBox( + width: 135.w, + height: 30.h, + child: CustomButton2( + text: 'Message', onPressed: () {})) + ], + ) + ], + ) + : widget.followrequest == true + ? Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + text14700white(widget.name), + sizedBoxHeight(3.h), + text12400white('wants to follow you'), + sizedBoxHeight(6.h), + text12400white('3 mins ago'), + ], + ), + sizedBoxWidth(10.w), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + SizedBox( + width: 80.w, + height: 30.h, + child: CustomButton( + text: 'Confirm', onPressed: () {})), + sizedBoxWidth(10.w), + SizedBox( + width: 80.w, + height: 30.h, + child: CustomButton2( + text: 'Delete', onPressed: () {})) + ], + ) + ], + ) + : Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + text14400white(widget.name), + sizedBoxHeight(6.h), + text12400white('3 mins ago'), + ], + ), + sizedBoxWidth(25.w), + Image.asset( + 'assets/images/png/notifcation.png', + width: 60.w, + height: 60.h, + ) + ], + ) + ], + ), + ); + } +} diff --git a/lib/resources/routes/route_name.dart b/lib/resources/routes/route_name.dart index a0488dc..48624c0 100644 --- a/lib/resources/routes/route_name.dart +++ b/lib/resources/routes/route_name.dart @@ -55,4 +55,7 @@ class RouteName { static const String groupchatpage = '/groupchatpage'; static const String managememberscal = '/managememberscal'; + + static const String notificaationpage = '/notificationpage'; + } diff --git a/lib/resources/routes/routes.dart b/lib/resources/routes/routes.dart index 704ecba..b25fb2a 100644 --- a/lib/resources/routes/routes.dart +++ b/lib/resources/routes/routes.dart @@ -11,6 +11,7 @@ import 'package:regroup/Feed%20Module/Main_Screens/Chats/View/groupchat.dart'; import 'package:regroup/Feed%20Module/Main_Screens/Chats/View/newchatpage.dart'; import 'package:regroup/Feed%20Module/Main_Screens/Chats/View/newgroup.dart'; import 'package:regroup/Feed%20Module/Main_Screens/Chats/View/userchat.dart'; +import 'package:regroup/Feed%20Module/Notification/View/notification.dart'; import 'package:regroup/Feed%20Module/sidemenu/Community/Admin/PopupItem/Community%20settings/CommunitySetting.dart'; import 'package:regroup/Feed%20Module/sidemenu/Community/Admin/PopupItem/Community%20settings/EditCommunity/EditCommunity.dart'; @@ -262,6 +263,10 @@ class AppRoutes { name: RouteName.managememberscal, page: () => const ManageMembersCal(), ), + GetPage( + name: RouteName.notificaationpage, + page: () => const NotificationPage(), + ), ]; }