From 0bb76bab39484dc7ef87b63600fa811e0fd7b36a Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Tue, 12 Jan 2021 18:18:33 +0530 Subject: [PATCH] fix: Added better customisation --- lib/src/info_tile.dart | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/lib/src/info_tile.dart b/lib/src/info_tile.dart index 46d111e7..2e12d6b3 100644 --- a/lib/src/info_tile.dart +++ b/lib/src/info_tile.dart @@ -8,14 +8,17 @@ class InfoTile extends StatelessWidget { final bool showMessage; final Alignment tileAnchor; final Alignment childAnchor; + final TextStyle textStyle; + final Color backgroundColor; - InfoTile({ - this.message, - this.child, - this.showMessage, - this.tileAnchor, - this.childAnchor, - }); + InfoTile( + {this.message, + this.child, + this.showMessage, + this.tileAnchor, + this.childAnchor, + this.textStyle, + this.backgroundColor}); @override Widget build(BuildContext context) { @@ -25,13 +28,15 @@ class InfoTile extends StatelessWidget { childAnchor: childAnchor ?? Alignment.bottomCenter, portal: Container( 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: Text( message, - style: StreamChatTheme.of(context).textTheme.body.copyWith( - color: Colors.white, - ), + style: textStyle ?? + StreamChatTheme.of(context).textTheme.body.copyWith( + color: Colors.white, + ), maxLines: 1, overflow: TextOverflow.ellipsis, ),