Geofence class abstract
- Available extensions
- Annotations
-
- @freezed
Constructors
-
Geofence({required String id, required String name, @JsonKey.new(unknownEnumValue: GeofenceMode.radial) required GeofenceMode mode, String? description, @ColorOrNullConverter() Color? color, List<
GeofencePoint> ? path, double? radius, String? resourceId, List<Asset> ? assetsInside, @JsonKey.new(unknownEnumValue: GeofenceCategory.none) @Default.new(GeofenceCategory.none) GeofenceCategory category, List<String> ? childrenIds, List<Geofence> ? children, List<Access> ? access, List<CustomField> ? customFields, String? ownerId, User? owner, List<MappitRoute> ? mappitRoutes, List<String> ? mappitRouteIds, String? assetId}) -
constfactory
-
Geofence.fromJson(Map<
String, dynamic> json) -
factory
Properties
-
access
→ List<
Access> ? -
List of custom access permissions.
no setterinherited
- assetId → String?
-
assetIdrefers to the asset to which the geofence is linked.no setterinherited -
assetsInside
→ List<
Asset> ? -
List of assets inside the geofence.
no setterinherited
- category → GeofenceCategory
-
categoryrefers to the type of geofence, by default is GeofenceCategory.none when is requested from the API.no setterinherited -
children
→ List<
Geofence> ? -
childrenrefers to the list of children geofences.no setterinherited -
childrenIds
→ List<
String> ? -
childrenIdsrefers to the list of children geofences.no setterinherited - color → Color?
-
Color of the geofence in hexadecimal code.
no setterinherited
-
copyWith
→ $GeofenceCopyWith<
Geofence> -
Create a copy of Geofence
with the given fields replaced by the non-null parameter values.
no setterinherited
-
customFields
→ List<
CustomField> ? -
List of
customFieldslinked to the geofence. Please read the documentation for CustomField for more details about the fields.no setterinherited - description → String?
-
Description of the geofence.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
ID of the geofence entity. This ID is unique.
no setterinherited
-
mappitRouteIds
→ List<
String> ? -
mappitRouteIdsrefers to the list of routes that are linked to the geofence.no setterinherited -
mappitRoutes
→ List<
MappitRoute> ? -
mappitRoutesrefers to the list of routes that are linked to the geofence.no setterinherited - mode → GeofenceMode
-
Mode of geofence, check the documentation of GeofenceMode for more information.
no setterinherited
- name → String
-
Name of the geofence.
no setterinherited
- owner → User?
-
ownerrefers to the owner of the geofence.no setterinherited - ownerId → String?
-
ownerIdrefers to the owner of the geofence.no setterinherited -
path
→ List<
GeofencePoint> ? -
Depending of the Geofence mode, this field may return one or N points. Please check the GeofenceMode definition
no setterinherited
- radius → double?
-
Radius of the geofence in meters. If mode is GeofenceMode.LINEAR, this field will be the weight of the geofence. For GeofenceMode.POLYGON, this field will be ignored.
no setterinherited
- resourceId → String?
-
External resource ID, only for external geofences.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_Geofence value)) → TResult -
Available on Geofence, provided by the GeofencePatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_Geofence value)?) → TResult? -
Available on Geofence, provided by the GeofencePatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_Geofence value)?, {required TResult orElse()}) → TResult -
Available on Geofence, provided by the GeofencePatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(String id, String name, GeofenceMode mode, String? description, Color? color, List< GeofencePoint> ? path, double? radius, String? resourceId, List<Asset> ? assetsInside, GeofenceCategory category, List<String> ? childrenIds, List<Geofence> ? children, List<Access> ? access, List<CustomField> ? customFields, String? ownerId, User? owner, List<MappitRoute> ? mappitRoutes, List<String> ? mappitRouteIds, String? assetId)?, {required TResult orElse()}) → TResult -
Available on Geofence, provided by the GeofencePatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this Geofence to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(String id, String name, GeofenceMode mode, String? description, Color? color, List< GeofencePoint> ? path, double? radius, String? resourceId, List<Asset> ? assetsInside, GeofenceCategory category, List<String> ? childrenIds, List<Geofence> ? children, List<Access> ? access, List<CustomField> ? customFields, String? ownerId, User? owner, List<MappitRoute> ? mappitRoutes, List<String> ? mappitRouteIds, String? assetId)) → TResult -
Available on Geofence, provided by the GeofencePatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String id, String name, GeofenceMode mode, String? description, Color? color, List< GeofencePoint> ? path, double? radius, String? resourceId, List<Asset> ? assetsInside, GeofenceCategory category, List<String> ? childrenIds, List<Geofence> ? children, List<Access> ? access, List<CustomField> ? customFields, String? ownerId, User? owner, List<MappitRoute> ? mappitRoutes, List<String> ? mappitRouteIds, String? assetId)?) → TResult? -
Available on Geofence, provided by the GeofencePatterns extension
A variant ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited