--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/1a8f5a93-1b66-45fb-8551-b789d06e52b9o%40googlegroups.com.
> it’s not workingI don’t understand what’s the problem. Can you share screenshot/video and your code in GitHub repository?
On Wed, Jul 29, 2020 at 10:11 Vikram S Sangotra <trivi...@gmail.com> wrote:
Hello friends,I am trying to get dynamic value in SliverAppBar with futureBuilder. But its not working and am not even sure if I am going in a right direction. I tried to find tutorial/help but no luck. Please guide me through....TIA--Vikram
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutt...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/a87a3161-7246-4429-9265-cc5eb2abcc86o%40googlegroups.com.
NestedScrollView( headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) { return <Widget>[ SliverAppBar( expandedHeight: 300, floating: false, pinned: true, flexibleSpace: FlexibleSpaceBar(
centerTitle: true,
title: Text( "Child Name", style: TextStyle(fontSize: 30, color: clrWhite), ), background: Image.network( 'images/profile.jpg', fit: BoxFit.cover, )), ) ]; }, body: Center( child: Text("Sample Text"), ), ),Can you share your code?
On Wed, Jul 29, 2020, 7:48 PM Vikram S Sangotra <trivi...@gmail.com> wrote:
As I said I have no idea weather I am doing it write or wrong.--I tried adding FutureBuilder inside SliverAppBar - but nothing happened. JSonData is being fetched from database.
On Wednesday, 29 July 2020 19:43:35 UTC+5:30, Suzuki Tomohiro wrote:> it’s not workingI don’t understand what’s the problem. Can you share screenshot/video and your code in GitHub repository?On Wed, Jul 29, 2020 at 10:11 Vikram S Sangotra <trivi...@gmail.com> wrote:Hello friends,I am trying to get dynamic value in SliverAppBar with futureBuilder. But its not working and am not even sure if I am going in a right direction. I tried to find tutorial/help but no luck. Please guide me through....TIA--Vikram
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/1a8f5a93-1b66-45fb-8551-b789d06e52b9o%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/a87a3161-7246-4429-9265-cc5eb2abcc86o%40googlegroups.com.
Hello friends,Any updates on this ? I am held up here for last 5 days....
--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/10f4b151-5fb1-40d5-8cf9-4cf0aec79026o%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/a87a3161-7246-4429-9265-cc5eb2abcc86o%40googlegroups.com.
Here are the codes :
body: FutureBuilder<List<ImageDetails>>( future: downloadJSON(data), initialData: [], builder: (context, AsyncSnapshot snapshot) { if (snapshot.hasData) { List<cImageDetails> ImageDetails = snapshot.data;
return ListView.builder( itemCount: ImageDetails.length, itemBuilder: (BuildContext context, int index) { return NestedScrollView( headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) { return <Widget>[ SliverAppBar( expandedHeight: 300, floating: false, pinned: true, flexibleSpace: FlexibleSpaceBar( centerTitle: true, title: Text( ImageDetails[index].cName, style: TextStyle(fontSize: 30), ), background: Image.network( 'images/images.jpg', fit: BoxFit.cover, )), ) ]; }, body: Center( child: Text("Sample Text"), ), ); }); } else if (snapshot.hasError) { print("Error" + snapshot.error); return Expanded( child: Center( child: CircularProgressIndicator(), ), ); } }),--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/6d8978b7-52bd-4493-8148-1580420c5958o%40googlegroups.com.
Try printing the ImageDetails list. I think you have to replace ImageDetails[index] with ImageDetails.elementAt(index) or ImageDetails.itemAt(index) which ever is correct.
On trying your suggestion :
On Sunday, 2 August 2020 11:36:30 UTC+5:30, Souvik Dutta wrote:
Try printing the ImageDetails list. I think you have to replace ImageDetails[index] with ImageDetails.elementAt(index) or ImageDetails.itemAt(index) which ever is correct.
Souvik Datta - on trying your suggestion:
flexibleSpace: FlexibleSpaceBar(centerTitle: true,title: Text(
childImageDetails.elementAt(index).child_name,
style:TextStyle(fontSize: 30, color: clrWhite),),
Enter code here...Getting same error :
════════ Exception caught by widgets library ═══════════════════════════════════type 'String' is not a subtype of type 'int' of 'index'The relevant error-causing widget was
FutureBuilder<List<ChildImageDetails>>
--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/3ab26b9e-90de-46cf-818e-2487e1f2fce5o%40googlegroups.com.
Is this is the complete error message. The line number should have been printed.
This one missed out while copying
Another exception was thrown: type 'String' is not a subtype of type 'int' of 'index'
--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/692c2ff1-000d-4e06-8aff-38c9b4ee79dco%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/0c012d54-ed11-4cdc-98a5-13a1d7586b29o%40googlegroups.com.