Posts

Showing posts from June, 2021

Transparent app bar and gradient background

Image
  In this blog, we will see how to make transparent app bar and how to give gradient background. Transparent app bar and gradient background gives an outstanding look to your application. Demo : To make the app bar transparent you can use the below code. extendBodyBehindAppBar: true, appBar: AppBar (   title: Text ( 'Dashboard' ) ,   leading: Icon (CupertinoIcons. arrow_left ) ,   actions: [     Icon (CupertinoIcons. bell ) ,     SizedBox (width: 10 , ) ,     Icon (CupertinoIcons. add ) ,     SizedBox (width: 10 , )   ] ,   backgroundColor: Colors. transparent ,   elevation: 0 , ) ,   Now, we will make a new stateless class named as GradientBackground(you can give any name of your choice) and in this class we will design the gradient background. Use decoration property inside Container widget, give BoxDecoration and inside it use gradient property. You can give...