universal_images_plus 0.0.1 copy "universal_images_plus: ^0.0.1" to clipboard
universal_images_plus: ^0.0.1 copied to clipboard

A Flutter package that provides a universal image widget supporting network, asset, SVG, and fallback images with customizable shapes and placeholders.

example/lib/main.dart

import 'package:example/universal_images.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text("Universal Images Example")),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              const UniversalImage(
                imagePath: 'https://fastly.picsum.photos/id/235/200/200.jpg?hmac=YnNmt_uSm-7R-s3j5I_di0aCpJqnfzRzeAzZCV-SS4w',
                height: 100,
                width: 100,
                isCircular: true,
              ),
              const SizedBox(height: 20),
              const UniversalImage(
                imagePath: 'assets/images/local_image.png',
                height: 80,
                width: 80,
              ),
              const SizedBox(height: 20),
              const UniversalImage(
                imagePath: 'assets/images/local_image.png',
                height: 60,
                width: 60,
                borderRadius: 0,
              ),
              const SizedBox(height: 20),
              const UniversalImage(
                imagePath:
                'data:image/png;base64,iVBORw0K...', // Base64
                height: 50,
                width: 50,
              ),
            ],
          ),
        ),
      ),
    );
  }
}
16
likes
140
points
10
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package that provides a universal image widget supporting network, asset, SVG, and fallback images with customizable shapes and placeholders.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

cached_network_image, flutter, flutter_svg

More

Packages that depend on universal_images_plus