createItems2 static method

List<Widget> createItems2(
  1. BuildContext context,
  2. String title,
  3. List<ItemOption> values
)

Implementation

static List<Widget> createItems2(BuildContext context, String title, List<ItemOption> values) {
  final line = Container(color: Colors.grey.shade300, height: 2.sp);
  List<Widget> list = [];
  list.add(SizedBox(height: 120.sp, child: Center(child: createLabel(title,
      color: StyleCustom.textColor6C, fontWeight: FontWeight.bold))));
  for (var i = 0; i < values.length; i++) {
    list.add(line);
    list.add(OutlinedButton(style: OutlinedButton.styleFrom(
      side: const BorderSide(
        color: Colors.transparent,
      )
    ),onPressed: () => values[i].isLock ? () {} : values[i].function(),
        child: _createItem(values[i])));
  }
  return list;
}