Refactor: Reduce .of(context) calls theme

Signed commit
This commit is contained in:
Thomas Klein Langenhorst 2024-08-04 14:09:36 +02:00
commit 5d2aaef3ca
No known key found for this signature in database
GPG key ID: CA868C3CB279DA5B
69 changed files with 525 additions and 501 deletions

View file

@ -67,6 +67,8 @@ class ImageBubble extends StatelessWidget {
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final borderRadius =
this.borderRadius ?? BorderRadius.circular(AppConfig.borderRadius);
return Material(
@ -77,7 +79,7 @@ class ImageBubble extends StatelessWidget {
side: BorderSide(
color: event.messageType == MessageTypes.Sticker
? Colors.transparent
: Theme.of(context).dividerColor,
: theme.dividerColor,
),
),
child: InkWell(