We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
is there a way or property to just make the modal width bigger without extending or overriding as it was before with maxdialogwidth ?
The text was updated successfully, but these errors were encountered:
Hi @ozayr,
Yes it is possible. You just need to create your own modal type. Here you need to override only layoutModal.
layoutModal
class _MyModalDialog extends WoltModalType { @override BoxConstraints layoutModal(Size availableSize) { final availableWidth = availableSize.width; double width = availableWidth > 523.0 ? 312.0 : availableWidth - padding.end; return BoxConstraints( minWidth: width, maxWidth: width, minHeight: 0, maxHeight: availableSize.height * 0.6, ); } }
Then, when you are calling your modal:
WoltModalSheet.show( context: context, modalTypeBuilder: (BuildContext context) { final width = MediaQuery.sizeOf(context).width; if (width < 523) { return WoltModalType.bottomSheet(); } else { return _MyModalDialog(); }, ... },
Please let me know if this works!
Sorry, something went wrong.
ulusoyca
No branches or pull requests
is there a way or property to just make the modal width bigger without extending or overriding as it was before with maxdialogwidth ?
The text was updated successfully, but these errors were encountered: