fix: Added better customisation

This commit is contained in:
Deven Joshi
2021-01-12 18:18:33 +05:30
parent 1cf15f1b61
commit 0bb76bab39
+16 -11
View File
@@ -8,14 +8,17 @@ class InfoTile extends StatelessWidget {
final bool showMessage; final bool showMessage;
final Alignment tileAnchor; final Alignment tileAnchor;
final Alignment childAnchor; final Alignment childAnchor;
final TextStyle textStyle;
final Color backgroundColor;
InfoTile({ InfoTile(
this.message, {this.message,
this.child, this.child,
this.showMessage, this.showMessage,
this.tileAnchor, this.tileAnchor,
this.childAnchor, this.childAnchor,
}); this.textStyle,
this.backgroundColor});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@@ -25,13 +28,15 @@ class InfoTile extends StatelessWidget {
childAnchor: childAnchor ?? Alignment.bottomCenter, childAnchor: childAnchor ?? Alignment.bottomCenter,
portal: Container( portal: Container(
height: 25.0, height: 25.0,
color: StreamChatTheme.of(context).colorTheme.grey.withOpacity(0.9), color: backgroundColor ??
StreamChatTheme.of(context).colorTheme.grey.withOpacity(0.9),
child: Center( child: Center(
child: Text( child: Text(
message, message,
style: StreamChatTheme.of(context).textTheme.body.copyWith( style: textStyle ??
color: Colors.white, StreamChatTheme.of(context).textTheme.body.copyWith(
), color: Colors.white,
),
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),