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/tablet_navigation_widget.dart';
import 'package:tm_app/views/shared/tender_app_bar.dart';
@@ -105,7 +106,7 @@ class _TabletNotificationPageState extends State<TabletNotificationPage>
children: [
const Spacer(),
Text(
'page',
NotificationStrings.page,
style: TextStyle(
fontSize: 13.0.sp(),
fontWeight: FontWeight.w300,
@@ -115,33 +116,14 @@ class _TabletNotificationPageState extends State<TabletNotificationPage>
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(
@@ -152,7 +134,7 @@ class _TabletNotificationPageState extends State<TabletNotificationPage>
children: [
SizedBox(width: 5.0.w()),
Text(
'currentPage',
NotificationStrings.currentPage,
style: TextStyle(
fontSize: 14.0.sp(),
fontWeight: FontWeight.w500,
@@ -174,7 +156,7 @@ class _TabletNotificationPageState extends State<TabletNotificationPage>
),
SizedBox(width: 5.0.w()),
Text(
'of',
NotificationStrings.of,
style: TextStyle(
fontSize: 14.0.sp(),
fontWeight: FontWeight.w400,
@@ -183,7 +165,7 @@ class _TabletNotificationPageState extends State<TabletNotificationPage>
),
SizedBox(width: 5.0.w()),
Text(
'totalPages',
NotificationStrings.totalPages,
style: TextStyle(
fontSize: 13.0.sp(),
fontWeight: FontWeight.w400,