StructuredResponse.notOnThisDevice constructor
StructuredResponse.notOnThisDevice(
- Ability ability,
- AbilityGap gap
ability refused on a device that lacks it, with the reason and what to do instead from gap.
Implementation
factory StructuredResponse.notOnThisDevice(Ability ability, AbilityGap gap) => StructuredResponse.error(
summary: '${ability.label} is not available on this device: ${gap.reason}',
errorKind: GlintErrorKind.notOnThisDevice,
nextSteps: [if (gap.instead != null) gap.instead!],
).mergeData({'ability': ability.name, if (gap.instead != null) 'instead': gap.instead});