asset_button 1.1.0
asset_button: ^1.1.0 copied to clipboard

image button library,include imagebutton & image loader & asset image,etc

image_button #

image button utilities.

Image button needs two asset image: one is normal(neccesary) , one is hover(not neccesary).

Normal image is for normal displaying, hover image is shown when mouse hover the button area.

When taping the button, shrink animation plays.


e.g. demo app


use independent image

WidgetImageButton(
  imageNormal:
      WidgetAssetImage(assetPath: 'assets/images/icon_normal.png'),
  imageHover:
      WidgetAssetImage(assetPath: 'assets/images/icon_hover.png'),
  onTap: () {
    print('independent icon image button');
  },
),

crop image from one whole image

WidgetImageButton(
  imageNormal: WidgetAssetImage(
      assetPath: 'assets/images/icons.png',
      cropRect: Rect.fromLTWH(58, 165, 95, 95)),
  imageHover: WidgetAssetImage(
      assetPath: 'assets/images/icons.png',
      cropRect: Rect.fromLTWH(170, 164, 95, 95)),
  onTap: () {
    print('image button icon crop from one image');
  },
)

resource:

resourceimage
icon hovericon hover
icon normalicon normal
one whole imageone whole image
backgroundbackground
2
likes
130
pub points
41%
popularity

Publisher

Unknown

image button library,include imagebutton & image loader & asset image,etc

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

LICENSE

Dependencies

flutter, image, path

More

Packages that depend on asset_button