protonimage 1.1.2 copy "protonimage: ^1.1.2" to clipboard
protonimage: ^1.1.2 copied to clipboard

Flutter package for smooth image loading, featuring shimmer and fade-in effects, ensuring a seamless user experience.

example/protonimage_example.dart

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final imageUrl =
        'https://cdn.dribbble.com/users/730703/screenshots/17515984/media/4dd92322fb915b00e6a0f0f3b1d4bf6c.jpg';

    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Proton Image Example',
      home: Scaffold(
        appBar: AppBar(
          title: Text('Proton Image Example'),
        ),
        body: SafeArea(
          child: SingleChildScrollView(
            child: Center(
              child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  // Quick Use
                  ProtonImage(
                    path: imageUrl,
                    height: 200,
                    radius: 20,
                  ),
                  SizedBox(height: 20),

                  //Advance Use
                  ProtonImage(
                    path: imageUrl,
                    height: 200,
                    radius: 20,
                    aspectRatio: 16 / 9,
                    baseColor: Colors.blue.withOpacity(0.3),
                    highlightColor: Colors.blue.withOpacity(0.6),
                  ),
                  SizedBox(height: 20),

                  //Image Overlay
                  ProtonImage(
                    path: imageUrl,
                    height: 200,
                    radius: 20,
                    aspectRatio: 16 / 9,
                    baseColor: Colors.blue.withOpacity(0.3),
                    highlightColor: Colors.blue.withOpacity(0.6),
                    overlayGradient: LinearGradient(
                      begin: Alignment.bottomRight,
                      stops: const [0.1, 0.8],
                      colors: [
                        Colors.black45.withOpacity(.1),
                        Colors.black45.withOpacity(.0),
                      ],
                    ),
                  ),
                  SizedBox(height: 20),

                  //Transparent
                  ProtonImage(
                    path: imageUrl,
                    height: 200,
                    radius: 20,
                    backgroundColor: Colors.transparent,
                  ),
                  SizedBox(height: 20),
                ],
              ),
            ),
          ),
        ),
      ),
    );
  }
}
3
likes
140
pub points
30%
popularity

Publisher

verified publishernben.com.np

Flutter package for smooth image loading, featuring shimmer and fade-in effects, ensuring a seamless user experience.

Homepage

Topics

#image #shimmer #placeholder #loading #preloading

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, shimmer

More

Packages that depend on protonimage