link showing what im talking about: https://files.catbox.moe/uwo3ax.png
class HomePage extends StatelessWidget {
const HomePage({super.key});
u/override
Widget build(BuildContext context) {
return DefaultTabController(
length: 3,
child: Scaffold(
bottomNavigationBar: SafeArea(
child: PreferredSize(
preferredSize: const Size.fromHeight(40),
child: ClipRRect(
borderRadius: const BorderRadius.all(Radius.circular(10)),
child: Container(
height: 40,
margin: const EdgeInsets.symmetric(horizontal: 20),
decoration: BoxDecoration(
borderRadius: const BorderRadius.all(Radius.circular(10)),
),
child: TabBar(
splashFactory: NoSplash.splashFactory,
indicatorSize: TabBarIndicatorSize.tab,
dividerColor: Colors.transparent,
overlayColor: WidgetStateProperty.all(Colors.transparent),
unselectedLabelColor: Theme.of(context).colorScheme.outline,
indicator: BoxDecoration(
borderRadius: const BorderRadius.all(Radius.circular(10)),
),
enableFeedback: true,
tabs: const [
Tabr(title: 'profile', count: 0),
Tabr(title: 'swipe', count: 0),
Tabr(title: 'likes', count: 0),
],
),
),
),
),
),
body: SafeArea(
child: TabBarView(
physics: NeverScrollableScrollPhysics(),
children: [
Text("data"),
Stack(
children: [
Profile(),
Container(
height: MediaQuery.sizeOf(context).height,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
const Color.fromARGB(0, 255, 255, 255),
Theme.of(context).colorScheme.onSecondary,
],
stops: [0.7, 1.0],
),
),
),
],
),
Text("data")
],
),
),
),
);
}
}
class Profile extends StatelessWidget {
const new({
super.key,
});
u/override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
children: [
Container(
decoration: BoxDecoration(
color: Colors.transparent,
borderRadius: BorderRadius.circular(30),
image: DecorationImage(
image: NetworkImage(
'https://is1-ssl.mzstatic.com/image/thumb/PurpleSource221/v4/0c/49/cd/0c49cdf7-a4f8-3f89-defb-89684545719d/Screen_01_ASENUS.png/230x498bb.webp',
),
fit: BoxFit.cover,
),
),
height: 470,
width: 400,
),
Align(
alignment: Alignment.centerLeft,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(left: 16.0, top: 8.0),
child: Text(
'Jarvis, 24',
style: TextStyle(fontSize: 30, fontWeight: FontWeight(700)),
),
),
Padding(
padding: const EdgeInsets.only(left: 16, bottom: 8.0),
child: Text(
'Wisconsin, USA',
style: TextStyle(fontSize: 16),
),
),
],
),
),
Align(
alignment: Alignment.centerLeft,
child: Padding(
padding: const EdgeInsets.only(
left: 16.0,
bottom: 4.0,
right: 16.0,
),
child:
Flexible(
child: SingleChildScrollView(
child: Text(
'''This creates a clear, simple decision: Do I like this person or not? That’s it. There are no complicated menus or extra steps. Each interaction requires only a split-second judgment.
By presenting profiles as a stack of cards, Tinder also eliminates the sense of overwhelm that comes from browsing large lists. Users feel like they are simply flipping through possibilities, one by one.''',
style: TextStyle(
fontSize: 20,
),
),
),
),
),
),
],),
);
}
}
class Tabr extends StatelessWidget {
const new({
super.key,
required this.title,
required this.count,
});
final String title;
final int count;
u/override
Widget build(BuildContext context) {
return Tab(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(title, overflow: TextOverflow.ellipsis, style: TextStyle(
fontSize: 25, fontWeight: FontWeight(750))),
count > 0 ?
Container(
margin: const EdgeInsetsDirectional.only(start: 0, top: 3),
padding: const EdgeInsets.all(3),
decoration: BoxDecoration(
color: const Color.fromARGB(0, 255, 0, 0),
shape: BoxShape.circle,
),
child: Center(
child: Text(
"●",
style: const TextStyle(
color: Color.fromARGB(255, 255, 1, 1),
fontSize: 10,
)
)
)
)
: const SizedBox(width: 0, height: 0)
],
),
);
}
}
Trying to add a gradient starting from the bottom of the bottom navbar to hide overflowing text.