configwire 0.0.2
configwire: ^0.0.2 copied to clipboard
Pure-Dart ConfigWire client (fetch, cache, typed getters, realtime).
0.0.2 #
Added #
TargetingContext(lib/src/targeting.dart, exported frompackage:configwire/configwire.dart): carriesuserId,platform,appVersion,locale,country,customAttrsfor server-side rule evaluation. Empty fields are omitted from the fetch query;customAttrsis sent as?attrs=<json>. IncludescopyWith,empty, andtoQueryParameters().
Changed #
- Breaking:
fetchAndActivateandensureInitializednow take only{TargetingContext? context, bool force}. The flattenedString? userId/platform/appVersion/locale/countryandMap? customAttrsparams are removed. Migrate:fetchAndActivate(userId: 'u')->fetchAndActivate(context: const TargetingContext(userId: 'u')); single-field update ->fetchAndActivate(context: cw.targeting.copyWith(platform: 'ios')). - Targeting is sticky: a non-null
contextreplacescw.targetingfor this and all future fetches, includingconnectRealtimepoll/SSE refreshes (fetchAndActivate(force: true)reuses the stored context).setTargetingreplaces the stored context without fetching.
0.0.1 #
- Initial release of the pure-Dart
configwireclient.