make return to service not required

main_design2.0
nextwo 2 years ago
parent f5bc07c3a2
commit d33c97d1df

@ -155,14 +155,14 @@ class ServiceReport {
}
Future<bool> validate() async {
if (visitDate == null) {
await Fluttertoast.showToast(msg: "Visit Date Required");
return false;
}
if (returnToService == null) {
await Fluttertoast.showToast(msg: "Return To Service Date Required");
return false;
}
// if (visitDate == null) {
// await Fluttertoast.showToast(msg: "Visit Date Required");
// return false;
// }
// if (returnToService == null) {
// await Fluttertoast.showToast(msg: "Return To Service Date Required");
// return false;
// }
if (timer?.startAt == null) {
await Fluttertoast.showToast(msg: "Working Hours Required");
return false;

@ -391,12 +391,12 @@ class _CreateServiceReportState extends State<CreateServiceReport> with TickerPr
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const ASubTitle("Return to Service"),
_validate && _serviceReport.returnToService == null
? ASubTitle(
_subtitle.requiredWord,
color: Colors.red,
)
: const SizedBox.shrink(),
// _validate && _serviceReport.returnToService == null
// ? ASubTitle(
// _subtitle.requiredWord,
// color: Colors.red,
// )
// : const SizedBox.shrink(),
Row(
children: [
Expanded(

Loading…
Cancel
Save