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
2 answers

Flutter - What's the best practice to create a fixed AppBar during navigation

In native android development, it is common to use FragmentTransaction to create a navigation animation, where the actionBar's position stays fixed (but actionBar's content changed), and the fragment beneath actionBar performs a transition animation…
First_Strike
  • 1,029
  • 1
  • 10
  • 27
4
votes
2 answers

Flutter tween basic animation is not working inside `FutureBuilder`

Flutter tween basic animation is not working inside FutureBuilder I have created a image gallery page using gridview.builder , but the animation doesnt works inside futurebuilder for some reason. I tried same animation on an static image directly…
4
votes
3 answers

How to remove Padding from DrawerHeader

Here's my DrawerHeader : class MyDrawerHeader extends StatefulWidget { @override _MyDrawerHeaderState createState() => _MyDrawerHeaderState(); } class _MyDrawerHeaderState extends State { @override Widget build(BuildContext…
Michel Feinstein
  • 13,416
  • 16
  • 91
  • 173
4
votes
3 answers

How to use a specific font from a list of fonts specified in a asset family in pubspec.yaml

Let's say i have added following lines to the pubspec.yaml file fonts: fonts: - family: GreatVibes fonts: - asset: fonts/GreatVibes-Regular.ttf - asset: fonts/GreatVibes-Bold.ttf I am using it in my app with the following lines of code.…
4
votes
1 answer

Flutter: how to adjust/override properties of the Flutter core code without copying entire files?

This question is related to the following StackOverflow issue: bottom sheet with initial height half of screen and if it scroll then height is increase to full screen It is about a constraint that is set within the Flutter code about bottom sheets,…
Menno
  • 135
  • 1
  • 5
4
votes
2 answers

How to use Interface in Flutter?

I have two widgets, widget1 and widget2. Widget1: I have added one Drop-down in this widget. now I want to update widget2's views properties (like color and name) on drop-down item changes event. So, Can I use interface to fulfill the above…
Akash Patel
  • 3,091
  • 3
  • 15
  • 23
4
votes
2 answers

How to implement time text wrapping behaviour in chat bubble on Flutter

A lot of native mobile chat messengers, like telegram, whatsapp, etc, implement this wrapping behaviour: wrapping time label to a new line when there is no enough room for text. Simple chat bubble consist of two parts: Text and time label. In simple…
nail
  • 715
  • 7
  • 20
4
votes
2 answers

How to remove space between image and text in Flutter

I want to display the text (Facebook) exactly below the image (fb icon) without any spacing. Below is the code as of now : @override Widget build(BuildContext context) { return Scaffold( // prevent pixel overflow when typing …
Darshan
  • 10,550
  • 5
  • 49
  • 61
4
votes
2 answers

Change color of DataTable rows and columns

I have a small data table and i want to change the column and row background color. But unfortunately there is no property in DataColumn or DataRow to achieve this. The only way i found is through modifying the label of DataColumn DataColumn(label:…
M.Ali
  • 8,815
  • 5
  • 24
  • 42
4
votes
2 answers

Get values of dynamic list of widgets - flutter

I've managed to make a dynamic questionnaire connecting flutter with Firestore. My custom Question widgets are just a Text() holding the string of the question, and a Slider() so the user can give an answer from 1 to 5 Now that the questions are…
gantonioid
  • 367
  • 1
  • 2
  • 15
4
votes
4 answers

How to set my app to landscape mode in Flutter?

I want to set my app's default orientation as landscape like when I open a game app such as clash of clans or mobile legend. How can I do that in flutter?
Rinzin
  • 53
  • 2
  • 7
4
votes
2 answers

Create gradient between background colors of PageView pages in Flutter?

I have a PageView with 4 pages, set up like so: PageView( children: [ _buildPage(color: Colors.orange[600]), _buildPage(color: Colors.deepPurple[400]), _buildPage(color: Colors.yellow[300]), _buildPage(color:…
Rafael Uchoa
  • 115
  • 3
  • 10
4
votes
1 answer

horizontal list view in the custom scroll google flutter

I am trying to create the screen like the below sketch i am using custom scroll view but in the custom scroll I am not able to get the horizontal list view i tried using the list view in the custom scroll view complete view is not displaying but if…
ayub baba
  • 389
  • 2
  • 8
  • 14
4
votes
2 answers

Flutter searchbar layout issue BoxConstraints forces an infinite width

I am trying to imitate a searchview similar to attached image, but I am getting following error. I can achieve this using ListTile but I can't set padding to the icons or TextField. So I am trying to achieve this using Row widget. Please have a look…
Ammy Kang
  • 11,283
  • 21
  • 46
  • 68
4
votes
1 answer

How to display RefreshIndicator at top with ListView.builder reverse:true

I'm building a simple messaging system, where the user will see a list of messages. I have a ListView.Builder with reverse:true since I want the list to appear at the bottom when they load the messaging page. When they pull down to scroll all the…
MrBlue
  • 53
  • 1
  • 5