Get Firebase collection to a Flutter List to displayAdd Scrolling in the ListView.builder in Flutter applicationFlutter : Can I add a Header Row to a ListViewHow to Configure Firebase Firestore settings with FlutterFlutter : Bad state: Stream has already been listened toGet data from firebase to flutterHow to convert a sub collection to list with flutter and firestore?Displaying Firebase Firestore Listview Data as a list FlutterFlutter - fill list with firebase collectionPERMISSION DENIED Firebase in FlutterFlutter/Firebase: Trying to get Data from Firebase Collection
Proof of work - lottery approach
How can I get through very long and very dry, but also very useful technical documents when learning a new tool?
What happens if you roll doubles 3 times then land on "Go to jail?"
Sort a list by elements of another list
Implement the Thanos sorting algorithm
Integer addition + constant, is it a group?
How do I find the solutions of the following equation?
Fastening aluminum fascia to wooden subfascia
How do scammers retract money, while you can’t?
Is it okay for two “sein” to be next to each other?
Is the destination of a commercial flight important for the pilot?
How do I rename a Linux host without needing to reboot for the rename to take effect?
Hostile work environment after whistle-blowing on coworker and our boss. What do I do?
Type int? vs type int
How to draw lines on a tikz-cd diagram
Is expanding the research of a group into machine learning as a PhD student risky?
You cannot touch me, but I can touch you, who am I?
What does "I’d sit this one out, Cap," imply or mean in the context?
Does this power sequence converge or diverge? If it converges, what is the limit?
Where does the Z80 processor start executing from?
CREATE opcode: what does it really do?
Was Spock the First Vulcan in Starfleet?
How does the UK government determine the size of a mandate?
Why didn't Theresa May consult with Parliament before negotiating a deal with the EU?
Get Firebase collection to a Flutter List to display
Add Scrolling in the ListView.builder in Flutter applicationFlutter : Can I add a Header Row to a ListViewHow to Configure Firebase Firestore settings with FlutterFlutter : Bad state: Stream has already been listened toGet data from firebase to flutterHow to convert a sub collection to list with flutter and firestore?Displaying Firebase Firestore Listview Data as a list FlutterFlutter - fill list with firebase collectionPERMISSION DENIED Firebase in FlutterFlutter/Firebase: Trying to get Data from Firebase Collection
I struggling to get data form a Firebase collection into a Sliverlist.
Every example I found like this, returns only one Sliverlist, but I've multiple.
The goal I want to achive is a list of Sliverlists, where some have dynamic data en other doesn't
This is the part of my code where its happens:
return Scaffold(
body: CustomScrollView(
slivers: <Widget>[
SliverAppBar(
// omitted
floating: false,
pinned: true,
flexibleSpace: FlexibleSpaceBar(
centerTitle: false,
collapseMode: CollapseMode.parallax,
// omitted
),
),
),
SliverPadding(padding: EdgeInsets.all(10.0)),
StreamBuilder(
stream: Firestore.instance.collection("books").snapshots(),
builder: (BuildContext context, AsyncSnapshot snapshot)
return SliverList(
delegate: SliverChildBuilderDelegate(
(BuildContext context, int index)
DocumentSnapshot ds = snapshot.data.documents[index];
return Row(
textDirection: TextDirection.ltr,
children: <Widget>[
Expanded(child: Text(ds["title"])),
Expanded(child: Text(ds["author"])),
],
);
,
childCount: snapshot.data.documents.length,
),
);
,
),
SliverPadding(padding: EdgeInsets.all(10.0)),
SliverList(
delegate: SliverChildListDelegate(
[
StaticWidget(),
StaticWidget(),
],
),
),
SliverPadding(padding: EdgeInsets.all(25.0)),
],
),
// omitted
I getting the following error:
Any help would be very welcome!
add a comment |
I struggling to get data form a Firebase collection into a Sliverlist.
Every example I found like this, returns only one Sliverlist, but I've multiple.
The goal I want to achive is a list of Sliverlists, where some have dynamic data en other doesn't
This is the part of my code where its happens:
return Scaffold(
body: CustomScrollView(
slivers: <Widget>[
SliverAppBar(
// omitted
floating: false,
pinned: true,
flexibleSpace: FlexibleSpaceBar(
centerTitle: false,
collapseMode: CollapseMode.parallax,
// omitted
),
),
),
SliverPadding(padding: EdgeInsets.all(10.0)),
StreamBuilder(
stream: Firestore.instance.collection("books").snapshots(),
builder: (BuildContext context, AsyncSnapshot snapshot)
return SliverList(
delegate: SliverChildBuilderDelegate(
(BuildContext context, int index)
DocumentSnapshot ds = snapshot.data.documents[index];
return Row(
textDirection: TextDirection.ltr,
children: <Widget>[
Expanded(child: Text(ds["title"])),
Expanded(child: Text(ds["author"])),
],
);
,
childCount: snapshot.data.documents.length,
),
);
,
),
SliverPadding(padding: EdgeInsets.all(10.0)),
SliverList(
delegate: SliverChildListDelegate(
[
StaticWidget(),
StaticWidget(),
],
),
),
SliverPadding(padding: EdgeInsets.all(25.0)),
],
),
// omitted
I getting the following error:
Any help would be very welcome!
add a comment |
I struggling to get data form a Firebase collection into a Sliverlist.
Every example I found like this, returns only one Sliverlist, but I've multiple.
The goal I want to achive is a list of Sliverlists, where some have dynamic data en other doesn't
This is the part of my code where its happens:
return Scaffold(
body: CustomScrollView(
slivers: <Widget>[
SliverAppBar(
// omitted
floating: false,
pinned: true,
flexibleSpace: FlexibleSpaceBar(
centerTitle: false,
collapseMode: CollapseMode.parallax,
// omitted
),
),
),
SliverPadding(padding: EdgeInsets.all(10.0)),
StreamBuilder(
stream: Firestore.instance.collection("books").snapshots(),
builder: (BuildContext context, AsyncSnapshot snapshot)
return SliverList(
delegate: SliverChildBuilderDelegate(
(BuildContext context, int index)
DocumentSnapshot ds = snapshot.data.documents[index];
return Row(
textDirection: TextDirection.ltr,
children: <Widget>[
Expanded(child: Text(ds["title"])),
Expanded(child: Text(ds["author"])),
],
);
,
childCount: snapshot.data.documents.length,
),
);
,
),
SliverPadding(padding: EdgeInsets.all(10.0)),
SliverList(
delegate: SliverChildListDelegate(
[
StaticWidget(),
StaticWidget(),
],
),
),
SliverPadding(padding: EdgeInsets.all(25.0)),
],
),
// omitted
I getting the following error:
Any help would be very welcome!
I struggling to get data form a Firebase collection into a Sliverlist.
Every example I found like this, returns only one Sliverlist, but I've multiple.
The goal I want to achive is a list of Sliverlists, where some have dynamic data en other doesn't
This is the part of my code where its happens:
return Scaffold(
body: CustomScrollView(
slivers: <Widget>[
SliverAppBar(
// omitted
floating: false,
pinned: true,
flexibleSpace: FlexibleSpaceBar(
centerTitle: false,
collapseMode: CollapseMode.parallax,
// omitted
),
),
),
SliverPadding(padding: EdgeInsets.all(10.0)),
StreamBuilder(
stream: Firestore.instance.collection("books").snapshots(),
builder: (BuildContext context, AsyncSnapshot snapshot)
return SliverList(
delegate: SliverChildBuilderDelegate(
(BuildContext context, int index)
DocumentSnapshot ds = snapshot.data.documents[index];
return Row(
textDirection: TextDirection.ltr,
children: <Widget>[
Expanded(child: Text(ds["title"])),
Expanded(child: Text(ds["author"])),
],
);
,
childCount: snapshot.data.documents.length,
),
);
,
),
SliverPadding(padding: EdgeInsets.all(10.0)),
SliverList(
delegate: SliverChildListDelegate(
[
StaticWidget(),
StaticWidget(),
],
),
),
SliverPadding(padding: EdgeInsets.all(25.0)),
],
),
// omitted
I getting the following error:
Any help would be very welcome!
edited Mar 7 at 14:16
TruongSinh
1,525822
1,525822
asked Mar 7 at 12:42
BushJopieBushJopie
185419
185419
add a comment |
add a comment |
0
active
oldest
votes
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%2f55044099%2fget-firebase-collection-to-a-flutter-list-to-display%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f55044099%2fget-firebase-collection-to-a-flutter-list-to-display%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