build method

  1. @override
Widget build(
  1. BuildContext context,
  2. String text,
  3. GptMarkdownConfig config
)
override

Implementation

@override
Widget build(
  BuildContext context,
  String text,
  final GptMarkdownConfig config,
) {
  var match = this.exp.firstMatch(text.trim());
  return OrderedListView(
    no: "${match?[1]}",
    textDirection: config.textDirection,
    style: (config.style ?? const TextStyle()).copyWith(
      fontWeight: FontWeight.w100,
    ),
    child: MdWidget("${match?[2]?.trim()}", config: config),
  );
}