Add clock asset and enhance meeting time dialogs
- Added a new clock icon asset to the AssetsManager. - Updated MeetingTimeBottomSheet and MeetingTimeDialog to include a close button for better user experience. - Introduced MeetingTimeSuccessfulRegisteredBottomSheet and MeetingTimeSuccessfulRegisteredDialog for confirming meeting time registration. - Refactored submission dialogs to improve layout and interaction consistency.
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:tm_app/core/routes/app_routes.dart';
|
||||
import 'package:tm_app/core/theme/colors.dart';
|
||||
import 'package:tm_app/core/utils/size_config.dart';
|
||||
import 'package:tm_app/view_models/auth_view_model.dart';
|
||||
import 'package:tm_app/views/detail/strings/tender_details_strings.dart';
|
||||
|
||||
import 'meeting_time_successful_registered_dialog.dart';
|
||||
|
||||
class MeetingTimeDialog extends StatefulWidget {
|
||||
const MeetingTimeDialog({required this.onConfirm, super.key});
|
||||
final ValueChanged<String> onConfirm;
|
||||
@@ -29,7 +28,6 @@ class _MeetingTimeDialogState extends State<MeetingTimeDialog> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final userRole = context.watch<AuthViewModel>().userRole;
|
||||
return Dialog(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
@@ -40,7 +38,7 @@ class _MeetingTimeDialogState extends State<MeetingTimeDialog> {
|
||||
child: Wrap(
|
||||
children: [
|
||||
Container(
|
||||
// width: double.infinity,
|
||||
width: 560.0,
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
24.0.w(),
|
||||
24.0.h(),
|
||||
@@ -54,15 +52,45 @@ class _MeetingTimeDialogState extends State<MeetingTimeDialog> {
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
TenderDetailsStrings.meetingTime,
|
||||
style: TextStyle(
|
||||
fontSize: 20.0.sp(),
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColors.grey70,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
TenderDetailsStrings.meetingTime,
|
||||
style: TextStyle(
|
||||
fontSize: 20.0.sp(),
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColors.grey70,
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
context.pop();
|
||||
},
|
||||
splashColor: Colors.transparent,
|
||||
child: Container(
|
||||
width: 24.0.w(),
|
||||
height: 24.0.w(),
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(
|
||||
color: AppColors.grey60,
|
||||
width: 2.0,
|
||||
),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Icon(
|
||||
Icons.close,
|
||||
color: AppColors.grey60,
|
||||
size: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 15.0.h()),
|
||||
SizedBox(height: 16.0.h()),
|
||||
Divider(color: AppColors.grey20),
|
||||
SizedBox(height: 8.0.h()),
|
||||
ListView.builder(
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
@@ -86,32 +114,37 @@ class _MeetingTimeDialogState extends State<MeetingTimeDialog> {
|
||||
),
|
||||
SizedBox(height: 8.0.h()),
|
||||
SizedBox(height: 8.0.h()),
|
||||
Material(
|
||||
color: Colors.transparent,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
widget.onConfirm(type);
|
||||
context.pop();
|
||||
userRole == Role.admin
|
||||
? const CompletionOfDocumentsRouteData().push(context)
|
||||
: const FinalCompletionOfDocumentsRouteData().push(
|
||||
context,
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 56.0.h(),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.primary20,
|
||||
borderRadius: BorderRadius.circular(100),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
TenderDetailsStrings.apply,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0.sp(),
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.mainBlue,
|
||||
Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
child: InkWell(
|
||||
borderRadius: BorderRadius.circular(100),
|
||||
onTap: () {
|
||||
// widget.onConfirm(type);
|
||||
context.pop();
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const MeetingTimeSuccessfulRegisteredDialog();
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
width: 150,
|
||||
height: 56.0.h(),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.primary20,
|
||||
borderRadius: BorderRadius.circular(100),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
TenderDetailsStrings.apply,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0.sp(),
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.mainBlue,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user