@@ -493,33 +493,23 @@ class ListNodeWidget extends StatelessWidget {
493493 case UnorderedListNode (): marker = "• " ; break ;
494494 case OrderedListNode (: final start): marker = "${start + index }. " ; break ;
495495 }
496- return ListItemWidget (marker: marker, nodes: item);
496+ return TableRow (children: [
497+ Align (
498+ alignment: AlignmentDirectional .topEnd,
499+ child: Text (marker)),
500+ BlockContentList (nodes: item),
501+ ]);
497502 });
498503 return Padding (
499504 padding: const EdgeInsets .only (top: 2 , bottom: 5 ),
500- child: Column (children: items));
501- }
502- }
503-
504- class ListItemWidget extends StatelessWidget {
505- const ListItemWidget ({super .key, required this .marker, required this .nodes});
506-
507- final String marker;
508- final List <BlockContentNode > nodes;
509-
510- @override
511- Widget build (BuildContext context) {
512- return Row (
513- mainAxisAlignment: MainAxisAlignment .start,
514- crossAxisAlignment: CrossAxisAlignment .baseline,
515- textBaseline: localizedTextBaseline (context),
516- children: [
517- SizedBox (
518- width: 20 , // TODO handle long numbers in <ol>, like https://github.com/zulip/zulip/pull/25063
519- child: Align (
520- alignment: AlignmentDirectional .topEnd, child: Text (marker))),
521- Expanded (child: BlockContentList (nodes: nodes)),
522- ]);
505+ child: Table (
506+ textBaseline: localizedTextBaseline (context),
507+ defaultVerticalAlignment: TableCellVerticalAlignment .baseline,
508+ columnWidths: const < int , TableColumnWidth > {
509+ 0 : IntrinsicColumnWidth (),
510+ 1 : FlexColumnWidth (),
511+ },
512+ children: items));
523513 }
524514}
525515
0 commit comments