<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Yvan COYAUD</title>
    <description>The latest articles on DEV Community by Yvan COYAUD (@yvancoyaud).</description>
    <link>https://dev.to/yvancoyaud</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1320926%2F3003a7c0-212e-48e3-89b5-4adef86e9aa1.jpg</url>
      <title>DEV Community: Yvan COYAUD</title>
      <link>https://dev.to/yvancoyaud</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yvancoyaud"/>
    <language>en</language>
    <item>
      <title>StreamBuilder on a list of objects.</title>
      <dc:creator>Yvan COYAUD</dc:creator>
      <pubDate>Mon, 19 Aug 2024 15:22:58 +0000</pubDate>
      <link>https://dev.to/yvancoyaud/streambuilder-on-a-list-of-objects-1g5d</link>
      <guid>https://dev.to/yvancoyaud/streambuilder-on-a-list-of-objects-1g5d</guid>
      <description>&lt;p&gt;Hello everyone,&lt;br&gt;
I would like to know how it is possible to make a StreamBuilder on a list of objects.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class UnSpan {
    UnSpan(String texte,{double fontSize=20,
                FontWeight bold=FontWeight.normal}){
            this.texte =texte;
            this.fontSize =fontSize;
            this.bold =FontWeight.normal;}
    String texte="";
    double fontSize=20;
    FontWeight bold=FontWeight.normal;
}
List&amp;lt;UnSpan&amp;gt; listSpans = [];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After initializing this list, I would like to be able to do a StreamBuilder on this list to be able to display each span in a RichText&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;RichText(
  text: TextSpan(
    text:'',
    children:[
      streamBuilder(
-------- _That's where I don't know._
--------
        itemBuilder: (BuildContext context, int index) {
          TextSpan(text: listspans[index].texte,
                   style:TextStyle(
                     fontWeight:listSpans[index].bold,
                     fontSize:listSpans[index].fontSize))

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Can someone please help me&lt;br&gt;
Thank you in advance&lt;br&gt;
YC&lt;/p&gt;

</description>
      <category>flutter</category>
    </item>
  </channel>
</rss>
