toggle_icon 0.0.1
SDKflutter
Platformandroidioswindowslinuxmacosweb
toggle_icon is a flutter package which provides us with the functionality to simply implement the toggle icons within a flutter project
toggle_icon is a flutter package which provides us with the functionality to simply implement the toggle icons within a flutter project
Getting started
In the pubspec.yaml of your flutter project, add the following dependency:
dependencies:
...
toggle_icon: ^0.0.1
Import it:
import 'package:toggle_icon/toggle_icon.dart';
Usage
Basic toggle Icon
ToggleIcon(
trueIcon:Icon(Icons.like),
falseIcon:Icon(Icons.like_outlined),
trueFunc:(){
print("Liked the post");
},
falseFunc:(){
print("Unliked the post");
}
)