Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aldrinmathew/nebula.dart
Nebula makes your Flutter development journey easier by providing helper widgets, utilities and abstractions.
https://github.com/aldrinmathew/nebula.dart
dart dartlang flutter flutter-ui widgets
Last synced: 30 days ago
JSON representation
Nebula makes your Flutter development journey easier by providing helper widgets, utilities and abstractions.
- Host: GitHub
- URL: https://github.com/aldrinmathew/nebula.dart
- Owner: aldrinmathew
- License: other
- Created: 2022-03-06T16:03:55.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-27T10:10:43.000Z (over 2 years ago)
- Last Synced: 2024-11-24T18:17:20.736Z (about 1 month ago)
- Topics: dart, dartlang, flutter, flutter-ui, widgets
- Language: Dart
- Homepage: https://pub.dev/packages/nebula
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
## **`nebula`**
Makes your Flutter development journey easier by providing helper widgets, utilities and abstractions.
### **`Dimension`** widget
Get the dimensions (height and width) associated to a context, instead of doing `MediaQuery` each and every time.
```dart
Dimension(
/// You can omit the context, in which case the
/// widget will use its own context
context: context,
builder: (h, w) {
return Row(
children: [
SizedBox(
height: h * 0.3,
width: w * 0.3,
child: Center(child: Text('A')),
),
SizedBox(
height: h * 0.3,
width: w * 0.5,
child: Center(child: Text('B')),
),
SizedBox(
height: h * 0.3,
width: w * 0.2,
child: Center(child: Text('C')),
),
],
);
},
)
```The `context` argument is nullable, so if you skip it, the the Dimension widget will use its own context to get the height and width
### **`FitSize`** widget
This widget will fit your widget in the provided dimensions. The widget is wrapped in a FittedBox and a SizedBox with the provided arguments passed over. You can use this like `SizedBox`, just that the contents will be fitted in the dimensions provided
```dart
FitSize(
height: 250,
alignment: Alignment.topRight,
fit: BoxFit.fitWidth,
clipBehavior: Clip.none,
child: Text('This is my FitSize'),
),
```