Update dependencies, enhance API endpoints, and refactor UI components
- Updated `pubspec.lock` to new package versions for `async`, `fake_async`, `leak_tracker`, and `vm_service`. - Modified API endpoint for unread notifications to include `event_type=PUSH`. - Refactored `CompletionOfDocumentsMobilePage` layout for improved structure. - Simplified `DetailDropDown` widget by removing unnecessary animations. - Updated `CommentBox` styling and adjusted padding for better UI consistency. - Replaced deprecated `FormCard` implementation in final completion pages with a new widget structure. - Enhanced button styles across various dialogs and pages for a cohesive design.
This commit is contained in:
@@ -12,7 +12,7 @@ class CommentBox extends StatelessWidget {
|
||||
return Container(
|
||||
height: 148,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.yellow1,
|
||||
color: AppColors.orange10,
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
border: Border.all(color: AppColors.yellow2),
|
||||
),
|
||||
@@ -27,7 +27,13 @@ class CommentBox extends StatelessWidget {
|
||||
|
||||
child: Row(
|
||||
children: [
|
||||
SvgPicture.asset(AssetsManager.clipboardText),
|
||||
SvgPicture.asset(
|
||||
AssetsManager.clipboardText,
|
||||
colorFilter: ColorFilter.mode(
|
||||
AppColors.grey80,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 16.0),
|
||||
Text(
|
||||
FinalCompletionOfDocumentsStrings.commentNoteTitle,
|
||||
@@ -41,8 +47,11 @@ class CommentBox extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
const Padding(
|
||||
padding: EdgeInsetsDirectional.only(start: 65, bottom: 10),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.only(
|
||||
start: 65,
|
||||
bottom: 10,
|
||||
),
|
||||
child: SizedBox(
|
||||
width: 256,
|
||||
height: 78,
|
||||
@@ -53,7 +62,7 @@ class CommentBox extends StatelessWidget {
|
||||
fontSize: 14.0,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: AppColors.grey,
|
||||
color: AppColors.grey70,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -0,0 +1,244 @@
|
||||
import 'package:dotted_border/dotted_border.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
|
||||
import '../../../core/constants/assets.dart' show AssetsManager;
|
||||
import '../../../core/theme/colors.dart';
|
||||
import '../../../view_models/final_completion_of_documents_view_model.dart';
|
||||
import '../../shared/main_drop_down.dart';
|
||||
import '../strings/final_completion_of_documents_strings.dart';
|
||||
|
||||
class FormCard extends StatelessWidget {
|
||||
const FormCard({required this.viewModel, super.key});
|
||||
final FinalCompletionOfDocumentsViewModel viewModel;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 24),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
border: Border.all(color: AppColors.borderColor),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 64.0,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
border: Border.all(color: AppColors.borderColor),
|
||||
),
|
||||
alignment: AlignmentDirectional.centerStart,
|
||||
child: Container(
|
||||
width: 118,
|
||||
height: 32,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.orange10,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: const Text(
|
||||
'50% Completed',
|
||||
style: TextStyle(color: AppColors.yellow4),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 48.0),
|
||||
Text(
|
||||
FinalCompletionOfDocumentsStrings.numberOfServersListedTitle,
|
||||
style: TextStyle(
|
||||
fontSize: 16.0,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: AppColors.grey60,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12.0),
|
||||
Text(
|
||||
'12 servers across 2 data centers',
|
||||
style: TextStyle(
|
||||
fontSize: 16.0,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: AppColors.grey80,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
Divider(color: AppColors.borderColor),
|
||||
const SizedBox(height: 24),
|
||||
Text(
|
||||
FinalCompletionOfDocumentsStrings
|
||||
.technicalTeamOrganizationChartUploadedTitle,
|
||||
style: TextStyle(
|
||||
fontSize: 16.0,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: AppColors.grey60,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12.0),
|
||||
Text(
|
||||
'PDF submitted with full team roles and structure',
|
||||
style: TextStyle(
|
||||
fontSize: 16.0,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: AppColors.grey80,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
Divider(color: AppColors.borderColor),
|
||||
const SizedBox(height: 48),
|
||||
_titleDropDownRow(
|
||||
text:
|
||||
FinalCompletionOfDocumentsStrings
|
||||
.describeInfrastructureCapabilitiestitle,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
_uploadFileCard(viewModel: viewModel),
|
||||
const SizedBox(height: 40),
|
||||
_titleDropDownRow(
|
||||
text:
|
||||
FinalCompletionOfDocumentsStrings
|
||||
.uploadTechnicalTeamOrgChartTitle,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
_describeYourTeamTextField(),
|
||||
const SizedBox(height: 48),
|
||||
_titleDropDownRow(
|
||||
text:
|
||||
FinalCompletionOfDocumentsStrings
|
||||
.noCertificationInISO27001Title,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
_uploadFileCard(viewModel: viewModel),
|
||||
const SizedBox(height: 48),
|
||||
_titleDropDownRow(
|
||||
text:
|
||||
FinalCompletionOfDocumentsStrings
|
||||
.uploadCompletionCertificateTitle,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
_uploadFileCard(viewModel: viewModel),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _describeYourTeamTextField() {
|
||||
return TextFormField(
|
||||
maxLines: 5,
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
fillColor: AppColors.grey0,
|
||||
hintText: FinalCompletionOfDocumentsStrings.describeYourTeamHint,
|
||||
hintStyle: TextStyle(
|
||||
fontSize: 12.0,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: AppColors.grey60,
|
||||
),
|
||||
border: OutlineInputBorder(
|
||||
borderSide: const BorderSide(color: AppColors.secondaryborder2),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: const BorderSide(color: AppColors.secondaryborder2),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: const BorderSide(color: AppColors.secondaryborder2),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _uploadFileCard({
|
||||
required FinalCompletionOfDocumentsViewModel viewModel,
|
||||
}) {
|
||||
return InkWell(
|
||||
onTap: () => viewModel.pickFile(),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 140,
|
||||
decoration: BoxDecoration(color: AppColors.grey0),
|
||||
child: DottedBorder(
|
||||
options: const RoundedRectDottedBorderOptions(
|
||||
radius: Radius.circular(12),
|
||||
dashPattern: [4, 4],
|
||||
strokeWidth: 1,
|
||||
color: AppColors.secondaryborder,
|
||||
padding: EdgeInsets.all(16),
|
||||
),
|
||||
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
SvgPicture.asset(AssetsManager.uploadFile),
|
||||
const SizedBox(height: 12),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Text(
|
||||
FinalCompletionOfDocumentsStrings.chooseFile,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.mainBlue,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
FinalCompletionOfDocumentsStrings.toUpload,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.grey60,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
FinalCompletionOfDocumentsStrings.selectZipOrEtcTitle,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: AppColors.grey60,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _titleDropDownRow({required String text}) {
|
||||
return Row(
|
||||
children: [
|
||||
SvgPicture.asset(AssetsManager.dangerFill),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
text,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: AppColors.grey60,
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
MainDropDown(
|
||||
text: FinalCompletionOfDocumentsStrings.statusTitle,
|
||||
items: const [
|
||||
FinalCompletionOfDocumentsStrings.statusWaitingForOthers,
|
||||
FinalCompletionOfDocumentsStrings.statusToDo,
|
||||
FinalCompletionOfDocumentsStrings.statusDone,
|
||||
],
|
||||
onSelect: (String item) {},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user