public BlockPicker( Color pickerColor, PickerItemBuilder itemBuilder = null, PickerLayoutBuilder layoutBuilder = null, ValueChanged <Color> onColorChanged = null, List <Color> availableColors = null ) { D.assert(pickerColor != null); D.assert(onColorChanged != null); this.pickerColor = pickerColor; this.onColorChanged = onColorChanged; if (availableColors == null) { this.availableColors = Utils._defaultColors; } else { this.availableColors = availableColors; } if (layoutBuilder == null) { this.layoutBuilder = defaultLayoutBuilder; } else { this.layoutBuilder = layoutBuilder; } if (itemBuilder == null) { this.itemBuilder = defaultItemBuilder; } else { this.itemBuilder = itemBuilder; } }
public MultipleChoiceBlockPicker( List <Color> pickerColors, ValueChanged <List <Color> > onColorsChanged, PickerLayoutBuilder layoutBuilder = null, PickerItemBuilder itemBuilder = null, List <Color> availableColors = null ) { this.pickerColors = pickerColors; this.onColorsChanged = onColorsChanged; if (availableColors == null) { this.availableColors = Utils._defaultColors; } else { this.availableColors = availableColors; } if (layoutBuilder == null) { this.layoutBuilder = BlockPicker.defaultLayoutBuilder; } else { this.layoutBuilder = layoutBuilder; } if (itemBuilder == null) { this.itemBuilder = BlockPicker.defaultItemBuilder; } else { this.itemBuilder = itemBuilder; } }