part of '../../settings.dart'; typedef OptionBuilderFunction = Widget Function(BuildContext context, T snapshot); class OptionBuilder extends StreamBuilderBase { OptionBuilder({ required this.option, required this.builder, super.key, }) : super(stream: option.stream); final Option option; final OptionBuilderFunction builder; @override T afterData(final T current, final T data) => data; @override T initial() => option.defaultValue; @override Widget build(final BuildContext context, final T currentSummary) => builder(context, currentSummary); }