Merge pull request 'notification static screen' (#1) from notificationpage into main
Reviewed-on: #1
This commit is contained in:
BIN
assets/images/png/notifcation.png
Normal file
BIN
assets/images/png/notifcation.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.5 KiB |
BIN
assets/images/png/notification1.png
Normal file
BIN
assets/images/png/notification1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.1 KiB |
BIN
assets/images/png/notification2.png
Normal file
BIN
assets/images/png/notification2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.2 KiB |
BIN
assets/images/png/notification3.png
Normal file
BIN
assets/images/png/notification3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.8 KiB |
@@ -68,10 +68,15 @@ class _CommunityScreenState extends State<CommunityScreen> {
|
||||
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),
|
||||
],
|
||||
|
||||
251
lib/Feed Module/Notification/View/notification.dart
Normal file
251
lib/Feed Module/Notification/View/notification.dart
Normal file
@@ -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<NotificationPage> createState() => _NotificationPageState();
|
||||
}
|
||||
|
||||
class _NotificationPageState extends State<NotificationPage> {
|
||||
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<Notificationlist> createState() => _NotificationlistState();
|
||||
}
|
||||
|
||||
class _NotificationlistState extends State<Notificationlist> {
|
||||
@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,
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -55,4 +55,7 @@ class RouteName {
|
||||
|
||||
static const String groupchatpage = '/groupchatpage';
|
||||
static const String managememberscal = '/managememberscal';
|
||||
|
||||
static const String notificaationpage = '/notificationpage';
|
||||
|
||||
}
|
||||
|
||||
@@ -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(),
|
||||
),
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user