Questions tagged [flutter-layout]

Layouts in Flutter - Google’s UI toolkit for building natively compiled applications for mobile, web, and desktop from a single codebase, refer to the classes called widgets used to build UIs, both for layout and UI elements. Layouts may be in the form of single-child or multi-child layout widgets. Use this tag for all types of layout widgets used in Flutter.

Layouts in Flutter- Google’s UI toolkit for building natively compiled applications for mobile, web, and desktop from a single codebase, refer to the classes called widgets used to build UIs, both for layout and UI elements.

Layouts may be in the form of single-child or multi-child layout widgets. Use this tag for all types of layout widgets used in Flutter.

13064 questions
4
votes
3 answers

Add mandatory(*) for labelText in Input Decoration in Flutter

I want to add asteric sign in InputDecoration labelText and change color(like red) of it so that user understand easily this field is required. TextField( autofocus: true, controller: _nameCtrlr, keyboardType: TextInputType.text, …
Basher Sarkar
  • 104
  • 3
  • 13
4
votes
1 answer

The argument type 'Future' can't be assigned to the parameter type 'Widget'.dart

Here I have to use pdfImageFromImageProvider function to stateless widget. So, Is it possible to resolve this issue using stateless widget? Future getWidgetAsync(double size) async { PdfImage val = await pdfImageFromImageProvider( pdf:…
jazzbpn
  • 6,441
  • 16
  • 63
  • 99
4
votes
3 answers

Flutter image in SizedBox is overridden by parent Container

I am trying to place an image in the center of a box (container with border). The image size is set by surrounding it with a sized box, the the border or box is being created by surrounding that with a container with box decoration like this: …
Nicholas Muir
  • 2,897
  • 8
  • 39
  • 89
4
votes
2 answers

How to make an IconPicker, a Widget to list icons for the user to pick

I'd like to use an IconPicker where the user can search for an Icon and select it. If I search for "arrow" it would give me: arrow_upward, arrow_back, arrow_back_ios and so on. Can you link me a library that can do this? or give an idea of how I can…
Mateus Gomes
  • 45
  • 2
  • 4
4
votes
3 answers

Flutter: How to make telegram type bubble in chat message

Current output: Expected output: Code: Align( alignment: Alignment.topRight, child: Container( padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 20), margin: EdgeInsets.only(right: 12, top: 8), decoration:…
user6274128
4
votes
1 answer

Callback from child to parent Flutter

I am new to flutter. I am trying to separate the bottomappbar widget from my home screen. Thing is, it is I need to send back the index to the home screen file so I can switch the body of the screen. I've been learning BloC lately, but I think it is…
user2876983
  • 169
  • 1
  • 4
  • 10
4
votes
1 answer

Positioning widgets relatively

I'm using Positioned widget nested in Stack widget and giving it the values right and bottom. It worked nicely until I tried it on other screens with different sizes as I should've expected. After Googling and stackoverflow-ing all the answers I've…
4
votes
0 answers

how to connect two widgets in flutter

I want to draw a Straight line which connect two widgets and it should be connected by user. what i tried. import 'package:flutter/material.dart'; class Homedemo extends StatefulWidget { @override _HomedemoState createState() =>…
Viren V Varasadiya
  • 25,492
  • 9
  • 45
  • 61
4
votes
1 answer

How to fix top row and first column to be always visible in a datatable

I have a data table that scrolls horizontally and vertically due to the amount of data available. I want the top row which specifies the column names to always be visible when scrolling down vertically and the leftmost column to always be visible…
user3599895
  • 275
  • 1
  • 2
  • 13
4
votes
2 answers

Make container grow to fit width of sibling in column

I have two Container widgets in a Column, each containing a Text widget. I want the Container with the shortest text to expand to match the width of the other container containing the longer text. The container with the longer text should wrap the…
Magnus
  • 17,157
  • 19
  • 104
  • 189
4
votes
1 answer

How to change font size on flutter using a slider indicator?

The Code below only changes the slider from 1-10, how do you change the text while changing the slider as well in Flutter? The Text is fetched from an API. double _value = 0.0; [enter image description here][1] bool _slider = false; child: _slider…
Nikhil
  • 77
  • 1
  • 10
4
votes
1 answer

How to put divider between few of list items in ListView.separated

I want to put google ads after specific number of items list or in between the items list in ListView.separated. I have attached an image to make it clear how I want to do it: Source of the image is: this article
maxwolf929
  • 55
  • 1
  • 7
4
votes
1 answer

Flutter Animated List Showing The List Element Twice When Animating Remove Item

I created a list to try an display the issue I am encountering with flutter. Every time you click on a list item button, the button below it is removed. As you can see from the gif below when you click on the button it creates a second copy of the…
Nicholas Muir
  • 2,897
  • 8
  • 39
  • 89
4
votes
1 answer

How to animate container inside a list

I've a list of containers and i want to animate the container. For example, change his height/width, and change the content of the container. What I've done so far is this: containerHeight = MediaQuery.of(context).size.height * 0.20; body:…
Noam
  • 485
  • 1
  • 7
  • 18
4
votes
1 answer

How to change the box shadow height, width and opacity in flutter?

The Button in this first image has a blurred shadow with a less width than the button. But when I am trying to apply the design in my flutter app it looks different and also I am not able to set the width, height and opacity of ab box shadow. How…
Tushar Rai
  • 2,371
  • 4
  • 28
  • 57