title: Use class to pass parameters as list in Flutter
body: <p>I'm working on a simple chatscreen UI in Flutter. There's a user-defined widget MessageBubble that accepts three parameters: sender (String), text (String), isMe (bool). Currently it is being passed static values one by one, like this:</p>
  
  <pre><code>List&lt;MessageBubble&gt; messages = [
      MessageBubble(
        sender: "Me",
        text: "Hi!",
        isMe: true,
      ),
      MessageBubble(
        sender: "Not Me",
        text: "Hey, hi!",
        isMe: false,
      ),
  ];
  </code></pre>
  
  <p>What I want to do instead, is I've created a class BubbleData like this:</p>
  
  <pre><code>class BubbleData {
      List &lt;String&gt; sender = ['Not Me', 'Not Me'];
      List &lt;String&gt; text = ['Hey Hi', "What's new?"];
      List &lt;bool&gt; isMe = [false, false];
  }
  </code></pre>
  
  <p>Now the problem at hand lies that how do I iterate these listitems through the MessageBubble using a ListView builder?</p>