getErrorText static method
Widget
getErrorText(
- BuildContext context,
- CometChatColorPalette colorPalette,
- CometChatTypography typography,
- CometChatSpacing spacing, {
- String? errorStateText,
- TextStyle? errorTextStyle,
Implementation
static Widget getErrorText(BuildContext context, CometChatColorPalette colorPalette, CometChatTypography typography, CometChatSpacing spacing,
{String? errorStateText,
TextStyle? errorTextStyle,}) {
return Container(
height: 116,
alignment: Alignment.center,
child: Text(
errorStateText ??"${Translations.of(context).looksLikeSomethingWrong}\n${Translations.of(context).pleaseTryAgain}.",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: typography.body?.regular?.fontSize,
fontWeight: typography.body?.regular?.fontWeight,
fontFamily: typography.body?.regular?.fontFamily,
color: colorPalette.textSecondary)
.merge(errorTextStyle)
),
);
}