added notifications and change in forgot password
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:tm_app/core/utils/size_config.dart';
|
||||
|
||||
import '../pages/notification_screen.dart';
|
||||
import 'notification_card.dart';
|
||||
|
||||
class NotificationAllTab extends StatelessWidget {
|
||||
const NotificationAllTab({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListView.builder(
|
||||
itemCount: notifications.length,
|
||||
itemBuilder: (context, index) {
|
||||
final notification = notifications[index];
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(bottom: 16.0.h()),
|
||||
child: NotificationCard(notification: notification),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:tm_app/core/constants/assets.dart';
|
||||
import 'package:tm_app/core/theme/colors.dart';
|
||||
import 'package:tm_app/core/utils/size_config.dart';
|
||||
|
||||
import '../pages/notification_screen.dart';
|
||||
|
||||
class NotificationCard extends StatelessWidget {
|
||||
const NotificationCard({required this.notification, super.key});
|
||||
final NotificationModel notification;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
// height: 108.0.h(),
|
||||
margin: EdgeInsets.symmetric(horizontal: 24.0.w()),
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.0.w(), vertical: 16.0.h()),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.mainBlue.withValues(alpha: 0.03),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
border: Border.all(color: AppColors.mainBlue.withValues(alpha: 0.15)),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
SvgPicture.asset(AssetsManager.notification),
|
||||
SizedBox(width: 8.0.w()),
|
||||
Text(
|
||||
notification.title,
|
||||
style: TextStyle(
|
||||
fontSize: 16.0.sp(),
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.grey80,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 8.0.h()),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.only(start: 28.0.w()),
|
||||
child: Text(
|
||||
notification.description,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0.sp(),
|
||||
fontWeight: FontWeight.w400,
|
||||
color: AppColors.grey60,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8.0.h()),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.only(start: 28.0.w()),
|
||||
child: Row(
|
||||
children: [
|
||||
SvgPicture.asset(AssetsManager.calendar),
|
||||
SizedBox(width: 4.0.w()),
|
||||
Text(
|
||||
notification.time,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0.sp(),
|
||||
color: AppColors.grey60,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:tm_app/core/utils/size_config.dart';
|
||||
|
||||
import '../pages/notification_screen.dart';
|
||||
import 'notification_card.dart';
|
||||
|
||||
class NotificationImportantTab extends StatelessWidget {
|
||||
const NotificationImportantTab({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListView.builder(
|
||||
itemCount: notifications.length,
|
||||
itemBuilder: (context, index) {
|
||||
final notification = notifications[index];
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(bottom: 16.0.h()),
|
||||
child: NotificationCard(notification: notification),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:tm_app/core/utils/size_config.dart';
|
||||
|
||||
import '../pages/notification_screen.dart';
|
||||
import 'notification_card.dart';
|
||||
|
||||
class NotificationUnreadTab extends StatelessWidget {
|
||||
const NotificationUnreadTab({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListView.builder(
|
||||
itemCount: notifications.length,
|
||||
itemBuilder: (context, index) {
|
||||
final notification = notifications[index];
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(bottom: 16.0.h()),
|
||||
child: NotificationCard(notification: notification),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user