Skip to content

Commit

Permalink
refactor!: Migrate to Dart 3 (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Borries authored Nov 2, 2023
1 parent 2b06c51 commit b14122e
Show file tree
Hide file tree
Showing 8 changed files with 291 additions and 430 deletions.
13 changes: 5 additions & 8 deletions packages/apptive_grid_heinzelmen/lib/src/attachment_image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,11 @@ class AttachmentImage extends StatelessWidget {
loadingWidget: largeThumbnail,
);

switch (loadUntil) {
case LoadUntil.full:
return fullImage;
case LoadUntil.large:
return largeThumbnail ?? fullImage;
case LoadUntil.small:
return smallThumbnail ?? largeThumbnail ?? fullImage;
}
return switch (loadUntil) {
LoadUntil.full => fullImage,
LoadUntil.large => largeThumbnail ?? fullImage,
LoadUntil.small => smallThumbnail ?? largeThumbnail ?? fullImage
};
}
}

Expand Down
Loading

0 comments on commit b14122e

Please sign in to comment.