flutter_helper_kit_utils library

Utils, formatters, reactive helpers, and typedefs for flutter_helper_kit.

import 'package:flutter_helper_kit/flutter_helper_kit_utils.dart';

Classes

CallbackMapInfoWindowAdapter
Wires MapCustomInfoWindow to any map SDK via callbacks (no extra dependencies).
HiMessages
LookupMessages
MapCustomInfoWindow
MapCustomInfoWindowController
Controller to add, update and control the custom info window.
MapInfoWindowAdapter
Adapter for map controllers (e.g. Google Maps) without package dependencies.
MapLatLng
Simple latitude/longitude pair for map overlays.
MapScreenCoordinate
Screen coordinate returned by MapInfoWindowAdapter.getScreenCoordinate.
NoLeadingSpaceFormatter
A text input formatter that prevents users from starting the text with a space.
NoSpaceFormatter
user can't use space
Numeral
A utility class for formatting numbers in either Indian or International numeral systems.
PrintfConfig
Global behaviour for printf helpers.
PrintfStyle
ANSI styling for printf output.
RandomImage
RandomPicsumImage
RegExpPatterns
Predefined Patterns for different validation
RxDateTime
Lightweight reactive wrapper for DateTime without external state libraries.
RxnDateTime
Nullable reactive DateTime.
SystemUiUtils
Utility class to manage system UI (status bar, nav bar) appearance globally.
Validator

Enums

ImageBg
ImageColor
ImageSet
ImageType
PrintfLevel
Log severity used by printf and shortcuts like printfError.

Constants

whiteColor → const Color

Properties

defaultBlurRadius double
getter/setter pair
defaultRadius double
returns default InputDecoration for AppTextField widget
getter/setter pair
defaultSpreadRadius double
getter/setter pair
shadowColorGlobal Color
getter/setter pair

Functions

boxDecorationDefault({BorderRadiusGeometry? borderRadius, Color? color, Gradient? gradient, BoxBorder? border, BoxShape? shape, BlendMode? backgroundBlendMode, List<BoxShadow>? boxShadow, DecorationImage? image}) Decoration
boxDecorationRoundedWithShadow(int radiusAll, {Color backgroundColor = whiteColor, Color? shadowColor, double? blurRadius, double? spreadRadius, Offset offset = const Offset(0.0, 0.0), LinearGradient? gradient}) Decoration
rounded box decoration with shadow
boxDecorationWithRoundedCorners({Color backgroundColor = whiteColor, BorderRadius? borderRadius, LinearGradient? gradient, BoxBorder? border, List<BoxShadow>? boxShadow, DecorationImage? decorationImage, BoxShape boxShape = BoxShape.rectangle}) Decoration
rounded box decoration
boxDecorationWithShadow({Color backgroundColor = whiteColor, Color? shadowColor, double? blurRadius, double? spreadRadius, Offset offset = const Offset(0.0, 0.0), LinearGradient? gradient, BoxBorder? border, List<BoxShadow>? boxShadow, DecorationImage? decorationImage, BoxShape boxShape = BoxShape.rectangle, BorderRadius? borderRadius}) Decoration
box decoration with shadow
defaultBoxShadow({Color? shadowColor, double? blurRadius, double? spreadRadius, Offset offset = const Offset(0.0, 0.0)}) List<BoxShadow>
default box shadow
defaultInputDecoration({String? hint, String? label, TextStyle? textStyle}) InputDecoration
degreeToRadian(double degree) double
Converts degrees to radians. Returns the equivalent value in radians for the given degree.
dialogShape([double? borderRadius]) ShapeBorder
getBytesFromAsset(String path, {int? width}) Future<Uint8List>
Checks the network connection by attempting to lookup 'google.com'.
hasMatch(String? s, String p) bool
Checks if a string matches a specified pattern.
hideStatusBar() Future<void>
Hides both the status bar and navigation bar, making the app fullscreen.
primaryTextStyle({int? size, Color? color, FontWeight? weight, String? fontFamily, double? letterSpacing, FontStyle? fontStyle, double? wordSpacing, TextDecoration? decoration, TextDecorationStyle? textDecorationStyle, TextBaseline? textBaseline, Color? decorationColor, Color? backgroundColor, double? height}) TextStyle
printf(Object? data, {Object? mapKey, int? listIndex, String? tag, PrintfLevel level = PrintfLevel.debug, Color? foreground, Color? background, bool italic = false, bool bold = false, bool underline = false, bool invert = false, bool strike = false, bool doubleUnderline = false, bool framed = false, bool? timestamp, bool? showFile, PrintfStyle? style, String? name, int stackTraceIndex = 1}) → void
Prints data to the console with optional ANSI styling, tags, and metadata.
printfBox(String title, Object? message, {PrintfLevel level = PrintfLevel.info, String? tag}) → void
Prints a titled box around message.
printfCallerLinkFromStackTrace(String stackTraceText) String?
Resolves a clickable caller link from a StackTrace string (for tests).
printfDebug(Object? data, {String? tag, PrintfStyle? style}) → void
printfError(Object? data, {String? tag, Object? error, StackTrace? stackTrace, PrintfStyle? style}) → void
printfInfo(Object? data, {String? tag, PrintfStyle? style}) → void
printfSeparator({Object object = '', int length = 20}) String
Horizontal rule with optional label — useful to group logs.
printfSuccess(Object? data, {String? tag, PrintfStyle? style}) → void
printfTable(Map<String, Object?> rows, {String? title, PrintfLevel level = PrintfLevel.debug, String? tag}) → void
Prints key/value rows in a aligned block.
printfWarn(Object? data, {String? tag, PrintfStyle? style}) → void
printHttpRequest({required String method, required String url, Map<String, Object?>? headers, Object? body, Iterable<String>? files, String? tag = 'HTTP'}) → void
Logs an outgoing HTTP request without coupling to http or dio.
printHttpResponse({required String method, required String url, required int statusCode, bool? success, Object? body, Duration? duration, String? tag = 'HTTP'}) → void
Logs an HTTP response summary.
radius([double? radius]) BorderRadius
returns Radius
radiusCircular([double? radius]) Radius
returns Radius
radiusOnly({double? topRight, double? topLeft, double? bottomRight, double? bottomLeft}) BorderRadius
returns custom Radius on each side
randomString({int? length, bool includeNumeric = true}) String
Generates a random alphanumeric string with a random length between 1 and 64.
setDarkStatusBar() → void
Configures the system UI for a dark-themed status bar and navigation bar.
setLightStatusBar() → void
Configures the system UI for a light-themed status bar and navigation bar.
setOrientationLandscape() → void
Locks the screen orientation to landscape mode.
setOrientationPortrait() → void
Locks the screen orientation to portrait mode.
setStatusBarColor(Color statusBarColor, {Color? systemNavigationBarColor, Brightness? statusBarBrightness, Brightness? statusBarIconBrightness, int delayInMilliSeconds = 200}) Future<void>
Sets the status bar color and optional system navigation bar color.
showDialogWithCloseIcon<T>({required BuildContext context, required Widget title, required Widget content, Widget? closeIcon, VoidCallback? onTapCloseIcon, EdgeInsets? insetPadding, bool barrierDismissible = true, bool useRootNavigator = true, FlutterTagPosition? closeButtonPosition, FlutterTagAnimation? closeButtonAnimation, FlutterTagStyle? closeButtonStyle, Color? backgroundColor, Color? dialogColor, SharpRectangleBorder? shape}) Future<T?>
showStatusBar() Future<void>
Restores the status bar and navigation bar visibility.
timeAgoCalculated(DateTime date, {DateTime? clock, bool allowFromNow = false, bool inHindi = false}) String
Formats provided date to a fuzzy time like 'a moment ago'
wait<T>([int millisecond = 1500, FutureOr<T> value()?]) Future<T?>
Short for Future.delayed.

Typedefs

BoolArgVoidCallback = void Function(bool arg)
Define a function that takes a bool argument and returns void
DoubleArgVoidCallback = void Function(double arg)
Define a function that takes a double argument and returns void
DoubleCallback = double Function()
Define a function that returns a double and takes no arguments
DynamicArgVoidCallback = void Function(dynamic arg)
Define a function that takes a dynamic argument and returns void
DynamicCallback = dynamic Function()
Define a function that returns a dynamic and takes no arguments
FutureDoubleCallback = Future<double> Function()
Define a function that returns a double and takes no arguments
FutureDynamicCallback = Future Function()
Define a function that returns a dynamic and takes no arguments
FutureIntCallback = Future<int> Function()
Define a function that returns a int and takes no arguments
FutureStringCallback = Future<String> Function()
Define a function that returns a String and takes no arguments
FutureVoidCallback = Future<void> Function()
Define a function that returns a void and takes no arguments
IntArgVoidCallback = void Function(int arg)
Define a function that takes an int argument and returns void
IntCallback = int Function()
Define a function that returns an int and takes no arguments
StringArgVoidCallback = void Function(String arg)
Define a function that takes a String argument and returns void
StringCallback = String Function()
Define a function that returns a String and takes no arguments