Questions tagged [flutter-appbar]

For questions relating to the AppBar class of flutter material or related designs. Use this tag in combination with the general [flutter] tag. If your question applies to Flutter more generally, use the [flutter] tag only.

An app bar consists of a toolbar and potentially other widgets, such as a TabBar and a FlexibleSpaceBar. App bars typically expose one or more common actions with IconButtons which are optionally followed by a PopupMenuButton for less common operations (sometimes called the "overflow menu").

App bars are typically used in the Scaffold.appBar property, which places the app bar as a fixed-height widget at the top of the screen. For a scrollable app bar, see SliverAppBar, which embeds an AppBar in a sliver for use in a CustomScrollView.

215 questions
6
votes
1 answer

Expandable AppBar (onPressed)

How do I achieve this effect? I wanted to expand my AppBar after clicking on the dates.
João Martins
  • 706
  • 1
  • 8
  • 20
5
votes
2 answers

How to create Linear Gradient in App Bar Flutter?

I am trying to add a linear gradient in the appBar, but so far i didnt managed how to do it. Does anybody know how can i add this in my appBar? Thank you decoration: BoxDecoration( gradient: LinearGradient( …
5
votes
4 answers

How to center vertically a container child in flutter

I am trying to center vertically a child of a container appBar which is text, I am new to flutter so what am I missing here. It is only being centered horizontally The widget import 'package:flutter/material.dart'; class MyAppbar extends…
bihire boris
  • 1,530
  • 3
  • 19
  • 44
5
votes
2 answers

flutter TabBarView doesn't change by TabController by tapping on tabs/tabs doesn't change when swiping but tabbarview does

i have been trying lots of solutions on changing appbar title with tabs, and i solved it but now there is a small problem; the appbar does change with the tabs when the tabs are pressed, but not the tabbarview. Swiping left or right on the tab bar…
Wei Xiong
  • 167
  • 4
  • 13
5
votes
2 answers

Navigating to another page from drawer menu and setting title to app bar

i am new to flutter and would like someone to help me with code i found in github that i would like to use. take a look at the link below https://github.com/JohannesMilke/drawer_example this is an example of a navigational drawer. i like the way…
yoohoo
  • 1,147
  • 4
  • 22
  • 39
4
votes
2 answers

How to prevent Overlay from covering AppBar?

I have a custom widget positioned in a Stack. This custom widget creates an OverlayEntry linked to its position and inserts it into an Overlay. The problem is that this overlay floats above the AppBar and the FloatingActionButton. How to put…
Warwick
  • 1,200
  • 12
  • 22
4
votes
1 answer

Flutter: How to automatically update AppBar bottom height depending on child height?

AppBars bottom property is of type PreferredSizeWidget, so I provide PreferredSize widget which requires in preferredSize property specify actual size to use. But I need not static number but automatically calculated depending on child, which in my…
D31
  • 112
  • 1
  • 10
4
votes
1 answer

How to center the IconButton of Appbar in flutter

I working with a flutter application and see a problem in the App bar. The icon button is not at the center of the App bar. This is my code. appBar: AppBar( automaticallyImplyLeading: false, actions: [ IconButton( …
Rohit Nishad
  • 2,570
  • 2
  • 22
  • 32
3
votes
3 answers

Positioning custom AppBar without SafeArea

I am trying to create a custom AppBar, with a polygon instead of the bar, I already have something: As you can see, on some screens the bar is to high, because the SafeArea differs. I did not use: child: Scaffold( appBar: MyCustomBar(), …
Emaborsa
  • 2,360
  • 4
  • 28
  • 50
3
votes
2 answers

Making telegram's AppBar with flutter

I am trying to make an app bar exactly like what you see here However as I'm new to flutter I do not have any idea how I can make it, I already tried MainCollapsingToolbar but it didn't get me anywhere. Does anyone have any idea if can I make it?
3
votes
2 answers

Cannot apply textTheme inside AppBarTheme in flutter

I am trying to use textTheme inside AppBarTheme in flutter but when I run my application, nothing changes. Also my editor says that 'textTheme' is deprecated and shouldn't be used. This property is no longer used, please use toolbarTextStyle and…
3
votes
2 answers

How can i make shared appBar and bottomNavigation across flutter screens

i am new to flutter and i would like to have a shared appBar and bottomNavigationBar the way i am currently using is implementing them in spearte files and importing them in each screen but i need to make one screen contains the appbar and the…
Jed
  • 171
  • 3
  • 11
3
votes
2 answers

Flutter Modal Bottom Sheet is not working with a Popup Menu Button inside an AppBar

I've got the problem that the Method "showModalBottomSheet" is not working inside the "onTap" function of a Popup Menu Item. The Modal Bottom Sheet is not showing up when clicking on a Popup Menu Entry. Here is my Code inside the actions parameter…
3
votes
1 answer

Custom SliverAppBar in Flutter

I want to add custom SliverAppBar in flutter like below The SliverAppBar I want but I am only able to do as following The SliverAppBar I get cheak the sliver animation at https://dribbble.com/shots/11466567-Music-Player my code for SliverAppBar is…
PRATIK PAWAR
  • 302
  • 1
  • 2
  • 10
3
votes
1 answer

Flutter.. How to implement a Custom App Bar - Usage and Re-Usage

I've created a Custom App Bar (CAB) for my Flutter mobile app that should appear at the top of every page. Right now the the entire code is copy/pasted on every page. But is there a way to create the CAB component once and place it as a…
codeName
  • 111
  • 1
  • 9
1
2
3
14 15