refactor in notification and liked tenders page

This commit is contained in:
llsajjad
2025-09-18 09:04:24 +03:30
parent e854793850
commit eb4df7f6da
7 changed files with 211 additions and 252 deletions
@@ -4,6 +4,7 @@ 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/page_selection_dialog.dart';
import 'package:tm_app/views/shared/desktop_navigation_widget.dart';
import '../../shared/main_tab_bar.dart';
@@ -106,7 +107,7 @@ class _DesktopNotificationPageState extends State<DesktopNotificationPage>
children: [
const Spacer(),
Text(
'page',
NotificationStrings.page,
style: TextStyle(
fontSize: 13.0.sp(),
fontWeight: FontWeight.w300,
@@ -116,36 +117,16 @@ class _DesktopNotificationPageState extends State<DesktopNotificationPage>
SizedBox(width: 10.0.w()),
InkWell(
onTap: () async {
final _ = await showDialog<int>(
final selectedPage = 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,
),
);
},
),
),
);
},
builder:
(context) =>
const PageSelectionDialog(totalPages: 10),
);
if (selectedPage != null) {}
},
child: Container(
decoration: BoxDecoration(
border: Border.all(
@@ -158,7 +139,7 @@ class _DesktopNotificationPageState extends State<DesktopNotificationPage>
children: [
SizedBox(width: 5.0.w()),
Text(
'currentPage',
NotificationStrings.currentPage,
style: TextStyle(
fontSize: 14.0.sp(),
fontWeight: FontWeight.w500,
@@ -180,7 +161,7 @@ class _DesktopNotificationPageState extends State<DesktopNotificationPage>
),
SizedBox(width: 5.0.w()),
Text(
'of',
NotificationStrings.of,
style: TextStyle(
fontSize: 14.0.sp(),
fontWeight: FontWeight.w400,
@@ -189,7 +170,7 @@ class _DesktopNotificationPageState extends State<DesktopNotificationPage>
),
SizedBox(width: 5.0.w()),
Text(
'totalPages',
NotificationStrings.totalPages,
style: TextStyle(
fontSize: 13.0.sp(),
fontWeight: FontWeight.w400,