getOnError static method

Widget getOnError(
  1. BuildContext context, {
  2. Color? backgroundColor,
  3. Color? shadowColor,
  4. String? errorIconUrl,
  5. String? errorIconPackageName,
  6. String? errorStateText,
  7. Color? errorIconTint,
  8. TextStyle? errorTextStyle,
})

Implementation

static Widget getOnError(BuildContext context,
    {Color? backgroundColor,
    Color? shadowColor,
    String? errorIconUrl,
    String? errorIconPackageName,
    String? errorStateText,
    Color? errorIconTint,
    TextStyle? errorTextStyle}) {
  return Chip(
    backgroundColor: backgroundColor,
    shadowColor: shadowColor,
    label: Row(
      children: [
        Image.asset(
          errorIconUrl ?? AssetConstants.repliesError,
          package: errorIconPackageName ?? UIConstants.packageName,
          color: errorIconTint,
        ),
        const SizedBox(
          width: 10,
        ),
        Text(
          errorStateText ?? Translations.of(context).somethingWentWrongError,
          style: errorTextStyle,
        ),
      ],
    ),
  );
}