isPrimitive function

bool isPrimitive(
  1. dynamic value
)

Checks if the value is primitive (String, number, boolean or null)

Implementation

bool isPrimitive(value) => value is String || value is num || value is bool || value == null;