getChildren method

List<Widget> getChildren(
  1. List<SelectorItem> list,
  2. double textSize,
  3. Color textColor
)

列表Item

Implementation

List<Widget> getChildren(
    List<SelectorItem> list, double textSize, Color textColor) {
  List<Widget> children = [];
  for (SelectorItem item in list) {
    children.add(Center(
      child: Text(
        item.name,
        maxLines: 1,
        textAlign: TextAlign.center,
        style: TextStyle(fontSize: textSize, color: textColor),
      ),
    ));
  }
  return children;
}