213 lines
8.1 KiB
Dart
213 lines
8.1 KiB
Dart
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 'package:tm_app/views/notification/strings/notification_strings.dart';
|
|
import 'package:tm_app/views/shared/desktop_navigation_widget.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 DesktopNotificationPage extends StatefulWidget {
|
|
const DesktopNotificationPage({super.key});
|
|
|
|
@override
|
|
State<DesktopNotificationPage> createState() =>
|
|
_DesktopNotificationPageState();
|
|
}
|
|
|
|
class _DesktopNotificationPageState extends State<DesktopNotificationPage>
|
|
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,
|
|
body: Column(
|
|
children: [
|
|
const DesktopNavigationWidget(currentIndex: 3),
|
|
|
|
SizedBox(height: 60.0.h()),
|
|
|
|
Expanded(
|
|
child: Center(
|
|
child: SizedBox(
|
|
width: 740,
|
|
child: 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: const [
|
|
NotificationAllTab(),
|
|
NotificationUnreadTab(),
|
|
NotificationImportantTab(),
|
|
],
|
|
),
|
|
),
|
|
SizedBox(height: 10.0.h()),
|
|
Row(
|
|
children: [
|
|
const Spacer(),
|
|
Text(
|
|
'page',
|
|
style: TextStyle(
|
|
fontSize: 13.0.sp(),
|
|
fontWeight: FontWeight.w300,
|
|
color: AppColors.grey60,
|
|
),
|
|
),
|
|
SizedBox(width: 10.0.w()),
|
|
InkWell(
|
|
onTap: () async {
|
|
final _ = await showDialog<int>(
|
|
context: context,
|
|
builder: (context) {
|
|
return AlertDialog(
|
|
backgroundColor: AppColors.backgroundColor,
|
|
title: const Text('selectPage'),
|
|
content: SizedBox(
|
|
width: 200,
|
|
height: 300,
|
|
child: ListView.builder(
|
|
itemCount: 1,
|
|
itemBuilder: (context, index) {
|
|
final pageNumber = index + 1;
|
|
return ListTile(
|
|
title: Text(
|
|
'{LikedTendersStrings.page} $pageNumber',
|
|
),
|
|
onTap:
|
|
() => Navigator.pop(
|
|
context,
|
|
pageNumber,
|
|
),
|
|
);
|
|
},
|
|
),
|
|
),
|
|
);
|
|
},
|
|
);
|
|
},
|
|
child: Container(
|
|
decoration: BoxDecoration(
|
|
border: Border.all(
|
|
color: AppColors.grey30,
|
|
width: 1,
|
|
),
|
|
borderRadius: BorderRadius.circular(4),
|
|
),
|
|
child: Row(
|
|
children: [
|
|
SizedBox(width: 5.0.w()),
|
|
Text(
|
|
'currentPage',
|
|
style: TextStyle(
|
|
fontSize: 14.0.sp(),
|
|
fontWeight: FontWeight.w500,
|
|
color: AppColors.grey70,
|
|
),
|
|
),
|
|
SizedBox(width: 5.0.w()),
|
|
SvgPicture.asset(
|
|
AssetsManager.arrowDownSmall,
|
|
colorFilter: ColorFilter.mode(
|
|
AppColors.grey80,
|
|
BlendMode.srcIn,
|
|
),
|
|
),
|
|
SizedBox(width: 5.0.w()),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
SizedBox(width: 5.0.w()),
|
|
Text(
|
|
'of',
|
|
style: TextStyle(
|
|
fontSize: 14.0.sp(),
|
|
fontWeight: FontWeight.w400,
|
|
color: AppColors.grey60,
|
|
),
|
|
),
|
|
SizedBox(width: 5.0.w()),
|
|
Text(
|
|
'totalPages',
|
|
style: TextStyle(
|
|
fontSize: 13.0.sp(),
|
|
fontWeight: FontWeight.w400,
|
|
color: AppColors.grey60,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
|
|
SizedBox(height: 30.0.h()),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|