rand dart fix
This commit is contained in:
@@ -214,7 +214,7 @@ class ResponsiveListScaffold extends StatelessWidget {
|
||||
persistentFooterButtons: persistentFooterButtons,
|
||||
floatingActionButtonAnimator: floatingActionButtonAnimator,
|
||||
resizeToAvoidBottomInset: resizeToAvoidBottomInset,
|
||||
resizeToAvoidBottomPadding: resizeToAvoidBottomPadding,
|
||||
resizeToAvoidBottomInset: resizeToAvoidBottomPadding,
|
||||
primary: primary,
|
||||
// extendBody: extendBody,
|
||||
backgroundColor: backgroundColor,
|
||||
|
||||
@@ -69,11 +69,10 @@ class MobileView extends StatelessWidget {
|
||||
..addAll(slivers ?? [])
|
||||
..add(Builder(
|
||||
builder: (BuildContext context) {
|
||||
if (childDelagate?.estimatedChildCount == null && nullItems != null)
|
||||
if (childDelagate.estimatedChildCount == null)
|
||||
return SliverFillRemaining(child: nullItems);
|
||||
if (childDelagate?.estimatedChildCount != null &&
|
||||
childDelagate.estimatedChildCount == 0 &&
|
||||
emptyItems != null)
|
||||
if (childDelagate.estimatedChildCount != null &&
|
||||
childDelagate.estimatedChildCount == 0)
|
||||
return SliverFillRemaining(child: emptyItems);
|
||||
return SliverList(
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
@@ -101,7 +100,7 @@ class MobileView extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
},
|
||||
childCount: childDelagate?.estimatedChildCount ?? 0,
|
||||
childCount: childDelagate.estimatedChildCount ?? 0,
|
||||
addAutomaticKeepAlives: false,
|
||||
addRepaintBoundaries: false,
|
||||
addSemanticIndexes: false,
|
||||
|
||||
@@ -171,40 +171,38 @@ class _TabletViewState extends State<TabletView> {
|
||||
body: Flex(
|
||||
direction: Axis.horizontal,
|
||||
children: <Widget>[
|
||||
widget?.sideMenu ?? Container(),
|
||||
widget.sideMenu ?? Container(),
|
||||
Flexible(
|
||||
flex: widget.flexListView,
|
||||
child: Scaffold(
|
||||
key: widget?.scaffoldkey,
|
||||
floatingActionButton: widget?.floatingActionButton,
|
||||
key: widget.scaffoldkey,
|
||||
floatingActionButton: widget.floatingActionButton,
|
||||
floatingActionButtonLocation:
|
||||
widget?.floatingActionButtonLocation,
|
||||
bottomNavigationBar: widget?.bottomNavigationBar,
|
||||
bottomSheet: widget?.bottomSheet,
|
||||
persistentFooterButtons: widget?.persistentFooterButtons,
|
||||
widget.floatingActionButtonLocation,
|
||||
bottomNavigationBar: widget.bottomNavigationBar,
|
||||
bottomSheet: widget.bottomSheet,
|
||||
persistentFooterButtons: widget.persistentFooterButtons,
|
||||
floatingActionButtonAnimator:
|
||||
widget?.floatingActionButtonAnimator,
|
||||
resizeToAvoidBottomInset: widget?.resizeToAvoidBottomInset,
|
||||
resizeToAvoidBottomPadding: widget?.resizeToAvoidBottomPadding,
|
||||
primary: widget?.primary,
|
||||
widget.floatingActionButtonAnimator,
|
||||
resizeToAvoidBottomInset: widget.resizeToAvoidBottomInset,
|
||||
resizeToAvoidBottomInset: widget.resizeToAvoidBottomPadding,
|
||||
primary: widget.primary,
|
||||
// extendBody: extendBody,
|
||||
backgroundColor: widget?.backgroundColor,
|
||||
drawer: widget?.drawer,
|
||||
endDrawer: widget?.endDrawer,
|
||||
appBar: widget?.appBar,
|
||||
backgroundColor: widget.backgroundColor,
|
||||
drawer: widget.drawer,
|
||||
endDrawer: widget.endDrawer,
|
||||
appBar: widget.appBar,
|
||||
body: CustomScrollView(
|
||||
slivers: <Widget>[]
|
||||
..addAll(widget.slivers ?? [])
|
||||
..add(Builder(
|
||||
builder: (BuildContext context) {
|
||||
SliverChildDelegate _childDelagate =
|
||||
widget?.childDelagate;
|
||||
if (_childDelagate?.estimatedChildCount == null &&
|
||||
widget?.nullItems != null)
|
||||
widget.childDelagate;
|
||||
if (_childDelagate.estimatedChildCount == null)
|
||||
return SliverFillRemaining(child: widget.nullItems);
|
||||
if (_childDelagate?.estimatedChildCount != null &&
|
||||
_childDelagate.estimatedChildCount == 0 &&
|
||||
widget?.emptyItems != null)
|
||||
if (_childDelagate.estimatedChildCount != null &&
|
||||
_childDelagate.estimatedChildCount == 0)
|
||||
return SliverFillRemaining(child: widget.emptyItems);
|
||||
return SliverList(
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
@@ -224,7 +222,7 @@ class _TabletViewState extends State<TabletView> {
|
||||
? Theme.of(context)
|
||||
.chipTheme
|
||||
.disabledColor
|
||||
: widget?.backgroundColor,
|
||||
: widget.backgroundColor,
|
||||
padding:
|
||||
const EdgeInsets.symmetric(vertical: 8.0),
|
||||
child: _childDelagate.build(context, index),
|
||||
@@ -233,7 +231,7 @@ class _TabletViewState extends State<TabletView> {
|
||||
),
|
||||
);
|
||||
},
|
||||
childCount: _childDelagate?.estimatedChildCount ?? 0,
|
||||
childCount: _childDelagate.estimatedChildCount ?? 0,
|
||||
addAutomaticKeepAlives: false,
|
||||
addRepaintBoundaries: false,
|
||||
addSemanticIndexes: false,
|
||||
@@ -246,12 +244,11 @@ class _TabletViewState extends State<TabletView> {
|
||||
Flexible(
|
||||
flex: widget.flexDetailView,
|
||||
child: new _DetailView(
|
||||
detailScaffoldKey: widget?.detailScaffoldKey,
|
||||
details: _index == null ||
|
||||
_index > widget.childDelagate.estimatedChildCount - 1
|
||||
detailScaffoldKey: widget.detailScaffoldKey,
|
||||
details: _index > widget.childDelagate.estimatedChildCount - 1
|
||||
? null
|
||||
: widget.detailBuilder(context, _index, true),
|
||||
itemNotSelected: widget?.itemNotSelected,
|
||||
itemNotSelected: widget.itemNotSelected,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user