INNER CODE UNIT · Dart

FancyImage

xsahil03x/fancy_on_boarding · lib/src/fancy_image.dart:4

class FancyImage extends StatelessWidget {
  const FancyImage({
    Key? key,
    required this.image,
    this.width = 24,
    this.height = 24,
    this.color = Colors.white,
  }) : super(key: key);

  final String image;
  final double width;
  final double height;
  final Color? color;

  bool get isUrl => Uri.parse(image).isAbsolute;

  bool get isSvg => image.toLowerCase().endsWith('.svg');

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…