项目作者: theiskaa

项目描述 :
Instagram post style button/card made for flutter
高级语言: Dart
项目地址: git://github.com/theiskaa/insta-like-button.git
创建时间: 2021-04-09T10:46:33Z
项目社区:https://github.com/theiskaa/insta-like-button

开源协议:MIT License

下载


Insta Like Button


License: MIT


License: MIT


Installing

Depend on it

Add this to your package’s pubspec.yaml file:

  1. dependencies:
  2. insta_like_button: ^0.1.1

Install it

You can install packages from the command line:

  1. $ flutter pub get
  2. ...

Import it

Now in your Dart code, you can use:

  1. import 'package:insta_like_button/insta_like_button.dart';

Usage & Overview

With required parameters.

  1. InstaLikeButton(
  2. image: AssetImage("example/overview/img.jpg"),
  3. onChanged: () {
  4. // Do something...
  5. },
  6. ),

With all parameters (Customized InstaLikeButton).

```dart
InstaLikeButton(
image: NetworkImage(“https://picsum.photos/200/300“),
onChanged: () {
// Do something…
},
icon: Icons.favoriteborder,
iconSize: 80,
iconColor: Colors.red,
curve: Curves.fastLinearToSlowEaseIn,
height: 200,
width: MediaQuery.of(context).size.width - 20,
duration: const Duration(seconds: 1),
onImageError: (e,
) {
// Do something…
},
imageAlignment: Alignment.topLeft,
imageBoxfit: BoxFit.fill,
imageScale: 2.0,
imageColorFilter: ColorFilter.mode(
Colors.black.withOpacity(0.5),
BlendMode.dstATop,
),
),