S2ModalConfig constructor

const S2ModalConfig({
  1. S2ModalType type = S2ModalType.fullPage,
  2. String title,
  3. bool useHeader = true,
  4. bool useConfirm = false,
  5. Icon confirmIcon,
  6. Widget confirmLabel,
  7. Color confirmColor,
  8. EdgeInsetsGeometry confirmMargin,
  9. Brightness confirmBrightness = Brightness.light,
  10. bool useFilter = false,
  11. bool filterAuto = false,
  12. Duration filterDelay = const Duration(milliseconds: 300),
  13. String filterHint,
  14. double maxHeightFactor = 0.6,
  15. bool enableDrag = true,
  16. bool barrierDismissible = true,
  17. Color barrierColor,
  18. S2ModalStyle style = const S2ModalStyle(),
  19. S2ModalHeaderStyle headerStyle = const S2ModalHeaderStyle(),
})

Create modal configuration

Implementation

const S2ModalConfig({
  this.type = S2ModalType.fullPage,
  this.title,
  this.useHeader = true,
  this.useConfirm = false,
  this.confirmIcon,
  this.confirmLabel,
  this.confirmColor,
  this.confirmMargin,
  this.confirmBrightness = Brightness.light,
  this.useFilter = false,
  this.filterAuto = false,
  this.filterDelay = const Duration(milliseconds: 300),
  this.filterHint,
  this.maxHeightFactor = 0.6,
  this.enableDrag = true,
  this.barrierDismissible = true,
  this.barrierColor,
  this.style = const S2ModalStyle(),
  this.headerStyle = const S2ModalHeaderStyle(),
})  : assert(useHeader != null),
      assert(useConfirm != null),
      assert(useFilter != null),
      assert(filterAuto != null),
      assert(enableDrag != null),
      assert(barrierDismissible != null),
      assert(confirmBrightness != null),
      assert(maxHeightFactor != null),
      assert(maxHeightFactor > 0 && maxHeightFactor <= 1),
      assert(style != null),
      assert(headerStyle != null);