mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-10 05:45:10 +00:00
chore: Add border to images in timeline
This commit is contained in:
parent
41ae97fb8a
commit
0aaee82ec7
1 changed files with 13 additions and 8 deletions
|
@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter_blurhash/flutter_blurhash.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/pages/image_viewer/image_viewer.dart';
|
||||
import 'package:fluffychat/widgets/mxc_image.dart';
|
||||
|
||||
|
@ -79,19 +80,23 @@ class ImageBubble extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
onTap: () => _onTap(context),
|
||||
child: Hero(
|
||||
tag: event.eventId,
|
||||
child: AnimatedSwitcher(
|
||||
duration: const Duration(seconds: 1),
|
||||
child: Container(
|
||||
return Material(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
|
||||
side: BorderSide(color: Theme.of(context).dividerColor),
|
||||
),
|
||||
child: InkWell(
|
||||
onTap: () => _onTap(context),
|
||||
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
|
||||
child: Hero(
|
||||
tag: event.eventId,
|
||||
child: ConstrainedBox(
|
||||
constraints: maxSize
|
||||
? BoxConstraints(
|
||||
maxWidth: width,
|
||||
maxHeight: height,
|
||||
)
|
||||
: null,
|
||||
: const BoxConstraints.expand(),
|
||||
child: MxcImage(
|
||||
event: event,
|
||||
width: width,
|
||||
|
|
Loading…
Reference in a new issue