fix: invite error toast

This commit is contained in:
Lucas.Xu 2024-08-17 17:52:06 +08:00
parent 5497f7f219
commit 03efc24fad
2 changed files with 24 additions and 20 deletions

View File

@ -255,6 +255,7 @@ class _InviteMemberPageState extends State<_InviteMemberPage> {
if (!isEmail(email)) {
return showToastNotification(
context,
type: ToastificationType.error,
message: LocaleKeys.settings_appearance_members_emailInvalidError.tr(),
);
}

View File

@ -353,34 +353,37 @@ class _MToast extends StatelessWidget {
@override
Widget build(BuildContext context) {
final hintText = FlowyText.regular(
message,
fontSize: 16.0,
figmaLineHeight: 18.0,
color: Colors.white,
maxLines: 10,
);
return Container(
alignment: Alignment.bottomCenter,
padding: const EdgeInsets.only(bottom: 100),
padding: const EdgeInsets.only(bottom: 100, left: 16, right: 16),
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 13.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12.0),
color: const Color(0xE5171717),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
if (type == ToastificationType.success) ...[
const FlowySvg(
FlowySvgs.success_s,
blendMode: null,
),
const HSpace(8.0),
],
FlowyText.regular(
message,
fontSize: 16.0,
figmaLineHeight: 18.0,
color: Colors.white,
maxLines: 3,
),
],
),
child: type == ToastificationType.success
? Row(
mainAxisSize: MainAxisSize.min,
children: [
if (type == ToastificationType.success) ...[
const FlowySvg(
FlowySvgs.success_s,
blendMode: null,
),
const HSpace(8.0),
],
hintText,
],
)
: hintText,
),
);
}