FlexibleSpace in Appbar شرح

Опубликовано: 04 Ноябрь 2024
на канале: Prog Lix
1,635
20

appBar: AppBar(

backgroundColor: Colors.transparent,
elevation: 0, // shadow
leading:BackButton(),
title: Text("Flutter App" , style:TextStyle() ),
titleSpacing: 50, // Distance between leading and title
centerTitle: true,
actions: [
IconButton(onPressed: (){}, icon: Icon(Icons.notifications) , ),
IconButton(onPressed: (){}, icon: Icon(Icons.favorite)),
IconButton(onPressed: (){}, icon: Icon(Icons.search)),
],

flexibleSpace: Container(



decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topRight,
end: Alignment.bottomLeft ,
colors:[Colors.red , Colors.deepPurple],
),
borderRadius: BorderRadius.all( Radius.circular(50.0)),

),
),

),