fix backdrop filter

This commit is contained in:
Salvatore Giordano
2020-10-28 10:39:55 +01:00
parent d2801b2b13
commit 3f619fe79c
3 changed files with 46 additions and 38 deletions
+21 -17
View File
@@ -43,27 +43,28 @@ class MessageActionsModal extends StatelessWidget {
@override
Widget build(BuildContext context) {
final ownId = StreamChat.of(context).user.id;
return GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
Navigator.pop(context);
},
child: Center(
child: SingleChildScrollView(
child: Stack(
children: [
Positioned.fill(
child: BackdropFilter(
filter: ImageFilter.blur(
sigmaX: 10,
sigmaY: 10,
),
child: Container(
color: Colors.transparent,
),
),
child: Stack(
children: [
Positioned.fill(
child: BackdropFilter(
filter: ImageFilter.blur(
sigmaX: 10.8731,
sigmaY: 10.8731,
),
Padding(
child: Container(
color: Colors.black.withOpacity(0.2),
),
),
),
Center(
child: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 8.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
@@ -91,6 +92,9 @@ class MessageActionsModal extends StatelessWidget {
showReactions: false,
showUsername: false,
showReplyIndicator: false,
showUserAvatar: message.user.id == ownId
? DisplayWidget.gone
: DisplayWidget.show,
showTimestamp: false,
showSendingIndicator: DisplayWidget.gone,
shape: messageShape,
@@ -131,9 +135,9 @@ class MessageActionsModal extends StatelessWidget {
],
),
),
],
),
),
),
],
),
);
}
+21 -17
View File
@@ -34,27 +34,28 @@ class MessageReactionsModal extends StatelessWidget {
@override
Widget build(BuildContext context) {
final ownId = StreamChat.of(context).user.id;
return GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
Navigator.pop(context);
},
child: Center(
child: SingleChildScrollView(
child: Stack(
children: [
Positioned.fill(
child: BackdropFilter(
filter: ImageFilter.blur(
sigmaX: 10,
sigmaY: 10,
),
child: Container(
color: Colors.transparent,
),
),
child: Stack(
children: [
Positioned.fill(
child: BackdropFilter(
filter: ImageFilter.blur(
sigmaX: 10.8731,
sigmaY: 10.8731,
),
Padding(
child: Container(
color: Colors.black.withOpacity(0.2),
),
),
),
Center(
child: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 8.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
@@ -81,6 +82,9 @@ class MessageReactionsModal extends StatelessWidget {
messageTheme: messageTheme,
showReactions: false,
showUsername: false,
showUserAvatar: message.user.id == ownId
? DisplayWidget.gone
: DisplayWidget.show,
showReplyIndicator: false,
showTimestamp: false,
showSendingIndicator: DisplayWidget.gone,
@@ -95,9 +99,9 @@ class MessageReactionsModal extends StatelessWidget {
],
),
),
],
),
),
),
],
),
);
}
+4 -4
View File
@@ -220,8 +220,8 @@ class StreamChatThemeData {
return StreamChatThemeData(
accentColor: accentColor,
primaryColor: isDark ? Colors.black : Colors.white,
primaryIconTheme:
IconThemeData(color: isDark ? Colors.white : Colors.black),
primaryIconTheme: IconThemeData(
color: isDark ? Colors.white : Colors.black.withOpacity(.5)),
defaultChannelImage: (context, channel) => SizedBox(),
backgroundColor: isDark ? Colors.black : Colors.white,
defaultUserImage: (context, user) => Center(
@@ -287,7 +287,7 @@ class StreamChatThemeData {
),
ownMessageTheme: MessageTheme(
messageText: TextStyle(
fontSize: 15,
fontSize: 14.5,
color: isDark ? Colors.white : Colors.black,
),
createdAt: TextStyle(
@@ -320,7 +320,7 @@ class StreamChatThemeData {
isDark ? Color(0xff191919) : Color(0xffEAEAEA),
reactionsBorderColor: isDark ? Colors.black : Colors.white,
messageText: TextStyle(
fontSize: 15,
fontSize: 14.5,
color: isDark ? Colors.white : Colors.black,
),
createdAt: TextStyle(