fix: Added alignment customisation

This commit is contained in:
Deven Joshi
2021-01-12 18:14:00 +05:30
parent f04452cbc9
commit 53587a8655
+11 -3
View File
@@ -6,15 +6,23 @@ class InfoTile extends StatelessWidget {
final String message; final String message;
final Widget child; final Widget child;
final bool showMessage; final bool showMessage;
final Alignment tileAnchor;
final Alignment childAnchor;
InfoTile({this.message, this.child, this.showMessage}); InfoTile({
this.message,
this.child,
this.showMessage,
this.tileAnchor,
this.childAnchor,
});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return PortalEntry( return PortalEntry(
visible: showMessage, visible: showMessage,
portalAnchor: Alignment.topCenter, portalAnchor: tileAnchor ?? Alignment.topCenter,
childAnchor: Alignment.bottomCenter, childAnchor: childAnchor ?? Alignment.bottomCenter,
portal: Container( portal: Container(
height: 25.0, height: 25.0,
color: StreamChatTheme.of(context).colorTheme.grey, color: StreamChatTheme.of(context).colorTheme.grey,