How to create multidimensional lists and loop widgets containing the lists value?How do I add Columns inside of a ListView in Flutter?Creating widgets based on a listHow to offset a scaffold widget in Flutter?Adding Card to ListViewFlutter : Bad state: Stream has already been listened toInheritedWidget confusionHow to create an inner loop in a widget in flutter?Creating a list of widgets from map with keys and valuesInherited Widget rebuilding whole Google Maps widgetThe first item is broken when I scroll back

At what point in time did Dumbledore ask Snape for this favor?

Using a found spellbook as a Sorcerer-Wizard multiclass

Random Unitary Matrices

Facebook Marketing API asset access suddenly denied

How would a aircraft visually signal "in distress"?

Was there a priest on the Titanic who stayed on the ship giving confession to as many as he could?

Russian equivalents of "no love lost"

Watts vs. Volt Amps

What could have caused a rear derailleur to end up in the back wheel suddenly?

When conversion from Integer to Single may lose precision

An average heaven where everyone has sexless golden bodies and is bored

Is open-sourcing the code of a webapp not recommended?

Frame failure sudden death?

Soft question: Examples where lack of mathematical rigour cause security breaches?

Preventing Employees from either switching to Competitors or Opening Their Own Business

Can a user sell my software (MIT license) without modification?

How can I most clearly write a homebrew item that affects the ground below its radius after the initial explosion it creates?

Show that this function is bounded

How did they achieve the Gunslinger's shining eye effect in Westworld?

Why only the fundamental frequency component is said to give useful power?

What can plausibly explain many of my very long and low-tech bridges?

Movie about a boy who was born old and grew young

How to officially communicate to a non-responsive colleague?

Can anyone identify this tank?



How to create multidimensional lists and loop widgets containing the lists value?


How do I add Columns inside of a ListView in Flutter?Creating widgets based on a listHow to offset a scaffold widget in Flutter?Adding Card to ListViewFlutter : Bad state: Stream has already been listened toInheritedWidget confusionHow to create an inner loop in a widget in flutter?Creating a list of widgets from map with keys and valuesInherited Widget rebuilding whole Google Maps widgetThe first item is broken when I scroll back






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I'm new to Flutter & Dart and trying to build an App.



My Goal for now is to build a List (Array), but with an "index" to access it later. Afterwards I want to output it within a widget. Unfortunately I haven't found any tutorials or helpful ressources on the web.




  1. Build a List which contains the date & days for an event. I tried the following, but it doesn't work.



    var events = [ "day": "Monday", "date": "01.01.2019", "title": "Musical Event Austria", "day": "Wednesday", "date", "01.01.2019", "title": "Musical Event 2"];



  2. Loop throught the list and output it within a widget



    new Container(decoration: const BoxDecoration(
    color: Color(0xFF0F1633),
    ),
    child: SingleChildScrollView(
    scrollDirection: Axis.horizontal,
    child: Row(
    mainAxisAlignment: MainAxisAlignment.spaceAround,
    children: events.map((day, date, title) => new Text(title)).toList(),
    ),
    ),
    ),


So how may I build the list the right way and output it? What I want to output inside a Text Widget is actually the title, date and day...but really tried many ways to acchieve it, no way. :)))



Thanks in advance!










share|improve this question






























    0















    I'm new to Flutter & Dart and trying to build an App.



    My Goal for now is to build a List (Array), but with an "index" to access it later. Afterwards I want to output it within a widget. Unfortunately I haven't found any tutorials or helpful ressources on the web.




    1. Build a List which contains the date & days for an event. I tried the following, but it doesn't work.



      var events = [ "day": "Monday", "date": "01.01.2019", "title": "Musical Event Austria", "day": "Wednesday", "date", "01.01.2019", "title": "Musical Event 2"];



    2. Loop throught the list and output it within a widget



      new Container(decoration: const BoxDecoration(
      color: Color(0xFF0F1633),
      ),
      child: SingleChildScrollView(
      scrollDirection: Axis.horizontal,
      child: Row(
      mainAxisAlignment: MainAxisAlignment.spaceAround,
      children: events.map((day, date, title) => new Text(title)).toList(),
      ),
      ),
      ),


    So how may I build the list the right way and output it? What I want to output inside a Text Widget is actually the title, date and day...but really tried many ways to acchieve it, no way. :)))



    Thanks in advance!










    share|improve this question


























      0












      0








      0








      I'm new to Flutter & Dart and trying to build an App.



      My Goal for now is to build a List (Array), but with an "index" to access it later. Afterwards I want to output it within a widget. Unfortunately I haven't found any tutorials or helpful ressources on the web.




      1. Build a List which contains the date & days for an event. I tried the following, but it doesn't work.



        var events = [ "day": "Monday", "date": "01.01.2019", "title": "Musical Event Austria", "day": "Wednesday", "date", "01.01.2019", "title": "Musical Event 2"];



      2. Loop throught the list and output it within a widget



        new Container(decoration: const BoxDecoration(
        color: Color(0xFF0F1633),
        ),
        child: SingleChildScrollView(
        scrollDirection: Axis.horizontal,
        child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceAround,
        children: events.map((day, date, title) => new Text(title)).toList(),
        ),
        ),
        ),


      So how may I build the list the right way and output it? What I want to output inside a Text Widget is actually the title, date and day...but really tried many ways to acchieve it, no way. :)))



      Thanks in advance!










      share|improve this question
















      I'm new to Flutter & Dart and trying to build an App.



      My Goal for now is to build a List (Array), but with an "index" to access it later. Afterwards I want to output it within a widget. Unfortunately I haven't found any tutorials or helpful ressources on the web.




      1. Build a List which contains the date & days for an event. I tried the following, but it doesn't work.



        var events = [ "day": "Monday", "date": "01.01.2019", "title": "Musical Event Austria", "day": "Wednesday", "date", "01.01.2019", "title": "Musical Event 2"];



      2. Loop throught the list and output it within a widget



        new Container(decoration: const BoxDecoration(
        color: Color(0xFF0F1633),
        ),
        child: SingleChildScrollView(
        scrollDirection: Axis.horizontal,
        child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceAround,
        children: events.map((day, date, title) => new Text(title)).toList(),
        ),
        ),
        ),


      So how may I build the list the right way and output it? What I want to output inside a Text Widget is actually the title, date and day...but really tried many ways to acchieve it, no way. :)))



      Thanks in advance!







      dart flutter






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 24 at 16:25







      talaash

















      asked Mar 24 at 16:05









      talaashtalaash

      123




      123






















          1 Answer
          1






          active

          oldest

          votes


















          1














          you may create a basic class for your need



          class YourObject 
          final String title;
          final String day;
          final String date;

          YourObject(this.title, this.day, this.date);



          create a List from that class/object



           List<YourObject> yourObjectList = [
          YourObject(day: "Monday", date: "01.01.2019", title: "Musical Event Austria"),
          YourObject(day: "Wednesday", date: "01.01.2019", title: "Musical Event 2"),
          ];


          and you able to render title , date and day with like that or you can change the Container according to your needs/design



           return Column(
          children: yourObjectList.map((currentObject)
          return Container(
          child: Row(
          children: <Widget>[
          Text(currentObject.title),
          Text(currentObject.day),
          Text(currentObject.date),
          ],
          ),
          );
          ).toList(),
          );






          share|improve this answer























          • Thanks Sir! Worked like a charme. :)))

            – talaash
            Mar 24 at 18:54











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55325738%2fhow-to-create-multidimensional-lists-and-loop-widgets-containing-the-lists-value%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          you may create a basic class for your need



          class YourObject 
          final String title;
          final String day;
          final String date;

          YourObject(this.title, this.day, this.date);



          create a List from that class/object



           List<YourObject> yourObjectList = [
          YourObject(day: "Monday", date: "01.01.2019", title: "Musical Event Austria"),
          YourObject(day: "Wednesday", date: "01.01.2019", title: "Musical Event 2"),
          ];


          and you able to render title , date and day with like that or you can change the Container according to your needs/design



           return Column(
          children: yourObjectList.map((currentObject)
          return Container(
          child: Row(
          children: <Widget>[
          Text(currentObject.title),
          Text(currentObject.day),
          Text(currentObject.date),
          ],
          ),
          );
          ).toList(),
          );






          share|improve this answer























          • Thanks Sir! Worked like a charme. :)))

            – talaash
            Mar 24 at 18:54















          1














          you may create a basic class for your need



          class YourObject 
          final String title;
          final String day;
          final String date;

          YourObject(this.title, this.day, this.date);



          create a List from that class/object



           List<YourObject> yourObjectList = [
          YourObject(day: "Monday", date: "01.01.2019", title: "Musical Event Austria"),
          YourObject(day: "Wednesday", date: "01.01.2019", title: "Musical Event 2"),
          ];


          and you able to render title , date and day with like that or you can change the Container according to your needs/design



           return Column(
          children: yourObjectList.map((currentObject)
          return Container(
          child: Row(
          children: <Widget>[
          Text(currentObject.title),
          Text(currentObject.day),
          Text(currentObject.date),
          ],
          ),
          );
          ).toList(),
          );






          share|improve this answer























          • Thanks Sir! Worked like a charme. :)))

            – talaash
            Mar 24 at 18:54













          1












          1








          1







          you may create a basic class for your need



          class YourObject 
          final String title;
          final String day;
          final String date;

          YourObject(this.title, this.day, this.date);



          create a List from that class/object



           List<YourObject> yourObjectList = [
          YourObject(day: "Monday", date: "01.01.2019", title: "Musical Event Austria"),
          YourObject(day: "Wednesday", date: "01.01.2019", title: "Musical Event 2"),
          ];


          and you able to render title , date and day with like that or you can change the Container according to your needs/design



           return Column(
          children: yourObjectList.map((currentObject)
          return Container(
          child: Row(
          children: <Widget>[
          Text(currentObject.title),
          Text(currentObject.day),
          Text(currentObject.date),
          ],
          ),
          );
          ).toList(),
          );






          share|improve this answer













          you may create a basic class for your need



          class YourObject 
          final String title;
          final String day;
          final String date;

          YourObject(this.title, this.day, this.date);



          create a List from that class/object



           List<YourObject> yourObjectList = [
          YourObject(day: "Monday", date: "01.01.2019", title: "Musical Event Austria"),
          YourObject(day: "Wednesday", date: "01.01.2019", title: "Musical Event 2"),
          ];


          and you able to render title , date and day with like that or you can change the Container according to your needs/design



           return Column(
          children: yourObjectList.map((currentObject)
          return Container(
          child: Row(
          children: <Widget>[
          Text(currentObject.title),
          Text(currentObject.day),
          Text(currentObject.date),
          ],
          ),
          );
          ).toList(),
          );







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 24 at 17:52









          cipli onatcipli onat

          554313




          554313












          • Thanks Sir! Worked like a charme. :)))

            – talaash
            Mar 24 at 18:54

















          • Thanks Sir! Worked like a charme. :)))

            – talaash
            Mar 24 at 18:54
















          Thanks Sir! Worked like a charme. :)))

          – talaash
          Mar 24 at 18:54





          Thanks Sir! Worked like a charme. :)))

          – talaash
          Mar 24 at 18:54



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55325738%2fhow-to-create-multidimensional-lists-and-loop-widgets-containing-the-lists-value%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript