I'm a beginner in Flutter. I'm trying to make widget like this. Unfortunately I still struggled to implement them. I've tried using flexible space bar with some alignment in the container. But it didn't go as what I want. Is there any way to put that card on a SliverAppBar? Here is my code.
Header.dart
Widget build(BuildContext context) {
return SliverAppBar(
expandedHeight: 25.h,
backgroundColor: celticBlue,
actions: [
IconButton(
icon: const Icon(Icons.more_vert),
onPressed: () {},
),
],
title: Text('Quran', style: whiteHeading16),
centerTitle: true,
shadowColor: danube,
pinned: true,
elevation: 1,
shape: const ContinuousRectangleBorder(
borderRadius: BorderRadius.only(
bottomLeft: Radius.elliptical(100, 50),
bottomRight: Radius.elliptical(50, 100),
),
),
flexibleSpace: Padding(
padding: const EdgeInsets.all(25),
child: Container(
color: Colors.redAccent,
alignment: Alignment.bottomCenter,
height: 15.h,
),
),
);
}
Here's the result