greenflags 0.1.0
greenflags: ^0.1.0 copied to clipboard
Dart/Flutter SDK for GreenFlags feature flags. Snapshot + cache reads, polling, geofence evaluation and offline persistence — evaluated at the edge.
Changelog #
Format based on Keep a Changelog. Versioning: SemVer (while in 0.x, a MINOR release may include breaking changes; strict semver applies from 1.0.0 onward).
0.1.0 - 2026-07-10 #
Added #
- Initial release, mirroring
@greenflags/client0.2.x semantics in pure Dart. GreenFlagsClientwithrefresh,getSnapshot,getAllFlags,getFlag(withdefaultValue),isEnabled,snapshotStream,startPolling/stopPolling,setCoordinates,dispose.- Client-side geofence evaluation (haversine): outside the radius a
booleanflag evaluates tofalse, other types tonull. Every read path goes through evaluation — the raw snapshot is never exposed. - Offline persistence via the
SnapshotStoreinterface:hydrate()restores the last snapshot on startup;refresh()writes through. Raw flags are persisted so geofences re-evaluate against the current location after restart. - Typed
GreenFlagsExceptionwith API errorcode,messageand HTTPstatus(NETWORK_ERROR/PARSE_ERRORclient-side). - Auth via
Authorization: Bearerheader againstGET /v1/flags.