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:flutter_blurhash/flutter_blurhash.dart';
|
||||||
import 'package:matrix/matrix.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/pages/image_viewer/image_viewer.dart';
|
||||||
import 'package:fluffychat/widgets/mxc_image.dart';
|
import 'package:fluffychat/widgets/mxc_image.dart';
|
||||||
|
|
||||||
|
@ -79,19 +80,23 @@ class ImageBubble extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return InkWell(
|
return Material(
|
||||||
onTap: () => _onTap(context),
|
shape: RoundedRectangleBorder(
|
||||||
child: Hero(
|
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
|
||||||
tag: event.eventId,
|
side: BorderSide(color: Theme.of(context).dividerColor),
|
||||||
child: AnimatedSwitcher(
|
),
|
||||||
duration: const Duration(seconds: 1),
|
child: InkWell(
|
||||||
child: Container(
|
onTap: () => _onTap(context),
|
||||||
|
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
|
||||||
|
child: Hero(
|
||||||
|
tag: event.eventId,
|
||||||
|
child: ConstrainedBox(
|
||||||
constraints: maxSize
|
constraints: maxSize
|
||||||
? BoxConstraints(
|
? BoxConstraints(
|
||||||
maxWidth: width,
|
maxWidth: width,
|
||||||
maxHeight: height,
|
maxHeight: height,
|
||||||
)
|
)
|
||||||
: null,
|
: const BoxConstraints.expand(),
|
||||||
child: MxcImage(
|
child: MxcImage(
|
||||||
event: event,
|
event: event,
|
||||||
width: width,
|
width: width,
|
||||||
|
|
Loading…
Reference in a new issue