fix: Added alignment customisation
This commit is contained in:
+11
-3
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user