holdnload 0.0.2 copy "holdnload: ^0.0.2" to clipboard
holdnload: ^0.0.2 copied to clipboard

This package was created to show the animated button for story and reels.

Flutter version 3.1.0 #

Description #

The idea of this package is to create holding animated buttons like Snapchat and Instagram shows while recording reels or stories.

Getting started #

Wrap HoldAndLoad Widget with Scaffold

 HoldAndLoad(
child:Text('hold'),
controller: ShootingController(ShootingValue(false, false)),
isShootingButtonAnimate: false,
style: HoldNLoadStyle,
callBackShootingEnd: callBackEnd,
callBackShootingStart: callBackStart,
listener:listener,
);

HoldAndLoad Style #

Style can be with gradient or background


with gradient

Style.withGradientColor(
outerSize: const Size.square(115),
innerSize: const Size.square(82),
outerColor: Colors.white,
progressColor: Colors.redAccent,
gradient: const LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [
Color(0xFF00AACE),
Color(0xFF006BCE),
],
),
progressWidth: 3,
outerWidth: 4)


with background

Style.withBackgroundColor(
outerSize: const Size.square(115),
innerSize: const Size.square(82),
outerColor: Colors.white,
progressColor: Colors.redAccent,
backgroundColor: const Color(0xFF00AACE),
progressWidth: 3,
outerWidth: 4)

CallBack #

callBackShootingStart: #

callBackShootingStart will get triggered as soon as the HoldAndLoad longPress gesture detcted, it will only triggered one time.

callBackShootingEnd: #

callBackShootingEnd will get triggered as soon as the HoldAndLoad longPress released, it will only triggered one time.

listener: #

listener will get triggered from the start of callBackShootingStart till callBackShootingEnd triggered.

DEMO #

https://user-images.githubusercontent.com/18635520/188449124-0863c9be-1701-4004-9699-940159773b3e.mov

1 2 3

6
likes
130
points
33
downloads

Publisher

unverified uploader

Weekly Downloads

This package was created to show the animated button for story and reels.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on holdnload