ripple_image_button 1.1.3 copy "ripple_image_button: ^1.1.3" to clipboard
ripple_image_button: ^1.1.3 copied to clipboard

RippleImageButton has ripple effect on click. Image widget can not ripple effect on wrapped InkWell Widget. so I tried to Container Widget and could be have ripple effect on click

example/lib/main.dart

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

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

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        primaryColor: Colors.purple.shade500,
        useMaterial3: true,
      ),
      home: Scaffold(
        backgroundColor: Theme.of(context).primaryColor,
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              SizedBox(
                width: 200,
                height: 50,
                child: RippleImageButton(
                  image: const AssetImage('images/google_sign_image.png'), // or NetworkImage
                  onTap: () {},
                  width: 50,
                  height: 100,
                ),
              ),

              const SizedBox(height: 18,),

              RippleImageButton(
                image: const AssetImage('images/google_sign_image.png'),
                onTap: () {},
                splashColor: Colors.red.withOpacity(0.5),
              ),

              const SizedBox(height: 18),

              RippleImageButton(
                image: const AssetImage('images/google_sign_image.png'),
                onTap: () {},
                width: 200,
                height: 50,
                borderRadius: 30,
              )
            ],
          ),
        ),
      ),
    );
  }
}
2
likes
160
pub points
33%
popularity

Publisher

unverified uploader

RippleImageButton has ripple effect on click. Image widget can not ripple effect on wrapped InkWell Widget. so I tried to Container Widget and could be have ripple effect on click

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on ripple_image_button