mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-10 05:45:10 +00:00
chore: Follow up imagebubble borderradius
This commit is contained in:
parent
0aaee82ec7
commit
cdc844a4c0
3 changed files with 10 additions and 2 deletions
|
@ -18,6 +18,7 @@ class ImageBubble extends StatelessWidget {
|
||||||
final double width;
|
final double width;
|
||||||
final double height;
|
final double height;
|
||||||
final void Function()? onTap;
|
final void Function()? onTap;
|
||||||
|
final BorderRadius? borderRadius;
|
||||||
|
|
||||||
const ImageBubble(
|
const ImageBubble(
|
||||||
this.event, {
|
this.event, {
|
||||||
|
@ -30,6 +31,7 @@ class ImageBubble extends StatelessWidget {
|
||||||
this.height = 300,
|
this.height = 300,
|
||||||
this.animated = false,
|
this.animated = false,
|
||||||
this.onTap,
|
this.onTap,
|
||||||
|
this.borderRadius,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -80,14 +82,16 @@ class ImageBubble extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final borderRadius =
|
||||||
|
this.borderRadius ?? BorderRadius.circular(AppConfig.borderRadius);
|
||||||
return Material(
|
return Material(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
|
borderRadius: borderRadius,
|
||||||
side: BorderSide(color: Theme.of(context).dividerColor),
|
side: BorderSide(color: Theme.of(context).dividerColor),
|
||||||
),
|
),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () => _onTap(context),
|
onTap: () => _onTap(context),
|
||||||
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
|
borderRadius: borderRadius,
|
||||||
child: Hero(
|
child: Hero(
|
||||||
tag: event.eventId,
|
tag: event.eventId,
|
||||||
child: ConstrainedBox(
|
child: ConstrainedBox(
|
||||||
|
|
|
@ -242,6 +242,7 @@ class Message extends StatelessWidget {
|
||||||
displayEvent,
|
displayEvent,
|
||||||
textColor: textColor,
|
textColor: textColor,
|
||||||
onInfoTab: onInfoTab,
|
onInfoTab: onInfoTab,
|
||||||
|
borderRadius: borderRadius,
|
||||||
),
|
),
|
||||||
if (event.hasAggregatedEvents(
|
if (event.hasAggregatedEvents(
|
||||||
timeline,
|
timeline,
|
||||||
|
|
|
@ -26,12 +26,14 @@ class MessageContent extends StatelessWidget {
|
||||||
final Event event;
|
final Event event;
|
||||||
final Color textColor;
|
final Color textColor;
|
||||||
final void Function(Event)? onInfoTab;
|
final void Function(Event)? onInfoTab;
|
||||||
|
final BorderRadius borderRadius;
|
||||||
|
|
||||||
const MessageContent(
|
const MessageContent(
|
||||||
this.event, {
|
this.event, {
|
||||||
this.onInfoTab,
|
this.onInfoTab,
|
||||||
super.key,
|
super.key,
|
||||||
required this.textColor,
|
required this.textColor,
|
||||||
|
required this.borderRadius,
|
||||||
});
|
});
|
||||||
|
|
||||||
void _verifyOrRequestKey(BuildContext context) async {
|
void _verifyOrRequestKey(BuildContext context) async {
|
||||||
|
@ -111,6 +113,7 @@ class MessageContent extends StatelessWidget {
|
||||||
width: 400,
|
width: 400,
|
||||||
height: 300,
|
height: 300,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
|
borderRadius: borderRadius,
|
||||||
);
|
);
|
||||||
case MessageTypes.Sticker:
|
case MessageTypes.Sticker:
|
||||||
if (event.redacted) continue textmessage;
|
if (event.redacted) continue textmessage;
|
||||||
|
|
Loading…
Reference in a new issue