return Scaffold(
appBar: PreferredSize(
preferredSize: Size.fromHeight(150),
child: AppBar(
elevation: 0,
leading: IconButton(
icon: Icon(Icons.arrow_back),
color: Colors.black,
onPressed: () {},
),
actions: [
TextButton(
onPressed: () {},
child: Text(
'Skip',
style: GoogleFonts.halant(
textStyle: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
color: Colors.black,
),
),
),
),
],
backgroundColor: Colors.amber,
title: Text(
'Sign up',
style: GoogleFonts.halant(
textStyle: TextStyle(
fontSize: 32,
fontWeight: FontWeight.w500,
color: Colors.black
),
),
),
centerTitle: true,
Question posted in Android Studio
The official documentation can be found here.
The official documentation can be found here.
2
Answers
you don’t need to use
AppBar
widget to do this, you need to make it manually by assigning aContainer
to thebody
of theScaffold
and assign abackGroundImage
to theContainer
. then give theContainer
aColumn
as a child and using aRow
widget on the top and give it the three children ( the skip text – sign up text – the arrow ) you get theAppBar
and for whiteContainer
give it aBorderRadius.only
This is a full example of what you want: