FeatureStateService class
When the JSON required to create the feature states map comes from a simple REST service, this class can be used to transform the response data into the map required by the FeatureMapper inside a FeatureStateProvider
- Inheritance
-
- Object
- EitherService<
JsonRequestModel, EmptyJsonResponseModel> - FeatureStateService
Constructors
-
FeatureStateService.new({required RestApi<
RestResponse> restApi, required FeatureMapper featuresMap})
Properties
Methods
-
isRequestModelJsonValid(
Map< String, dynamic> json) → bool -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onError(
RestResponseType responseType, Map< String, dynamic> jsonResponse) → ServiceFailure -
inherited
-
parseResponse(
Map< String, dynamic> jsonResponse) → EmptyJsonResponseModel -
override
-
request(
{JsonRequestModel? requestModel}) → Future< Either< ServiceFailure, EmptyJsonResponseModel> > -
ServiceResponseHandler callbacks will be used to handle the different
possible responses from the request
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited