SlidingTopPanel constructor

SlidingTopPanel({
  1. Key? key,
  2. required Widget body,
  3. required WidgetBuilder panel,
  4. required SlidingPanelTopController controller,
  5. Widget? header,
  6. double maxHeight = 0,
  7. BoxDecoration? decorationPanel,
  8. Color? backgroundColorPanel,
  9. double? backdropOpacity = 0.7,
  10. bool? onTapHeaderEnabled = true,
  11. bool? backdropEnabledToClose = true,
  12. Color? backdropColor = Colors.black,
  13. Color? backgroundColor = Colors.white,
})

Implementation

SlidingTopPanel({
  Key? key,
  required this.body,
  required this.panel,
  required this.controller,
  this.header,
  this.maxHeight = 0,
  this.decorationPanel,
  this.backgroundColorPanel,
  this.backdropOpacity = 0.7,
  this.onTapHeaderEnabled = true,
  this.backdropEnabledToClose = true,
  this.backdropColor = Colors.black,
  this.backgroundColor = Colors.white,
})  : assert(0 <= backdropOpacity! && backdropOpacity <= 1.0),
      assert(!maxHeight.isNegative),
      assert(
        backgroundColorPanel == null || decorationPanel == null,
        'Cannot provide both a backgroundColorPanel and a decoration\n'
        'To provide both, use "decoration: BoxDecoration(color: color)".',
      ),
      super(key: key);