MyScrollView constructor

const MyScrollView({
  1. Key? key,
  2. required List<Widget> children,
  3. EdgeInsetsGeometry? padding,
  4. ScrollPhysics physics = const BouncingScrollPhysics(),
  5. CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.start,
  6. Widget? bottomButton,
  7. KeyboardActionsConfig? keyboardConfig,
  8. bool tapOutsideToDismiss = false,
  9. double overScroll = 16.0,
  10. ScrollController? controller,
})

注意:同时存在底部按钮与keyboardConfig配置时,为保证软键盘弹出高度正常。需要在Scaffold使用 resizeToAvoidBottomInset: defaultTargetPlatform != TargetPlatform.iOS, 除非Android与iOS平台均使用keyboard_actions

Implementation

const MyScrollView({
  Key? key,
  required this.children,
  this.padding,
  this.physics = const BouncingScrollPhysics(),
  this.crossAxisAlignment = CrossAxisAlignment.start,
  this.bottomButton,
  this.keyboardConfig,
  this.tapOutsideToDismiss = false,
  this.overScroll = 16.0,
  this.controller,
}) : super(key: key);