bulletPoints function

Widget bulletPoints({
  1. String? prefix,
  2. required List<String> bulletPoints,
  3. String? suffix,
  4. required TextStyle textStyle,
})

Implementation

Widget bulletPoints({
  String? prefix,
  required List<String> bulletPoints,
  String? suffix,
  required TextStyle textStyle,
}) {
  final bullet = utf8.decode([0xE2, 0x80, 0xA2]);
  var text = prefix != null ? '$prefix\n\n' : '';
  bulletPoints.map((e) => '$bullet $e\n').forEach((element) {
    text += element;
  });
  text += suffix != null ? '\n$suffix' : '';
  return Text(text, style: textStyle);
}