Closed meroo36 closed 1 year ago
Hi there,
In fact I want allow adding button without a text, if you're thinking to have only Icon style then just reduce the size or set the button type to be icon.
buttonType: AuthButtonType.icon
With that check impossible to set a text with spaces for CustomAuthButton
, this check is incorrect anyway.
For example: 'Sign In with Login and Password', so this is not empty and contains spaces, the check will fail
(style.buttonType != AuthButtonType.icon)
? text != null && text.isNotBlank
: text == null,
(style.buttonType != AuthButtonType.icon)
? 'Text must be not blank.'
: 'Icon button type does not need a text.',
);
the second condition, "contains", make it impossible to create a custom button with empty characters. It will fall into assert.
I would suggest that we can remove it and "isNotEmpty" is enough for it.