Useful and easy to use extensions, helper classes and widgets to create Flutter apps easier.
BSD-3-CLAUSE License
Fleasy helps create Flutter apps easier by providing useful and easy to use extensions, helper classes and widgets.
The goal is that by using this package you have to write less (repeating) and more clean and readable code.
String
and String?
BuildContext
(Adaptive helpers)BuildContext
(Theme helpers)BuildContext
(Navigation helpers)BuildContext
(Flashbars)List?
List
DateTime
Date
helper classInsets
helper classAll features with links to their page in the documentation:
String
and String?
:Note: All getters also do a null check if used on String?
.
isBlank
or it's text if it isNotBlank
.BuildContext
(Adaptive helpers):MediaQueryData.size
from the nearest MediaQuery
ancestor.MediaQueryData.orientation
from the nearest MediaQuery
ancestor.int columns = context.byFormFactor<int>(onMobile: 1, onTablet: 2, onDesktop: 4);
BuildContext
(Theme helpers):BuildContext
(Navigation helpers):BuildContext
(Flashbars):The extensions use the awesome flash package:
List?
:List
:DateTime
:Date
helper class:DateTime.now()
without time (time set to zero).DateTime
of tomorrow (without time (time set to zero)).DateTime
of yesterday (without time (time set to zero)).Insets
helper class:A single source of truth for styling values like padding, spacing, corner shape, font sizes, and so on. These constants can then be used in place of hard-coded numeric values.
SizedBox
for making consistent gaps. Example: Instead of SizedBox(width: 4.0)
you can just write Gap.w4()
.FutureBuilder
which makes it easy to display the various states of fetching data from the given Future
. See example.StreamBuilder
which makes it easy to display the various states of streaming data from the given Stream
. See example.You can use the same analysis options which this package uses by simply including them in your analysis_options.yaml
file:
include: package:fleasy/analysis_options.yaml
They are based on:
For more details, have a look at the analysis_options.yaml
file here.
This package is still in early stages. If you notice any bugs not present in issues, please file a new issue. If you are willing to fix or enhance things yourself, you are very welcome to make a pull request.
Also: Feedback and suggestions are very welcome. Just open an issue.