li method

Widget li()

Implementation

Widget li() {
  return Builder(
    builder: (context) {
      UnorderedListData? data = Data.maybeOf(context);
      int depth = data?.depth ?? 0;
      TextStyle style = DefaultTextStyle.of(context).style;
      double size = (style.fontSize ?? 12) / 16 * 6;
      return IntrinsicWidth(
        child: Row(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            SizedBox(
              height: ((style.fontSize ?? 12) * (style.height ?? 1)) * 1.2,
              child: getBullet(context, depth, size),
            ),
            const SizedBox(width: 8),
            Expanded(
              child: Data.inherit(
                  data: UnorderedListData(depth: depth + 1), child: this),
            ),
          ],
        ),
      );
    },
  );
}