@@ -503,33 +503,24 @@ class ListNodeWidget extends StatelessWidget {
503503        case  UnorderedListNode ():  marker =  "•   " ; break ;
504504        case  OrderedListNode (: final  start):  marker =  "${start  + index }. " ; break ;
505505      }
506-       return  ListItemWidget (marker:  marker, nodes:  item);
506+       return  TableRow (children:  [
507+         Align (
508+           alignment:  AlignmentDirectional .topEnd,
509+           child:  Text (marker)),
510+         BlockContentList (nodes:  item),
511+       ]);
507512    });
513+ 
508514    return  Padding (
509515      padding:  const  EdgeInsets .only (top:  2 , bottom:  5 ),
510-       child:  Column (children:  items));
511-   }
512- }
513- 
514- class  ListItemWidget  extends  StatelessWidget  {
515-   const  ListItemWidget ({super .key, required  this .marker, required  this .nodes});
516- 
517-   final  String  marker;
518-   final  List <BlockContentNode > nodes;
519- 
520-   @override 
521-   Widget  build (BuildContext  context) {
522-     return  Row (
523-       mainAxisAlignment:  MainAxisAlignment .start,
524-       crossAxisAlignment:  CrossAxisAlignment .baseline,
525-       textBaseline:  localizedTextBaseline (context),
526-       children:  [
527-         SizedBox (
528-           width:  20 , // TODO handle long numbers in <ol>, like https://github.com/zulip/zulip/pull/25063 
529-           child:  Align (
530-             alignment:  AlignmentDirectional .topEnd, child:  Text (marker))),
531-         Expanded (child:  BlockContentList (nodes:  nodes)),
532-       ]);
516+       child:  Table (
517+         defaultVerticalAlignment:  TableCellVerticalAlignment .baseline,
518+         textBaseline:  localizedTextBaseline (context),
519+         columnWidths:  const  < int , TableColumnWidth > {
520+           0 :  IntrinsicColumnWidth (),
521+           1 :  FlexColumnWidth (),
522+         },
523+         children:  items));
533524  }
534525}
535526
0 commit comments