toSliver method
Implementation
Widget toSliver(BuildContext context,
{bool fillRemaining = false, bool softWarn = true}) {
if (isSliver(context)) {
return this;
}
warn(
"$runtimeType is not a sliver in a sliver context, wrapping in a ${fillRemaining ? "SliverFillRemainingBoxAdapter" : "SliverToBoxAdapter"}");
return fillRemaining
? SliverFillRemainingBoxAdapter(child: this)
: SliverToBoxAdapter(child: this);
}