vList static method
vertical
Implementation
static Widget vList( BuildContext context, List<Widget> children,
double minesMarginVertical ){
//Log.i( "vList()");
// list
var columnAsListView = Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: children);
//scroll
var scroll = SingleChildScrollView(
child: columnAsListView,
keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag,
);
//make touch working on web
var scrollConfig = ScrollConfiguration(
behavior: ScrollConfiguration.of( context ).copyWith(
dragDevices: {
PointerDeviceKind.mouse,
PointerDeviceKind.touch,
PointerDeviceKind.stylus,
PointerDeviceKind.trackpad,
PointerDeviceKind.unknown,
PointerDeviceKind.invertedStylus
},
),
child: scroll,
);
//shadow
var effectScrollbar = DSColor.ds_background_all_screen;
var themeScroll = Theme(
//Inherit the current Theme and override only the accentColor property
data: ThemeData(
colorScheme: ColorScheme.fromSwatch().copyWith(secondary: effectScrollbar),
),
child: scrollConfig
);
//cal height
double statusHeight = StatusBarConstant.getHeight(context);
double maxHeight = DeviceTools.getHeight(context) - minesMarginVertical - statusHeight;
//expanded
var box = BoxConstraints(maxHeight: maxHeight);
var boxExpanded = ConstrainedBox(
constraints: box,
child: themeScroll );
return boxExpanded;
}