onInit method
Gets called on first launch of Widgetbook with the initial state
.
Implementation
@override
void onInit(WidgetbookState state) {
if (state.effectiveAddons == null) return;
final addonsJson = state.effectiveAddons! //
.map((addon) => addon.toJson())
.toList();
notifyCloud('addons', addonsJson);
}