badState static method
Implementation
static StateException badState(
String operation, {
String? name,
required String reason,
int? expecteLen,
Map<String, dynamic>? details,
}) => StateException._(
"$operation not allowed in current state.",
details: {"expected": operation, "reason": reason},
);