EasyStreamBuilder<T> constructor
const
EasyStreamBuilder<T> ({
- Key? key,
- required Stream<
T> stream, - required Widget dataBuilder(
- BuildContext context,
- T data
- String errorText = 'Oops, something went wrong.',
- IconData errorIcon = Icons.error_rounded,
- String isEmptyText = 'There is nothing to display.',
- IconData isEmptyIcon = Icons.close_rounded,
- TextStyle? textStyle,
- IconThemeData? iconStyle,
- Widget loadingIndicator = const CircularProgressIndicator(),
Creates an EasyStreamBuilder which is a wrapper around StreamBuilder that makes it easy to display the various states of streaming data.
See the documentation page for more details.
Implementation
const EasyStreamBuilder({
super.key,
required this.stream,
required this.dataBuilder,
this.errorText = 'Oops, something went wrong.',
this.errorIcon = Icons.error_rounded,
this.isEmptyText = 'There is nothing to display.',
this.isEmptyIcon = Icons.close_rounded,
this.textStyle,
this.iconStyle,
this.loadingIndicator = const CircularProgressIndicator(),
});