image_craft 1.0.0 copy "image_craft: ^1.0.0" to clipboard
image_craft: ^1.0.0 copied to clipboard

ImageCraft is a powerful Dart package that simplifies image handling. It supports network images, assets, file, and SVGs, all within a single widget. With built-in caching for network images and pre-c [...]

example/lib/image_craft_example.dart

import 'package:flutter/material.dart';
import 'package:image_craft/image_craft.dart';

void main() {
  runApp(ImageCraftApp());
}

class ImageCraftApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Image Craft Example'),
        ),
        body: Center(
          child: ImageCraft(
            path: 'https://example.com/image.jpg', // Replace with your image URL
            imageType: ImageType.NETWORK,
            fit: BoxFit.cover,
            width: 300.0,
            height: 300.0,
            placeholder: CircularProgressIndicator(), // Placeholder while loading
            errorWidget: ErrorPlaceholder(), // Widget to display on error
            preCacheAssets: true, // Option to pre-cache assets if necessary
          ),
        ),
      ),
    );
  }
}
17
likes
0
points
14
downloads

Publisher

unverified uploader

Weekly Downloads

ImageCraft is a powerful Dart package that simplifies image handling. It supports network images, assets, file, and SVGs, all within a single widget. With built-in caching for network images and pre-caching for assets, it ensures efficient and smooth image loading. Ideal for developers seeking advanced, unified image management in their apps.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

cupertino_icons, flutter, flutter_svg, http, mockito, path, path_provider

More

Packages that depend on image_craft