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

ImageCraft aims to simplify image handling in Flutter applications while providing robust caching mechanisms.

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
          ),
        ),
      ),
    );
  }
}
16
likes
140
points
90
downloads

Publisher

unverified uploader

Weekly Downloads

ImageCraft aims to simplify image handling in Flutter applications while providing robust caching mechanisms.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

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

More

Packages that depend on image_craft