Skip to content

Commit f950f0c

Browse files
committed
image [nfc]: Rename ImageanimationMode.resolve to shouldAnimate
As suggested by Greg: #1987 (comment)
1 parent ac55b0e commit f950f0c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/widgets/emoji.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ class ImageEmojiWidget extends StatelessWidget {
214214
Widget build(BuildContext context) {
215215
final size = textScaler.scale(this.size);
216216

217-
final resolvedUrl = animationMode.resolve(context)
217+
final resolvedUrl = animationMode.shouldAnimate(context)
218218
? emojiDisplay.resolvedUrl
219219
: (emojiDisplay.resolvedStillUrl ?? emojiDisplay.resolvedUrl);
220220

lib/widgets/image.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class RealmContentNetworkImage extends StatelessWidget {
111111

112112
/// Whether to show an animated image in its still or animated version.
113113
///
114-
/// Use [resolve] to evaluate this for the given [BuildContext],
114+
/// Use [shouldAnimate] to evaluate this for the given [BuildContext],
115115
/// which reads device-setting data for [animateConditionally].
116116
enum ImageAnimationMode {
117117
/// Always show the animated version.
@@ -126,7 +126,7 @@ enum ImageAnimationMode {
126126
;
127127

128128
/// True if the image should be animated, false if it should be still.
129-
bool resolve(BuildContext context) {
129+
bool shouldAnimate(BuildContext context) {
130130
switch (this) {
131131
case animateAlways: return true;
132132
case animateNever: return false;

0 commit comments

Comments
 (0)