dart_beacon icon indicating copy to clipboard operation
dart_beacon copied to clipboard

docs: Beacon.hashSet and Beacon.hashMap usage is incorrect in documentation

Open rapiddesigns opened this issue 11 months ago • 0 comments

I love this package so much ! Noticed one thing in docs:

Issue: hashSet documentation is empty and hashMap displays list usage


 var nums = Beacon.list<int>([1, 2, 3]);

Beacon.effect(() {
 print(nums.value); // Outputs: [1, 2, 3]
});

nums.add(4); // Outputs: [1, 2, 3, 4]

nums.remove(2); // Outputs: [1, 3, 4]

Proposed Fix:

Demonstrate hashMap and hashSet usage i.e.


final beaconMap = Beacon.hashMap<String, Int> (<String, Int> {});
beaconMap["MyElement"] = 999;

rapiddesigns avatar Mar 08 '25 16:03 rapiddesigns