Trying to build a ListView using Riverpod as state watcher

My goal is to have a ListView.builder, which updates, whenever the state changes. My state depends on a HTTP request. I manage to make my request successfully, I get a response and make it a List. For some reason, I do not get UI update on my screen and everything used to work, it got… Read More Trying to build a ListView using Riverpod as state watcher

(Flutter) Trying to build a ListView with a horizontal scrollDirection – failing

I keep trying to display a simple ListView, which I will fill with data that I get as a response from my backend. First of all I wanted to display that simple ListView inside my MainPage widget but i keep receiving the following error. I couldn’t find anything related to that error besides this solution,… Read More (Flutter) Trying to build a ListView with a horizontal scrollDirection – failing

Flutter: Error trying to pass a value to another class

I am trying to pass a value (the current index number of my ListView.builder) to another function. However I get the following error: ════════ Exception caught by widgets library ═══════════════════════════════════ The following RangeError was thrown building BookFeederSearch(dirty, dependencies: [_InheritedProviderScope<UserProvider?>], state: BookFeederSearchState#3217f): RangeError (index): Invalid value: Valid value range is empty: 0 Please see my code:… Read More Flutter: Error trying to pass a value to another class

Flutter: Why does my ListView/ ListBuilder widget build with an empty space before my widgets?

As you can see above my ListView.builder is placing a margin prior to the actual widgets within the list. Is there any way to avoid this? I’ve looked throughout the widget tree for all of my alignment, padding and margins and I don’t believe that it is that. Additionally, I made a new test ListView… Read More Flutter: Why does my ListView/ ListBuilder widget build with an empty space before my widgets?

Horizontal ListView.Builder() not working in Flutter

I have ListView as below in my flutter application: widgetToReturn = ListView.builder( shrinkWrap: true, physics: NeverScrollableScrollPhysics(), itemBuilder: (context, innerIndex) { return Text("Test"); }, itemCount: widget.objEvent!.details![index].items!.length); }) It works perfectly fine with Vertical scroll direction. But, When I am trying to make it Horizontal as below: Using: scrollDirection: Axis.horizontal, As below: widgetToReturn = ListView.builder( scrollDirection: Axis.horizontal,… Read More Horizontal ListView.Builder() not working in Flutter

two listtView are overlapping on same screen

I have two listView and they are overlapping on same screen.I have tried with singleChildScrollView also. How to solve this issue and thanks in advance. The code Widget build(BuildContext context) { return Scaffold( body: Stack( children: [ if(submittedComment.isNotEmpty)…[ ListView.builder(itemCount: submittedComment.length,shrinkWrap: true, scrollDirection: Axis.vertical, itemBuilder: (context,index){ return Container( width: MediaQuery.of(context).size.width-150, child: Card( child: Row( mainAxisAlignment: MainAxisAlignment.start,… Read More two listtView are overlapping on same screen

RenderShrinkWrappingViewport does not support returning intrinsic dimensions

I want a text button when on click shows a simpleDialog vith a listView.builder but I don’t know how to code it. I always have an error. Can you help me? Here is my code: TextButton( child: const Text(‘Selet instruments needed’), onPressed: () { showDialog( context: context, builder: (BuildContext context) => SimpleDialog( contentPadding: const EdgeInsets.all(15),… Read More RenderShrinkWrappingViewport does not support returning intrinsic dimensions