asList<T> function

List<T>? asList<T>(
  1. dynamic value
)

Implementation

List<T>? asList<T>(dynamic value){
  if(value == null) return null;
  var endValue = value;
  if(value is String){
    endValue = jsonDecode(value);
  }
  return List<T>.from(endValue);
}