JJDialogList constructor
JJDialogList({
- Key? key,
- JJDialogType type = JJDialogType.list,
- List<
String> ? list, - List<
Widget> ? children, - Widget? custom,
- double cellHeight = 44,
- double cellWidth = double.infinity,
- EdgeInsets? listPadding = const EdgeInsets.symmetric(horizontal: 16),
- EdgeInsets? cellPadding,
- TextAlign? textAlign = TextAlign.center,
- TextStyle? textStyle,
- TextStyle? selectedTextStyle,
- BoxDecoration? cellDecoration,
- BoxDecoration? cellSelectedDecoration,
- void onTap(
- int index
- int selectedIndex = -1,
- Color? highlightColor,
- Color? tapSplashColor,
- BorderRadius? tapBorderRadius,
- Color separateColor = const Color(0xfff5f5f5),
- double separateWidth = 0.5,
- int crossAxisCount = 3,
- double mainAxisSpacing = 0.0,
- double crossAxisSpacing = 0.0,
- double childAspectRatio = 1.0,
- double? mainAxisExtent,
- double diameterRatio = 1.07,
- Color? backgroundColor = Colors.transparent,
- double offAxisFraction = 0.0,
- bool useMagnifier = true,
- double magnification = 1.2,
- FixedExtentScrollController? scrollController,
- double squeeze = 1.45,
- Widget? selectionOverlay,
- void onChange(
- int index
Implementation
JJDialogList({Key? key,
this.type = JJDialogType.list,
///默认list
this.list,
this.children,
///custom
this.custom,
///cell选项卡
this.cellHeight = 44,
this.cellWidth = double.infinity,
this.listPadding = const EdgeInsets.symmetric(horizontal: 16),
this.cellPadding,
this.textAlign = TextAlign.center,
this.textStyle,
this.selectedTextStyle,
this.cellDecoration,
this.cellSelectedDecoration,
this.onTap,
this.selectedIndex = -1,
this.highlightColor,
this.tapSplashColor,
this.tapBorderRadius,
///list, listHeight 44, 文字居中
this.separateColor = const Color(0xfff5f5f5),
this.separateWidth = 0.5,
///grid
this.crossAxisCount = 3,
this.mainAxisSpacing = 0.0, //wrap spacing
this.crossAxisSpacing = 0.0,//wrap runSpacing
this.childAspectRatio = 1.0,
this.mainAxisExtent,
///picker
this.diameterRatio = 1.07,
this.backgroundColor = Colors.transparent,
this.offAxisFraction = 0.0,
this.useMagnifier = true,
this.magnification = 1.2,
this.scrollController,
this.squeeze = 1.45,
this.selectionOverlay,
this.onChange,
}) : super(key: key);