ensure method
Ensures the signal is initialized and runs the given function.
Parameters:
fn: Optional function to run after ensuring initialization
Returns: A Future that completes when the operation is done
Implementation
Future<void> ensure(FutureOr<void> Function()? fn) async {
if (!hasInitialized) await _load();
await fn?.call();
}