Open jithinjoycy opened 4 years ago
Use key for refresh Tags view.
View: Button( "Click to clear", onPressed: () { controller.reset(); } ), Obx( () => Tags( key: controller.tagStateKey, itemCount: controller.listItem.length, itemBuilder..... ); )
Controller: Rx<GlobalKey> tagStateKey = GlobalKey().obs;
void reset() { tagStateKey.value = GlobalKey(); tagStateKey.refresh(); }
Use key for refresh Tags view.
View: Button( "Click to clear", onPressed: () { controller.reset(); } ), Obx( () => Tags( key: controller.tagStateKey, itemCount: controller.listItem.length, itemBuilder..... ); )
Controller: Rx<GlobalKey> tagStateKey = GlobalKey().obs;
void reset() { tagStateKey.value = GlobalKey();
tagStateKey.refresh();
}