isPrimitive function

bool isPrimitive(
  1. dynamic value
)

是否是基础类似

Implementation

bool isPrimitive(dynamic value) {
  return value is double || value is int || value is String || value is bool;
}