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