private static Widget ProcessHeadingClose(Token token, BuilderContext ctx) { var richText = new SelectableText(textSpan: ctx.inline.Pop()); Widget container = null; if (ctx.useNotifyContainer) { var positionRecord = new PositionRecord { title = ctx.title }; container = new NotifyContainer( margin: EdgeInsets.only(top: 40f), child: richText, notifyFn: fn => positionRecord.getPosition = fn ); ctx.positionRecords.Add(positionRecord); } else { container = new Container( margin: EdgeInsets.only(top: 40f), child: richText ); } ctx.Clear(); return(container); }
private static Widget ProcessParagraphClose(Token token, BuilderContext ctx) { if (ctx.imageNode != null) { var node = ctx.imageNode; ctx.Clear(); return(node); } var richText = new SelectableText( textSpan: ctx.inline.Pop() ); var container = new Container( margin: EdgeInsets.only(top: 24f), child: richText ); ctx.Clear(); return(container); }
private static Widget ProcessParagraphClose(Token token, BuilderContext ctx) { if (ctx.ImageNode != null) { var node = ctx.ImageNode; ctx.Clear(); return(node); } var richText = new SelectableText( textSpan: ctx.Inline.Pop() ); var container = new Container( margin: EdgeInsets.only(top: 24f), child: richText ); ctx.Clear(); if (ctx.ListItem) { return(new Row( crossAxisAlignment: CrossAxisAlignment.start, children: new List <Widget> { new Container( margin: EdgeInsets.only(top: 26f, right: 8f), child: new Text("\u2022") ), new Expanded( child: container ), } )); } return(container); }