@@ -493,33 +493,24 @@ 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 });
503+
498504 return Padding (
499505 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- ]);
506+ child: Table (
507+ defaultVerticalAlignment: TableCellVerticalAlignment .baseline,
508+ textBaseline: localizedTextBaseline (context),
509+ columnWidths: const < int , TableColumnWidth > {
510+ 0 : IntrinsicColumnWidth (),
511+ 1 : FlexColumnWidth (),
512+ },
513+ children: items));
523514 }
524515}
525516
0 commit comments