Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alejandrogiubel/power_ups
A group of widgets, methods and extension to improve your coding experience
https://github.com/alejandrogiubel/power_ups
dart flutter
Last synced: about 1 month ago
JSON representation
A group of widgets, methods and extension to improve your coding experience
- Host: GitHub
- URL: https://github.com/alejandrogiubel/power_ups
- Owner: alejandrogiubel
- License: bsd-3-clause
- Created: 2022-06-04T16:16:52.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-05T15:19:10.000Z (12 months ago)
- Last Synced: 2024-11-11T21:40:46.112Z (2 months ago)
- Topics: dart, flutter
- Language: Dart
- Homepage:
- Size: 81.1 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/b3aa388977054e389067df8116394d99)](https://www.codacy.com/gh/alejandrogiubel/power_ups/dashboard?utm_source=github.com&utm_medium=referral&utm_content=alejandrogiubel/power_ups&utm_campaign=Badge_Grade)
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](https://github.com/vandadnp/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`:```yaml
dependencies:
power_ups: ^0.1.1
```Or
```yaml
dependencies:
power_ups:
git: https://github.com/alejandrogiubel/power_ups.git
```## Usage
* Reveal animation
```dart
widget.withRevealAnimation
```* Delayed reveal animation
```dart
widget.withDelayedRevealAnimation(const Duration(microseconds: 200))
```* Shake animation
```dart
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
```dart
List list = ['apple', 'banana', 'mango'];
list.mapWithIndex(
(index, value) {
print(index);
print(value);
},
);
```* String utils
```dart
String name = 'john doe';
name.inCapFirst; // John doe
name.allInCaps; //JOHN DOE
name.capitalizeFirstOfEach; // John Doe
```* Duration to text
```dart
Duration duration = const Duration(seconds: 3);
print(duration.toText()); // 00:03
```## Additional information
PR are welcome