BsImage.asset constructor

BsImage.asset(
  1. String name, {
  2. Key? key,
  3. bool fluid = false,
  4. bool thumbnail = false,
  5. bool rounded = false,
  6. bool circle = false,
  7. AlignmentGeometry? alignment,
  8. double? width,
  9. double? height,
  10. BoxFit? fit,
  11. String? semanticLabel,
  12. AssetBundle? bundle,
  13. String? package,
})

Creates a BsImage from an asset.

Implementation

factory BsImage.asset(
  String name, {
  Key? key,
  bool fluid = false,
  bool thumbnail = false,
  bool rounded = false,
  bool circle = false,
  AlignmentGeometry? alignment,
  double? width,
  double? height,
  BoxFit? fit,
  String? semanticLabel,
  AssetBundle? bundle,
  String? package,
}) {
  return BsImage(
    key: key,
    image: AssetImage(name, bundle: bundle, package: package),
    fluid: fluid,
    thumbnail: thumbnail,
    rounded: rounded,
    circle: circle,
    alignment: alignment,
    width: width,
    height: height,
    fit: fit,
    semanticLabel: semanticLabel,
  );
}