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;
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.
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"];
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
add a comment |
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.
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"];
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
add a comment |
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.
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"];
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
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.
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"];
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
dart flutter
edited Mar 24 at 16:25
talaash
asked Mar 24 at 16:05
talaashtalaash
123
123
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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(),
);
Thanks Sir! Worked like a charme. :)))
– talaash
Mar 24 at 18:54
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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(),
);
Thanks Sir! Worked like a charme. :)))
– talaash
Mar 24 at 18:54
add a comment |
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(),
);
Thanks Sir! Worked like a charme. :)))
– talaash
Mar 24 at 18:54
add a comment |
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(),
);
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(),
);
answered Mar 24 at 17:52
cipli onatcipli onat
554313
554313
Thanks Sir! Worked like a charme. :)))
– talaash
Mar 24 at 18:54
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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