From 774d05a735f0399fdba2e7780a0f509c87d78bbd Mon Sep 17 00:00:00 2001 From: Golek Date: Tue, 6 Dec 2022 16:55:29 +0700 Subject: [PATCH] fix: kurang element is touched --- packages/component_library/lib/src/input_file.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/component_library/lib/src/input_file.dart b/packages/component_library/lib/src/input_file.dart index 3c92276..967b569 100644 --- a/packages/component_library/lib/src/input_file.dart +++ b/packages/component_library/lib/src/input_file.dart @@ -17,6 +17,7 @@ class InputFile extends StatefulWidget { this.allowMultiple = false, this.allowedExtensions = const ['jpg', 'jpeg', 'png', 'gif'], required this.inputLabel, + this.isTouched = false, this.isError = false, this.messageError, }) : super(key: key); @@ -26,6 +27,7 @@ class InputFile extends StatefulWidget { final bool? allowMultiple; final List? allowedExtensions; final String inputLabel; + final bool? isTouched; final bool? isError; final String? messageError; @@ -129,7 +131,7 @@ class _InputFileState extends State { width: 335, child: IntrinsicHeight( child: DashedRect( - color: widget.isError! + color: widget.isError! && widget.isTouched! ? theme.dangerMainColor // jika error dan touched : theme.neutral50Color, strokeWidth: 2.0,