Skip to content

Image Message overlay like blurring #666

Closed Answered by demchenkoalex
Jafarili asked this question in Ideas & Requests
Discussion options

You must be logged in to vote

I improved this so there is no need to redefine the whole image, but rather image message builder will accept overlay param like this

imageMessageBuilder: (context, message) => FlyerChatImageMessage(
  message: message,
  overlay: GestureDetector(
    onTap: () {
      final newMessage = message.copyWith(overlay: false);
      _chatController.update(message, newMessage);
    },
    child: Positioned.fill(
      child: ClipRect(
        child: BackdropFilter(
          filter: ImageFilter.blur(sigmaX: 30, sigmaY: 30),
          child: Container(
            color: Colors.white.withValues(alpha: 0.5),
            child: const Center(
              child: Text('Tap to reveal'),
            )…

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@Jafarili
Comment options

@demchenkoalex
Comment options

@Jafarili
Comment options

@demchenkoalex
Comment options

Answer selected by demchenkoalex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
2 participants