AssetPatterns extension
Adds pattern-matching-related methods to Asset.
- on
Methods
-
map<
TResult extends Object?> (TResult $default(_Asset value)) → TResult -
Available on Asset, provided by the AssetPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_Asset value)?) → TResult? -
Available on Asset, provided by the AssetPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_Asset value)?, {required TResult orElse()}) → TResult -
Available on Asset, provided by the AssetPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(String id, String name, String? plate, String? vin, Avatar? dynamicIcon, AssetMode? mode, List< String> ? childrenIds, List<Asset> ? children, List<DeviceCommand> ? commands, List<String> ? referencesIds, List<Reference> ? references, List<String> ? authenticatedAssetsIds, List<Asset> ? authenticatedAssets, List<String> ? authenticatedUsersIds, List<User> ? authenticatedUsers, String? kindId, Category? kind, List<CustomField> ? customFields, List<Sensor> ? sensors, String? primaryId, Device? primary, List<String> ? devicesIds, List<Device> ? devices, String? qrCode, List<String> ? externalIdentifiers, Connection? connection, AssetTelemetry? telemetry, List<Tag> ? tags, List<Access> ? access, List<AtsExit> ? lastExits, String? activeTime, List<ContactInfo> ? contacts, List<MappitLaborHour> ? mappitLaborHours, String? ownerId, AssetLoginInfo? loginInfo, AtsAuthenticationCard? authenticationCard, String? authenticationCardId, String? nfcIdentifier, List<Asset> ? linkedSupplyPointAssets, List<String> ? linkedSupplyPointAssetsIds, StaticPosition? staticPosition, List<ZonePoint> ? points, List<String> parameters, List<Sensor> ? globalSensors, TimeOfDay? mappitLaborStartTime, TimeOfDay? mappitLaborEndTime, List<Geofence> ? geofences, List<String> ? mappitSecondaryRoutesIds, bool? isSuspended, String? authenticationCardCardboardId, String? authenticationCardTagId, String? authenticationCardNfcId, AtsAuthenticationCard? authenticationCardCardboard, AtsAuthenticationCard? authenticationCardTag, AtsAuthenticationCard? authenticationCardNfc)?, {required TResult orElse()}) → TResult -
Available on Asset, provided by the AssetPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
when<
TResult extends Object?> (TResult $default(String id, String name, String? plate, String? vin, Avatar? dynamicIcon, AssetMode? mode, List< String> ? childrenIds, List<Asset> ? children, List<DeviceCommand> ? commands, List<String> ? referencesIds, List<Reference> ? references, List<String> ? authenticatedAssetsIds, List<Asset> ? authenticatedAssets, List<String> ? authenticatedUsersIds, List<User> ? authenticatedUsers, String? kindId, Category? kind, List<CustomField> ? customFields, List<Sensor> ? sensors, String? primaryId, Device? primary, List<String> ? devicesIds, List<Device> ? devices, String? qrCode, List<String> ? externalIdentifiers, Connection? connection, AssetTelemetry? telemetry, List<Tag> ? tags, List<Access> ? access, List<AtsExit> ? lastExits, String? activeTime, List<ContactInfo> ? contacts, List<MappitLaborHour> ? mappitLaborHours, String? ownerId, AssetLoginInfo? loginInfo, AtsAuthenticationCard? authenticationCard, String? authenticationCardId, String? nfcIdentifier, List<Asset> ? linkedSupplyPointAssets, List<String> ? linkedSupplyPointAssetsIds, StaticPosition? staticPosition, List<ZonePoint> ? points, List<String> parameters, List<Sensor> ? globalSensors, TimeOfDay? mappitLaborStartTime, TimeOfDay? mappitLaborEndTime, List<Geofence> ? geofences, List<String> ? mappitSecondaryRoutesIds, bool? isSuspended, String? authenticationCardCardboardId, String? authenticationCardTagId, String? authenticationCardNfcId, AtsAuthenticationCard? authenticationCardCardboard, AtsAuthenticationCard? authenticationCardTag, AtsAuthenticationCard? authenticationCardNfc)) → TResult -
Available on Asset, provided by the AssetPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String id, String name, String? plate, String? vin, Avatar? dynamicIcon, AssetMode? mode, List< String> ? childrenIds, List<Asset> ? children, List<DeviceCommand> ? commands, List<String> ? referencesIds, List<Reference> ? references, List<String> ? authenticatedAssetsIds, List<Asset> ? authenticatedAssets, List<String> ? authenticatedUsersIds, List<User> ? authenticatedUsers, String? kindId, Category? kind, List<CustomField> ? customFields, List<Sensor> ? sensors, String? primaryId, Device? primary, List<String> ? devicesIds, List<Device> ? devices, String? qrCode, List<String> ? externalIdentifiers, Connection? connection, AssetTelemetry? telemetry, List<Tag> ? tags, List<Access> ? access, List<AtsExit> ? lastExits, String? activeTime, List<ContactInfo> ? contacts, List<MappitLaborHour> ? mappitLaborHours, String? ownerId, AssetLoginInfo? loginInfo, AtsAuthenticationCard? authenticationCard, String? authenticationCardId, String? nfcIdentifier, List<Asset> ? linkedSupplyPointAssets, List<String> ? linkedSupplyPointAssetsIds, StaticPosition? staticPosition, List<ZonePoint> ? points, List<String> parameters, List<Sensor> ? globalSensors, TimeOfDay? mappitLaborStartTime, TimeOfDay? mappitLaborEndTime, List<Geofence> ? geofences, List<String> ? mappitSecondaryRoutesIds, bool? isSuspended, String? authenticationCardCardboardId, String? authenticationCardTagId, String? authenticationCardNfcId, AtsAuthenticationCard? authenticationCardCardboard, AtsAuthenticationCard? authenticationCardTag, AtsAuthenticationCard? authenticationCardNfc)?) → TResult? -
Available on Asset, provided by the AssetPatterns extension
A variant ofwhenthat fallback to returningnull