CkProfileExtractor<TProfile> class
Profile cache and CkBehaviorStream for CkAuthService.
Uses CkAuthExtractors.profile for API response parsing and cold-start restore.
- applyFromResponse — extract, persist
jsonEncode(data), skip work if unchanged - restoreProfile —
jsonDecodestored payload, then parse via extractors
Constructors
- CkProfileExtractor({required CkAuthExtractors extractors})
Properties
- current → TProfile?
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
profile
→ CkBehaviorStream<
TProfile?> -
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
applyFromResponse(
CkResponse response) → Future< TProfile?> - Extracts profile, persists CkResponse.data when changed, returns cached model.
-
cacheProfile(
TProfile profile, String fingerprint) → void - Caches profile and persists to storage if changed
-
clearProfile(
) → Future< void> -
fetchProfile(
String url, RequestMethod method) → Future< CkAuthResult< TProfile?> > -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parseProfile(
dynamic data) → TProfile? -
profileExtractor(
CkResponse response) → TProfile? -
Extracts
TProfilefrom CkResponse.data via CkAuthExtractors. -
restoreProfile(
) → Future< void> -
toString(
) → String -
A string representation of this object.
inherited
-
updateProfileRemote(
{required String url, required RequestMethod method, Map< String, dynamic> ? formFields, Map<String, dynamic> ? files, Map<String, dynamic> ? jsonBody}) → Future<CkAuthResult< TProfile?> >
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited