calculateBackgroundImageFit method

BoxFit calculateBackgroundImageFit(
  1. String? fillMode
)
inherited

Maps Adaptive Card fillMode to a BoxFit for background images.

Implementation

BoxFit calculateBackgroundImageFit(String? fillMode) {
  final myFillMode = fillMode?.toLowerCase();
  switch (myFillMode) {
    case 'repeatvertically':
    case 'repeathorizontally':
    case 'repeat':
      return BoxFit.none;
    default:
      return BoxFit.cover;
  }
}