part of '../../settings.dart'; class OptionBuilder extends StatelessWidget { const OptionBuilder({ required this.option, required this.builder, super.key, }); final Option option; final Widget Function(BuildContext context, T? data) builder; @override Widget build(final BuildContext context) => StreamBuilder( stream: option.defaultValue, builder: (final context, final defaultValueSnapshot) => StreamBuilder( stream: option.stream, builder: (final context, final valueSnapshot) => builder( context, valueSnapshot.data ?? defaultValueSnapshot.data, ), ), ); }