TUIImage constructor

const TUIImage({
  1. Key? key,
  2. String? imageUrl,
  3. String? assetPath,
  4. double? width,
  5. double? height,
  6. BoxFit? fit,
})

Implementation

const TUIImage({
  super.key,
  String? imageUrl,
  String? assetPath,
  double? width,
  double? height,
  BoxFit? fit,
})  : _assetPath = assetPath,
      _imageUrl = imageUrl,
      _width = width,
      _height = height,
      _fit = fit,
      assert(
        imageUrl != null || assetPath != null,
        'imageUrl or assetPath must be provided.',
      );