2024-06-14 19:25:56 +05:30
|
|
|
|
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(
|
2024-07-29 15:20:19 +05:30
|
|
|
|
backgroundColor: const Color.fromARGB(255, 18, 32, 47),
|
|
|
|
|
|
appBar: const CommonAppbar(
|
2024-06-14 19:25:56 +05:30
|
|
|
|
titleTxt: 'Notifications',
|
|
|
|
|
|
),
|
|
|
|
|
|
body: Stack(
|
|
|
|
|
|
children: [
|
|
|
|
|
|
// const CommonBlurLeftRed(),
|
2024-07-29 15:20:19 +05:30
|
|
|
|
const Positioned(top: 10, left: -30, child: CommonBlurLeftSecond()),
|
2024-06-14 19:25:56 +05:30
|
|
|
|
// const CommonBlurRightRed(),
|
|
|
|
|
|
// const CommonBlurLeft(),
|
2024-07-29 15:20:19 +05:30
|
|
|
|
const Positioned(top: 150, right: -30, child: CommonBlurRightSecond()),
|
|
|
|
|
|
const Positioned(top: 350, left: -30, child: CommonBlurLeftBlue()),
|
2024-06-14 19:25:56 +05:30
|
|
|
|
GlassmorphicContainer(
|
|
|
|
|
|
width: MediaQuery.of(context).size.width,
|
|
|
|
|
|
height:
|
|
|
|
|
|
// 500.h,
|
|
|
|
|
|
MediaQuery.of(context).size.height,
|
|
|
|
|
|
borderRadius: 2,
|
2024-07-01 19:58:39 +05:30
|
|
|
|
blur: 6,
|
2024-06-14 19:25:56 +05:30
|
|
|
|
alignment: Alignment.bottomLeft,
|
|
|
|
|
|
border: 2,
|
|
|
|
|
|
linearGradient: LinearGradient(
|
|
|
|
|
|
begin: Alignment.topCenter,
|
|
|
|
|
|
end: Alignment.bottomCenter,
|
|
|
|
|
|
colors: [
|
2024-07-29 15:20:19 +05:30
|
|
|
|
const Color(0XFF222935).withOpacity(0.60),
|
|
|
|
|
|
const Color(0XFF222935).withOpacity(0.60),
|
|
|
|
|
|
const Color(0XFF222935).withOpacity(0.60),
|
|
|
|
|
|
const Color(0XFF222935).withOpacity(0.60),
|
2024-06-14 19:25:56 +05:30
|
|
|
|
|
|
|
|
|
|
// 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),
|
2024-07-29 15:20:19 +05:30
|
|
|
|
const Color(0XFF222935).withOpacity(0.60),
|
2024-06-14 19:25:56 +05:30
|
|
|
|
|
2024-07-29 15:20:19 +05:30
|
|
|
|
const Color(0XFF222935).withOpacity(0.60),
|
2024-06-14 19:25:56 +05:30
|
|
|
|
],
|
|
|
|
|
|
),
|
|
|
|
|
|
child: Column(
|
|
|
|
|
|
children: [
|
|
|
|
|
|
ListView.separated(
|
|
|
|
|
|
separatorBuilder: (context, index) {
|
|
|
|
|
|
return Divider(
|
|
|
|
|
|
thickness: 0.6.h,
|
2024-07-29 15:20:19 +05:30
|
|
|
|
color: const Color(0xffFFFFFF).withOpacity(0.72),
|
2024-06-14 19:25:56 +05:30
|
|
|
|
);
|
|
|
|
|
|
},
|
|
|
|
|
|
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});
|
2024-07-29 15:20:19 +05:30
|
|
|
|
const Notificationlist({
|
2024-06-14 19:25:56 +05:30
|
|
|
|
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
|
2024-06-25 20:14:03 +05:30
|
|
|
|
? Expanded(
|
|
|
|
|
|
child: 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'),
|
|
|
|
|
|
],
|
|
|
|
|
|
),
|
2024-07-29 15:20:19 +05:30
|
|
|
|
const Spacer(),
|
2024-06-25 20:14:03 +05:30
|
|
|
|
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: () {}))
|
|
|
|
|
|
],
|
|
|
|
|
|
)
|
|
|
|
|
|
],
|
|
|
|
|
|
),
|
2024-06-14 19:25:56 +05:30
|
|
|
|
)
|
2024-06-25 20:14:03 +05:30
|
|
|
|
: Expanded(
|
|
|
|
|
|
child: Row(
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
|
children: [
|
|
|
|
|
|
Column(
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
children: [
|
|
|
|
|
|
text14400white(widget.name),
|
|
|
|
|
|
sizedBoxHeight(6.h),
|
|
|
|
|
|
text12400white('3 mins ago'),
|
|
|
|
|
|
],
|
|
|
|
|
|
),
|
|
|
|
|
|
// sizedBoxWidth(25.w),
|
2024-07-29 15:20:19 +05:30
|
|
|
|
const Spacer(),
|
2024-06-25 20:14:03 +05:30
|
|
|
|
Expanded(
|
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
|
'assets/images/png/notifcation.png',
|
|
|
|
|
|
width: 90.w,
|
|
|
|
|
|
height: 90.h,
|
|
|
|
|
|
),
|
|
|
|
|
|
)
|
|
|
|
|
|
],
|
|
|
|
|
|
),
|
2024-06-14 19:25:56 +05:30
|
|
|
|
)
|
|
|
|
|
|
],
|
|
|
|
|
|
),
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|