slide_countdown 0.0.6-dev.1 slide_countdown: ^0.0.6-dev.1 copied to clipboard
A Flutter package to create easy slide animation countdown / countup timer.
#
A Flutter package to create easy slide animation countdown timer.
Example #
const defaultDuration = Duration(days: 2, hours: 2, minutes: 30);
const defaultPadding = EdgeInsets.symmetric(horizontal: 10, vertical: 5);
class ExampleSlideCountdown extends StatelessWidget {
const ExampleSlideCountdown({Key? key}) : super(key: key);
@override
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("My Space"),
),
body: SizedBox.expand(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Padding(
padding: EdgeInsets.only(top: 20, bottom: 10),
child: Text('Default'),
),
const SlideCountdown(
duration: defaultDuration,
padding: defaultPadding,
),
const Padding(
padding: EdgeInsets.only(top: 20, bottom: 10),
child: Text('Default SlideCountdownSeparated'),
),
const SlideCountdownSeparated(
duration: defaultDuration,
padding: defaultPadding,
),
const Padding(
padding: EdgeInsets.only(top: 20, bottom: 10),
child: Text('With Icon, Fade true, & SlideDirection.up'),
),
const SlideCountdown(
duration: defaultDuration,
padding: defaultPadding,
slideDirection: SlideDirection.up,
fade: true,
icon: Padding(
padding: EdgeInsets.only(right: 5),
child: Icon(
Icons.alarm,
color: Colors.white,
size: 20,
),
),
),
const Padding(
padding: EdgeInsets.only(top: 20, bottom: 10),
child: Text('Custom BoxDecoration & SeparatorType.title'),
),
const SlideCountdown(
duration: defaultDuration,
padding: defaultPadding,
fade: true,
separatorType: SeparatorType.title,
decoration: BoxDecoration(
color: Colors.black,
borderRadius: BorderRadius.all(Radius.circular(5)),
),
),
const Padding(
padding: EdgeInsets.only(top: 20, bottom: 10),
child: Text('Localization Custom Duration Title'),
),
SlideCountdown(
duration: defaultDuration,
padding: defaultPadding,
fade: true,
separatorType: SeparatorType.title,
durationTitle: DurationTitle.id(),
icon: const Padding(
padding: EdgeInsets.only(right: 5),
child: Icon(
Icons.alarm,
color: Colors.white,
size: 20,
),
),
decoration: const BoxDecoration(
color: Colors.black,
borderRadius: BorderRadius.all(Radius.circular(5)),
),
),
],
),
),
);
}
}
Output #
🚧 Maintener #
Farhan Fadila
📫 How to reach me: farhan.fadila1717@gmail.com