flutter_utils
library
Functions
-
checkQueryParams(BuildContext context, Iterable<String> params)
→ bool
-
-
colorFromString(String? colorString)
→ Color?
-
-
colorText([String color = "reset"])
→ String
-
-
constrainedBigWidth(BuildContext context, double preferredWidth, {double? constraintWidth})
→ double
-
Method to get
preferredWidth
constrained, if is smaller than default width, will return constraintWidth
if not null, else return media query.
-
constrainedHeight(BuildContext context, double preferredHeight)
→ double
-
Method to get
preferredHeight
constrained, if is bigger than media query height, will return this.
-
constrainedWidth(BuildContext context, double preferredWidth, {double? constraintWidth, bool? shouldConstraint})
→ double
-
Method to get
preferredWidth
constrained, if is bigger than media query width, will return constraintWidth
if not null, else return media query.
-
dateTimefromMillisecondsNoZero(int? epoch, {bool defaultNow = false})
→ DateTime?
-
-
generateNavRoute(String route, {dynamic queryParams = const {}})
→ String
-
-
getBytesFromNetworkImageUrl(String url)
→ Future<Uint8List?>
-
-
getColorContrast(Color background)
→ Color
-
-
getDurationFromString(String value)
→ Duration
-
-
getQueryParam(BuildContext context, String name)
→ String?
-
-
getRandomColor()
→ Color
-
-
getTimeFormat({bool includeSeconds = false})
→ String
-
-
padLeft2Zero(int n)
→ String
-
-
printError(Object? error)
→ void
-
-
printLog(Object? log)
→ void
-
-
printSuccess(Object? text)
→ void
-
-
printWarning(Object? text)
→ void
-
-
removeDecimalZeroFormat(double n)
→ String
-
-
unfocus(BuildContext context)
→ void
-