defaultErrorBuilder static method

Widget defaultErrorBuilder(
  1. BuildContext context,
  2. String error
)

The default builder for errors displayed below the description. Prefixes the message with FIcons.error.

Implementation

static Widget defaultErrorBuilder(BuildContext context, String error) => Builder(
  builder: (context) {
    final style = DefaultTextStyle.of(context).style;
    return Row(
      mainAxisSize: .min,
      spacing: 4,
      children: [
        ExcludeSemantics(
          child: IconTheme(
            data: IconThemeData(color: style.color, size: style.fontSize),
            child: context.theme.icons.error(context),
          ),
        ),
        Flexible(child: Text(error)),
      ],
    );
  },
);