From dd7c866e397652ca5e9fb553c30baad4a5574137 Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Tue, 6 Jun 2023 13:27:29 +0300 Subject: [PATCH] improvements. --- .../report/create_service_report.dart | 63 ++++++++++--------- .../service_report_fault_description.dart | 4 +- 2 files changed, 34 insertions(+), 33 deletions(-) diff --git a/lib/views/pages/user/requests/report/create_service_report.dart b/lib/views/pages/user/requests/report/create_service_report.dart index c5f51b0..2f4b2ef 100644 --- a/lib/views/pages/user/requests/report/create_service_report.dart +++ b/lib/views/pages/user/requests/report/create_service_report.dart @@ -107,6 +107,7 @@ class _CreateServiceReportState extends State with TickerPr child: Stack( children: [ ListView( + padding: const EdgeInsets.all(16), children: [ //AppNameBar(), const SizedBox( @@ -673,37 +674,37 @@ class _CreateServiceReportState extends State with TickerPr const SizedBox( height: 8, ), - Row( - children: [ - ASubTitle(_subtitle.workPreformed), - Expanded( - child: SizedBox( - height: 32 * AppStyle.getScaleFactor(context), - child: SpeechToTextButton( - controller: _workPreformedController, - mini: true, - ), - ), - ), - ], - ), - const SizedBox( - height: 4, - ), - ATextFormField( - initialValue: _serviceReport?.workPreformed, - textAlign: TextAlign.center, - controller: _workPreformedController, - style: Theme.of(context).textTheme.subtitle1, - validator: (value) => Validator.hasValue(value) ? null : _subtitle.requiredWord, - textInputType: TextInputType.multiline, - onSaved: (value) { - _serviceReport.workPreformed = value; - }, - ), - const SizedBox( - height: 8, - ), + // Row( + // children: [ + // ASubTitle(_subtitle.workPreformed), + // Expanded( + // child: SizedBox( + // height: 32 * AppStyle.getScaleFactor(context), + // child: SpeechToTextButton( + // controller: _workPreformedController, + // mini: true, + // ), + // ), + // ), + // ], + // ), + // const SizedBox( + // height: 4, + // ), + // ATextFormField( + // initialValue: _serviceReport?.workPreformed, + // textAlign: TextAlign.center, + // controller: _workPreformedController, + // style: Theme.of(context).textTheme.subtitle1, + // validator: (value) => Validator.hasValue(value) ? null : _subtitle.requiredWord, + // textInputType: TextInputType.multiline, + // onSaved: (value) { + // _serviceReport.workPreformed = value; + // }, + // ), + // const SizedBox( + // height: 8, + // ), const SizedBox(height: 8), Row( diff --git a/lib/views/widgets/status/report/service_report_fault_description.dart b/lib/views/widgets/status/report/service_report_fault_description.dart index c347fe4..9b0d851 100644 --- a/lib/views/widgets/status/report/service_report_fault_description.dart +++ b/lib/views/widgets/status/report/service_report_fault_description.dart @@ -28,9 +28,9 @@ class ServiceReportFaultDescription extends StatelessWidget { menuProvider.reset(); await menuProvider.getData(user: userProvider.user, host: settingProvider.host, requestId: requestId); }, - child: menuProvider.items?.isEmpty ?? true + child: (menuProvider.items?.isEmpty ?? true) ? const ATextFormField( - initialValue: "NULL", + initialValue: "", enable: false, ) : FaultDescriptionMenu(