Misc class
Static Methods
afterFirstLayout (VoidCallback callback )
→ void
DO THAT:
beetweenCharacterPattern ([String character = "*" ])
→ RegExp
colorFromHex (String hex )
→ Color
degreesToRadians (double degrees )
→ double
delayed (int milliseconds , VoidCallback callback )
→ Future <void >
DO THAT:
detectListDifferences <T > ({List <T > initialValues = const [] , List <T > currentValues = const [] , bool containsValidator (List <T > , T )? })
→ ListDifference <T >
dismissKeyboard (BuildContext context )
→ void
DO THAT:
dynamicMapToModel <T > (dynamic value , T f (Map <String , dynamic > e ) )
→ T?
dynamicToBool (dynamic value )
→ bool ?
dynamicToDateTime (dynamic value )
→ DateTime ?
dynamicToDouble (dynamic value )
→ double ?
dynamicToInt (dynamic value )
→ int ?
dynamicToList <T > (dynamic list , T f (dynamic e ) )
→ List <T >
dynamicToListEnum <T > (dynamic list , List <T > values )
→ List <T >
dynamicToListMap <T > (dynamic list , T f (Map <String , dynamic > e ) )
→ List <T >
dynamicToMap <K , V > (dynamic value )
→ Map <K , V > ?
dynamicToMapStringDynamic (dynamic value )
→ Map <String , dynamic > ?
dynamicToString (dynamic value )
→ String ?
getFunctionReturnType (dynamic function )
→ String
hasMapDifference <K , V > (Map <K , V > initialMap , Map <K , V > currentMap , {List <K > keys = const [] })
→ bool
isBase64 (String text )
→ bool
isEmail (String text )
→ bool
isNumericOnly (String text )
→ bool
isPhoneNumber (String text )
→ bool
isUrl (String text )
→ bool
isUsername (String text )
→ bool
lerpDouble (num a , num b , double t )
→ double
listEquals <T > (List <T > ? a , List <T > ? b )
→ bool
mapEquals <T , U > (Map <T , U > ? a , Map <T , U > ? b )
→ bool
onLayoutRendered (VoidCallback callback )
→ void
DO THAT:
periodic (int milliseconds , VoidCallback callback )
→ Timer
Create a periodic timer that executes a callback every few milliseconds.
DO THAT:
pow (double x , int exponent )
→ double
randomBool ()
→ bool
randomDouble ()
→ double
randomInt (int max )
→ int
repaintBoundaryToImageBytes (RenderRepaintBoundary ? boundary , {double pixelRatio = 3.0 , ImageByteFormat format = ui.ImageByteFormat.png })
→ Future <Uint8List ? >
setSystemOrientation (List <DeviceOrientation > orientations )
→ Future <void >
DO THAT:
setSystemOverlay (List <SystemUiOverlay > overlays , {SystemUiMode mode = SystemUiMode.manual })
→ Future <void >
DO THAT:
setSystemOverlayStyle ({Brightness ? statusBarBrightness , Brightness ? statusBarIconBrightness , Brightness ? navigationBarIconBrightness , Color ? statusBarColor , Color ? navigationBarColor , Color ? navigationBarDividerColor })
→ void
DO THAT:
sqrt (double x )
→ double
timer (int milliseconds , VoidCallback callback )
→ Timer
Create a timer that will execute an instruction after an amount of
milliseconds. The goodness and difference it has with the Misc.delayed() is
that has the ability to be canceled and thus the callback will not be executed.
wait (int milliseconds )
→ Future <void >
Allows you to pause instructions for a set time.
widgetToImageBytes ({required Widget child , required BuildContext context , Size ? size , double ? pixelRatio , ImageByteFormat format = ui.ImageByteFormat.png , Duration delay = Duration.zero , bool inheritTheme = true })
→ Future <Uint8List >
Constants
extendedLoremIpsum
→ const String
return "Lorem ipsum dolor sit amet, consectetur
adipiscing elit, sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua. Ut enim ad minim
veniam, quis nostrud exercitation ullamco laboris
nisi ut aliquip ex ea commodo consequat."
loremIpsum
→ const String
return "Lorem ipsum dolor sit amet, consectetur
adipiscing elit, sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua."