added notifications and change in forgot password
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class DesktopNotificationPage extends StatelessWidget {
|
||||
const DesktopNotificationPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Scaffold();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:tm_app/core/theme/colors.dart';
|
||||
import 'package:tm_app/core/utils/size_config.dart';
|
||||
import 'package:tm_app/views/notification/strings/notification_strings.dart';
|
||||
import 'package:tm_app/views/shared/tender_app_bar.dart';
|
||||
|
||||
import '../../shared/main_tab_bar.dart';
|
||||
import '../widgets/notification_all_tab.dart';
|
||||
import '../widgets/notification_important_tab.dart';
|
||||
import '../widgets/notification_unread_tab.dart';
|
||||
|
||||
class MobileNotificationPage extends StatefulWidget {
|
||||
const MobileNotificationPage({super.key});
|
||||
|
||||
@override
|
||||
State<MobileNotificationPage> createState() => _MobileNotificationPageState();
|
||||
}
|
||||
|
||||
class _MobileNotificationPageState extends State<MobileNotificationPage>
|
||||
with SingleTickerProviderStateMixin {
|
||||
late TabController controller;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
controller = TabController(length: 3, vsync: this);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
controller.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
appBar: tenderMobileAppBar(title: NotificationStrings.notificationTitle),
|
||||
body: Column(
|
||||
children: [
|
||||
MainTabBar(
|
||||
controller: controller,
|
||||
titles: [
|
||||
NotificationStrings.all,
|
||||
NotificationStrings.unread,
|
||||
NotificationStrings.important,
|
||||
],
|
||||
),
|
||||
SizedBox(height: 12.0.h()),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.only(end: 24.0.w()),
|
||||
child: Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: InkWell(
|
||||
onTap: () {},
|
||||
borderRadius: BorderRadius.circular(99),
|
||||
child: Container(
|
||||
width: 132.0.w(),
|
||||
height: 32.0.h(),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.primary20,
|
||||
borderRadius: BorderRadius.circular(99),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
NotificationStrings.markAllAsReadButton,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0.sp(),
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.mainBlue,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12.0.h()),
|
||||
Expanded(
|
||||
child: TabBarView(
|
||||
controller: controller,
|
||||
children: [
|
||||
NotificationAllTab(),
|
||||
NotificationUnreadTab(),
|
||||
NotificationImportantTab(),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:tm_app/core/utils/size_config.dart';
|
||||
import 'package:tm_app/views/notification/pages/d_notification_page.dart';
|
||||
import 'package:tm_app/views/notification/pages/m_notification_page.dart';
|
||||
import 'package:tm_app/views/notification/pages/t_notification_page.dart';
|
||||
import 'package:tm_app/views/shared/responsive_builder.dart';
|
||||
|
||||
class NotificationScreen extends StatelessWidget {
|
||||
const NotificationScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SizeConfig.init(context);
|
||||
return ResponsiveBuilder(
|
||||
mobile: MobileNotificationPage(),
|
||||
tablet: TabletNotificationPage(),
|
||||
desktop: DesktopNotificationPage(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class NotificationModel {
|
||||
final String title;
|
||||
final String description;
|
||||
final String time;
|
||||
final String type;
|
||||
|
||||
NotificationModel({
|
||||
required this.title,
|
||||
required this.description,
|
||||
required this.time,
|
||||
required this.type,
|
||||
});
|
||||
}
|
||||
|
||||
final List<NotificationModel> notifications = [
|
||||
NotificationModel(
|
||||
title: 'New Tender Invitation',
|
||||
description: 'You’ve been invited to tender #A-778.',
|
||||
time: '5 Min',
|
||||
type: 'new',
|
||||
),
|
||||
NotificationModel(
|
||||
title: 'New Tender Invitation',
|
||||
description: 'You’ve been invited to tender #N-3762.',
|
||||
time: '28 Min',
|
||||
type: 'new',
|
||||
),
|
||||
NotificationModel(
|
||||
title: 'Tender Submitted',
|
||||
description: 'You submitted bid for tender #B-554.',
|
||||
time: '28 Min',
|
||||
type: 'submit',
|
||||
),
|
||||
NotificationModel(
|
||||
title: 'New Tender Invitation',
|
||||
description: 'You’ve been invited to tender #N-3762.',
|
||||
time: '28 Min',
|
||||
type: 'new',
|
||||
),
|
||||
NotificationModel(
|
||||
title: 'Missing Documents',
|
||||
description: 'Please upload your company registration certificate.',
|
||||
time: '2 days ago',
|
||||
type: 'missing',
|
||||
),
|
||||
];
|
||||
@@ -0,0 +1,10 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TabletNotificationPage extends StatelessWidget {
|
||||
const TabletNotificationPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Scaffold();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user