mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
[flutter]: force ScrollbarListStack child as large as parent
This commit is contained in:
@ -82,6 +82,7 @@ class _TrashStackPageState extends State<TrashStackPage> {
|
|||||||
barSize: barSize,
|
barSize: barSize,
|
||||||
child: StyledSingleChildScrollView(
|
child: StyledSingleChildScrollView(
|
||||||
controller: ScrollController(),
|
controller: ScrollController(),
|
||||||
|
barSize: barSize,
|
||||||
axis: Axis.horizontal,
|
axis: Axis.horizontal,
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: TrashSizes.totalWidth,
|
width: TrashSizes.totalWidth,
|
||||||
|
@ -5,6 +5,5 @@ class TrashSizes {
|
|||||||
static double get lashModifyWidth => 230 * scale;
|
static double get lashModifyWidth => 230 * scale;
|
||||||
static double get createTimeWidth => 230 * scale;
|
static double get createTimeWidth => 230 * scale;
|
||||||
static double get padding => 100 * scale;
|
static double get padding => 100 * scale;
|
||||||
static double get totalWidth =>
|
static double get totalWidth => TrashSizes.fileNameWidth + TrashSizes.lashModifyWidth + TrashSizes.createTimeWidth;
|
||||||
TrashSizes.fileNameWidth + TrashSizes.lashModifyWidth + TrashSizes.createTimeWidth + TrashSizes.padding;
|
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ class StyledSingleChildScrollView extends StatefulWidget {
|
|||||||
final Color? handleColor;
|
final Color? handleColor;
|
||||||
final ScrollController? controller;
|
final ScrollController? controller;
|
||||||
final EdgeInsets? scrollbarPadding;
|
final EdgeInsets? scrollbarPadding;
|
||||||
|
final double barSize;
|
||||||
|
|
||||||
final Widget? child;
|
final Widget? child;
|
||||||
|
|
||||||
@ -22,6 +23,7 @@ class StyledSingleChildScrollView extends StatefulWidget {
|
|||||||
this.handleColor,
|
this.handleColor,
|
||||||
this.controller,
|
this.controller,
|
||||||
this.scrollbarPadding,
|
this.scrollbarPadding,
|
||||||
|
this.barSize = 6,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -58,14 +60,16 @@ class _StyledSingleChildScrollViewState extends State<StyledSingleChildScrollVie
|
|||||||
axis: widget.axis,
|
axis: widget.axis,
|
||||||
controller: scrollController,
|
controller: scrollController,
|
||||||
scrollbarPadding: widget.scrollbarPadding,
|
scrollbarPadding: widget.scrollbarPadding,
|
||||||
barSize: 12,
|
barSize: widget.barSize,
|
||||||
trackColor: widget.trackColor,
|
trackColor: widget.trackColor,
|
||||||
handleColor: widget.handleColor,
|
handleColor: widget.handleColor,
|
||||||
child: SingleChildScrollView(
|
child: SizedBox.expand(
|
||||||
scrollDirection: widget.axis,
|
child: SingleChildScrollView(
|
||||||
physics: StyledScrollPhysics(),
|
scrollDirection: widget.axis,
|
||||||
controller: scrollController,
|
physics: StyledScrollPhysics(),
|
||||||
child: widget.child,
|
controller: scrollController,
|
||||||
|
child: widget.child,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user