buildMenuItems method

dynamic buildMenuItems()

Implementation

buildMenuItems() {
  return highlightButtons.map((c) {
    if (c.type == highlight_type.color) {
      return Padding(
        padding: const EdgeInsets.all(4.0),
        child: InkWell(
          onTap: () {
            this.onTapped(c);
            // Get.back();
          },
          child: Container(
            width: 100,
            height: 100,
            decoration: BoxDecoration(
              color: c.color,
              shape: BoxShape.circle,
            ),
            child: FittedBox(child: Text(c.label == "" ? "" : c.label)),
          ),
        ),
      );
    } else {
      if (c.type == highlight_type.bold) {
        return InkWell(
            onTap: () {
              this.onTapped(c);
            },
            child: Icon(
              Icons.format_bold,
              size: iconSize,
            ));
      }
      if (c.type == highlight_type.italic) {
        return InkWell(
            onTap: () {
              this.onTapped(c);
            },
            child: Icon(
              Icons.format_italic,
              size: iconSize,
            ));
      } else {
        return InkWell(
            onTap: () {
              this.onTapped(c);
            },
            child: Icon(
              Icons.format_underline,
              size: iconSize,
            ));
      }
    }
  });
}