https://github.com/rahiche/flutter_x
Use the Power of Dart extensions to build Flutter widgets.
https://github.com/rahiche/flutter_x
Last synced: over 1 year ago
JSON representation
Use the Power of Dart extensions to build Flutter widgets.
- Host: GitHub
- URL: https://github.com/rahiche/flutter_x
- Owner: Rahiche
- License: other
- Created: 2019-10-18T13:59:18.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-03-17T03:49:26.000Z (over 6 years ago)
- Last Synced: 2025-03-24T08:47:19.730Z (over 1 year ago)
- Language: Dart
- Homepage:
- Size: 69.3 KB
- Stars: 21
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# flutter_x
Use the Power of Dart extensions to build Flutter widgets. most of these extension are just wrapping your widget with another one so instead of trying to compose widgets to add new functionality try to extend it.
### This Project is POC
I am ready to change any API if I find something better
Also I don't agree 100% with the conventions used here
So any contribution is welcome
### The Goal
The goal of this library is not to replace the current widgets comopsiting system. but it can be a good way to protopye your ideas faster.
### Installation
```yaml
dependencies:
flutter:
sdk: flutter
flutter_x:
git: https://github.com/Rahiche/flutter_x
```
### Sample
```dart
@override
Widget build(BuildContext context) {
return Stack(
children: [
10.hWidgets(Text("Hi ")),
// Row(
// children: [
// for (int i = 0; i < this.toInt(); i++) child,
// ],
// )
Colors.green.toWidget(100,100),
// Container(color: Colors.green, width: 100, height: 100)
["Hello ", "Hi ", "Hola "].toRow().toScrollable(),
// SingleChildScrollView(
// child: Row(
// children: ["Hello ", "Hi ", "Hola "]
// .map((value) => Text(value))
// .toList()),
// scrollDirection: (this is Row) ? Axis.horizontal : Axis.vertical,
// )
Colors.red.toWidget(100, 100).rotate().slide().scale()
// TODO: I m just lazy to write all of it so now i remember why i created this lib
],
);
}
```