inputWithIcon function
Implementation
Widget inputWithIcon(
{Key? key,
required Widget input,
Color? color,
Widget? prefix,
Widget? suffix}) {
prefix = prefix?.reIcon(color: color, size: 20);
suffix = suffix?.reIcon(color: color, size: 20);
if (prefix == null && suffix == null) {
return input;
} else {
return Stack(
key: key,
fit: StackFit.passthrough,
alignment: AlignmentDirectional.centerStart,
children: [
if (prefix != null) prefix,
input,
if (suffix != null) Positioned(right: 0, child: suffix)
],
);
}
}