refactor in notification and liked tenders page
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:tm_app/core/theme/colors.dart';
|
||||
import 'package:tm_app/views/notification/strings/notification_strings.dart';
|
||||
|
||||
class PageSelectionDialog extends StatelessWidget {
|
||||
final int totalPages;
|
||||
|
||||
const PageSelectionDialog({
|
||||
required this.totalPages, super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AlertDialog(
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
title: const Text(NotificationStrings.selectPage),
|
||||
content: SizedBox(
|
||||
width: 200,
|
||||
height: 300,
|
||||
child: ListView.builder(
|
||||
itemCount: totalPages,
|
||||
itemBuilder: (context, index) {
|
||||
final pageNumber = index + 1;
|
||||
return ListTile(
|
||||
title: Text('$pageNumber'),
|
||||
onTap: () => Navigator.pop(context, pageNumber),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user