SafeConvertOnMap2T extension
Extension on Map? to provide generic safe conversion of values.
- on
-
- Map?
Methods
-
getT<
T> (dynamic key, {required T defaultValue}) → T -
Available on Map?, provided by the SafeConvertOnMap2T extension
Gets value by key and converts to type T, returnsdefaultValueon failure. Supports deep path access using dot notation (e.g., "data.user.profile"). -
getTOrNull<
T> (dynamic key) → T? -
Available on Map?, provided by the SafeConvertOnMap2T extension
Gets value by key and converts to type T?. Supports deep path access using dot notation (e.g., "data.user.profile"). -
tryGetT<
T> (dynamic key) → T? -
Available on Map?, provided by the SafeConvertOnMap2T extension
Alias for getTOrNull.