Committed by
GitHub
convert widget to sliver
very often you have to convert the widget to slivers
Showing
1 changed file
with
4 additions
and
0 deletions
| @@ -47,3 +47,7 @@ extension WidgetMarginX on Widget { | @@ -47,3 +47,7 @@ extension WidgetMarginX on Widget { | ||
| 47 | 47 | ||
| 48 | Widget get marginZero => Container(margin: EdgeInsets.zero, child: this); | 48 | Widget get marginZero => Container(margin: EdgeInsets.zero, child: this); | 
| 49 | } | 49 | } | 
| 50 | + | ||
| 51 | +extension WidgetSliverBoxX on Widget { | ||
| 52 | + sliverBox() => SliverToBoxAdapter(child: this); | ||
| 53 | +} | 
- 
Please register or login to post a comment