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.
Here is an quick overview over all extensions, helper classes and widgets:
- Extensions on
String
andString?
- Extensions on
DateTime
- Extensions on
List<DateTime>
- Extensions on
BuildContext
(Adaptive helpers) - Extensions on
BuildContext
(Navigation helpers) - Extensions on
List?
- Extensions on
List
Date
helper classDeviceType
helper classInsets
helper class- Flutter Widgets
All features with links to their page in the documentation are listed below:
-
Note: All getters also do a null check if used on
String?
.- Whether the string contains characters except of whitespace characters.
- Whether the string is either empty or solely made of whitespace characters.
- Whether the string is a valid email.
- Whether the string is a valid url.
- Whether the string is a valid easy password.
- Whether the string is a valid medium password.
- Whether the string is a valid strong password.
-
Returns null if the string
isBlank
or it's text if itisNotBlank
.
-
- Returns a copy with the overridden (given) attributes.
- Returns a String which represents the date formatted by the given pattern.
- Whether the date is today.
- Whether the date is yesterday.
- Whether the date is tomorrow.
- Whether the date is a day in the future.
- Whether the date is on the same day (regardless of the time) as the given date.
- Whether the time of the date is zero/empty.
- Returns a copy with time set to zero/empty.
-
- Whether the list contains the given date (regardless of the time).
- Returns the index of the given date (regardless of the time).
-
-
The
MediaQueryData
from the closest instance of this class that encloses the given context. - The horizontal extent of the screen size.
- The vertical extent of the screen size.
- The lesser of the magnitudes of the screen width and height.
- The greater of the magnitudes of the screen width and height.
- Whether the device is in landscape mode.
- Whether the device is in portrait mode.
- Returns the correct FormFactor based on the FormFactorBreakpoints.
- Returns the correct ScreenSize based on the FormFactorBreakpoints.
-
The
-
- Push the given page onto the navigator.
- Push the given route onto the navigator.
- Pop the top-most route off the navigator and dismiss the keyboard.
- Whether the navigator can be popped.
- Dismisses the keyboard (by removing the focus on this node by moving the primary focus to another node).
-
- Whether the list is not empty nor null.
- Whether the list is empty or null.
-
- Returns either the first element of the list which satisfies the provided test or null if there is none.
-
-
DateTime.now()
without time (time set to zero). -
The
DateTime
of tomorrow (without time (time set to zero)). -
The
DateTime
of yesterday (without time (time set to zero)).
-
-
With the help of this class you can easily find out on which platform the app is currently running and most importantly: in a web-safe way! It uses the awesome universal_platform package.
- Whether the app is running on iOS.
- Whether the app is running on android.
- Whether the app is running on macOS.
- Whether the app is running on linux.
- Whether the app is running on windows.
- Whether the app is running on the web.
- Whether the app is running on desktop (windows, macOS or linux).
- Whether the app is running on mobile (android or iOS).
- Whether the app is running on desktop or web.
- Whether the app is running on mobile or web.
-
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.
- An extra extra small inset of 2.0.
- An extra small inset of 4.0.
- A small inset of 6.0.
- A medium inset of 8.0.
- A large inset of 10.0.
- An extra large inset of 12.0.
- An extra extra large inset of 16.0.
- Improve README
- Document the complete code
- Create example app
- Add automatic GitHub test workflow
- Add more tests (feel free to contribute ;))
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 or write an email to info@jensbecker.dev.