Skip to content

A group of widgets, methods and extension to improve your coding experience

License

Notifications You must be signed in to change notification settings

alejandrogiubel/power_ups

Repository files navigation

Codacy Badge

A group of widgets, methods and extension to improve your coding experience. Some features were taken from this great repository of flutter and dart tricks: flutter-tips-and-tricks.

Other features were obtained from stack overflow and others blogs 😅. Thanks to all of them.

Features

  • Animations

    • Reveal animation
    • Shake animation
  • Extensions

    • Duration
    • Iterable
    • String
    • Widget

Installation

Just add this to your pubspec.yaml:

  dependencies:
    power_ups: ^0.1.1

Or

  dependencies:
    power_ups:
      git: https://github.com/alejandrogiubel/power_ups.git

Usage

  • Reveal animation
widget.withRevealAnimation
  • Delayed reveal animation
widget.withDelayedRevealAnimation(const Duration(microseconds: 200))
  • Shake animation
late AnimationController animationController;

widget.withShakeAnimation(
  (controller) {
    animationController = controller;
  },
  animationWidth: 5, //Horizontal size of the animation. Optional. Default 10.
  animationDuration: Duration(milliseconds: 100) //Animation duration. Optional. Default 370 milliseconds.
),

ElevatedButton(
  onPressed: () {
    animationController.forward(from: 0.0);
  },
  child: Text('Do shake'),
),
  • Map with index
List list = ['apple', 'banana', 'mango'];
list.mapWithIndex(
  (index, value) {
    print(index);
    print(value);
  },
);
  • String utils
String name = 'john doe';
name.inCapFirst; // John doe
name.allInCaps; //JOHN DOE
name.capitalizeFirstOfEach; // John Doe
  • Duration to text
Duration duration = const Duration(seconds: 3);
print(duration.toText()); // 00:03

Additional information

PR are welcome

About

A group of widgets, methods and extension to improve your coding experience

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published