moorle / flutter_imagebutton

Image button for flutter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ImageButton

Button composed of two images.

About

ImageButton is simple plugin that allows you to use your images as simple buttons with two different faces (pressed / unpressed).

How To Use ImageButton

Widget build(BuildContext context) {
    return ImageButton(
        children: <Widget>[],
        width: 91,
        height: 36,
        paddingTop: 5,
        pressedImage: Image.asset(
          "assets/pressed.png",
        ),
        unpressedImage: Image.asset("assets/normal.png"),
        onTap: () {
          print('test');
        },
    );
}

ImageButton Properties

property description
children
unpressedImage
pressedImage
label
onTap
width
height
paddingTop
mainAxisAlignment
crossAxisAlignment

About

Image button for flutter

License:Apache License 2.0


Languages

Language:Dart 74.0%Language:Swift 10.4%Language:Ruby 7.4%Language:Objective-C 4.2%Language:Kotlin 3.9%