buildMaterialErrorText method

Widget? buildMaterialErrorText(
  1. BuildContext context,
  2. String? error
)

Implementation

Widget? buildMaterialErrorText(BuildContext context, String? error) {
  if (error == null) return null;
  final (inputTheme, style, theme) = resolveTheme(context);
  return DefaultTextStyle(
    style: inputTheme.errorStyle ?? TextStyle(color: theme.colorScheme.error),
    child: Text(error),
  );
}