NinjaUiUniversalExtension<T> extension

Extension methods for nullable values of any type.

on
  • T?

Properties

isNull bool

Available on T?, provided by the NinjaUiUniversalExtension extension

Checks if the value is null.
no setter

Methods

console({String name = 'NINJA UI EXTENSION'}) → void

Available on T?, provided by the NinjaUiUniversalExtension extension

Logs the value and its type to the console.
detailedConsole({String name = 'MAGIC EXTENSION'}) → void

Available on T?, provided by the NinjaUiUniversalExtension extension

Logs detailed information about the value.
magicBool({bool defaultValue = false}) bool

Available on T?, provided by the NinjaUiUniversalExtension extension

Converts the value to a bool.
magicCompare(dynamic other) int

Available on T?, provided by the NinjaUiUniversalExtension extension

Compares the value with another value.
magicDouble({double defaultValue = 0}) double

Available on T?, provided by the NinjaUiUniversalExtension extension

Converts the value to a double.
magicEquals(dynamic other) bool

Available on T?, provided by the NinjaUiUniversalExtension extension

Checks if the value equals another value.
magicInt({int defaultValue = 0}) int

Available on T?, provided by the NinjaUiUniversalExtension extension

Converts the value to an int.
magicLength({int defaultValue = 0}) int

Available on T?, provided by the NinjaUiUniversalExtension extension

Returns the length of the value if it is iterable or a map.
magicList({List defaultValue = const []}) List

Available on T?, provided by the NinjaUiUniversalExtension extension

Converts the value to a List.
magicMap({Map defaultValue = const {}}) Map

Available on T?, provided by the NinjaUiUniversalExtension extension

Converts the value to a Map.
magicString({String defaultValue = '', bool nonEmptyInDebug = false}) String

Available on T?, provided by the NinjaUiUniversalExtension extension

Converts the value to a String.