fix: kurang element is touched
This commit is contained in:
parent
f50576936e
commit
774d05a735
|
@ -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<String>? allowedExtensions;
|
||||
final String inputLabel;
|
||||
final bool? isTouched;
|
||||
final bool? isError;
|
||||
final String? messageError;
|
||||
|
||||
|
@ -129,7 +131,7 @@ class _InputFileState extends State<InputFile> {
|
|||
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,
|
||||
|
|
Loading…
Reference in New Issue