buildErrorLineCell function

Widget buildErrorLineCell({
  1. required String errorText,
  2. IconData errorIcon = Icons.error,
  3. Color errorColor = Colors.red,
  4. double height = 40,
  5. Color backgroundColor = Colors.white,
})

Implementation

Widget buildErrorLineCell(
    {required String errorText,
    IconData errorIcon = Icons.error,
    Color errorColor = Colors.red,
    double height = 40,
    Color backgroundColor = Colors.white}) {
  return Container(
    height: height,
    color: backgroundColor,
    alignment: Alignment.center,
    child: Row(
      mainAxisAlignment: MainAxisAlignment.center,
      children: <Widget>[
        Icon(errorIcon, color: errorColor),
        const SizedBox(width: 5),
        Text(errorText, style: TextStyle(color: errorColor))
      ],
    ),
  );
}