Questions tagged [flutter-layoutbuilder]
38 questions
6
votes
1 answer
"MediaQuery.of(context).size" VS "LayouBuilder( BoxConstraints constraints)"
I am a new Flutter learner. I am trying to write both mobile and web application using the same code base. I am wondering to know where should I use MediaQuery.of(context).size and where LayouBuilder( BoxConstraints constraints)?
Also like to know…

GoodMan
- 542
- 6
- 19
3
votes
1 answer
Flutter Web Responsiveness is not efficient
My screen have total 5 device partition size:- 1.Desktop 2.Small Desktop 3.Tablet 4.Small Tablet 5.Mobile,
for that purpose i tried to use layout builder but while i'm resizing the size of display it's take too much time to render the design because…

Bhargav Dobariya
- 43
- 6
2
votes
1 answer
can we use FutureBuilder with Void type
my question is can we use FutureBuilder with Void callbacks on using such methods whome type is
Future fun_name() async{ body }
after creating such methods how can we pass that method to FutureBuilder widget on whatever thy type is/.

Aqeel Mughal
- 2,105
- 2
- 6
- 14
2
votes
1 answer
profile picture separated from list view flutter
I am trying to build a profile screen where I already have a List view with some elements to display. However, the image I am placing is located in the center of the screen, interfering with my list.
How can I separate my profile information from…

Lash
- 333
- 1
- 2
- 14
2
votes
1 answer
How to access specific cell in generated List from grid view count in Flutter?
Here, I have a list. I want to access a specific position on that list in my GridView.count.
Like I have a list, a = [133, 118, 117, 116, 115, 114];
I want to figure it out that in my List.generate where I have generated 225 cells, how can I access…

Gourab Saha
- 39
- 6
1
vote
3 answers
flutter date time picker issue
/C:/Users/shivam%20bunkar/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_datetime_picker-1.5.1/lib/flutter_datetime_picker.dart:6:1: Error: 'DatePickerTheme' is imported from both 'package:flutter/src/material/date_picker_theme.dart' and…

Shivam bunkar
- 11
- 1
1
vote
3 answers
How to simulate spaceBetween behavior in a listView?
I have a Column of items like this:
Column(
children: [
...items,
Spacer(),
Footer(),
],
)
However, the items list may be dynamic, which makes necessary use a ListView instead of Column. The only problem is that my Footer was…

Esteban Muñoz
- 308
- 2
- 7
1
vote
0 answers
flutter web get refreshed completely except a single page
i am creating a website on flutter. I have and issue that when refresh my current page like i am on 3rd page, it refreshes the whole website and firstly goes on login screen and then goes to the home screen. after refreshing it does not comes back…

Aqeel Mughal
- 2,105
- 2
- 6
- 14
1
vote
1 answer
How to make a container scrollable in Flutter?
I have the following page code/widget:
import 'package:flutter/material.dart';
import '../constants.dart';
import '../util/my_box.dart';
import '../util/my_tile.dart';
class DesktopScaffold extends StatefulWidget {
const DesktopScaffold({Key?…

GoodMan
- 542
- 6
- 19
1
vote
2 answers
How to Pull Refresh FutureBuilder> (); page in flutter?
here im try to use FutureBuilder for my list but I can't refresh by on pullRefresh
@override
Widget build(BuildContext context) {
return RefreshIndicator(
onRefresh: _refreshPhotos, // fatch snapshot.data!
child:…

HiPradeep
- 81
- 9
1
vote
2 answers
MainAxisSize.SpaceEvenly not giving equal space in the widget
This is the Code
body: Center(
child: Column(
children: [
Row(
children: [
CircleAvatar(
backgroundImage: NetworkImage(
…

Kavach Dheer
- 149
- 9
1
vote
0 answers
My flutter GridView builder is not building a list according to database
I have a grid view builder but my problem is when there is no data in the database it still returns a container that I set to contain the data, and if there s data it's not replicating the containers according to the data in the database, it still…

mordecai
- 127
- 1
- 10
1
vote
1 answer
How can I use List of Scaffold in Scaffold body in Flutter?
First of all, in my app when the user draws something and and then press save button, the user user should see the same drawing on his/her phone but on a shorter scale, because he/she can draw more drawings and save them, I wanted to show all of…

Mayur Agarwal
- 1,448
- 1
- 14
- 30
1
vote
2 answers
Code pattern when wanting to use Flutter's LayoutBuilder inside a Column
I have a Column with two elements A and B. A has a fixed height and B is supposed to fill the rest of the screen. Within B I want to make layout decisions based on the height of B via a LayoutBuilder().
If I using the Column()-widget normally the…

Christian
- 25,249
- 40
- 134
- 225
0
votes
0 answers
Unnecessary rebuild of a parent widget upon first detected click on LayoutBuilder/Canvas in Flutter
I am currently writing an application where I need to draw a bunch of shapes using CustomPainter and LayoutBuilder on the screen.
My CustomPainter is basically wrapped with a stateful widget in order to change the color and any other states after…

anonon
- 31
- 1