mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-12-26 04:48:51 +00:00
11 lines
238 B
Dart
11 lines
238 B
Dart
/// API utilities
|
|
///
|
|
/// @author Pierre Hubert
|
|
|
|
/// Casting helper
|
|
T cast<T>(dynamic val) => val is T ? val : null;
|
|
|
|
/// Turn null and "null" into ""
|
|
String nullToEmpty(String input) =>
|
|
input == null || input == "null" ? "" : input;
|