import 'package:flutter/material.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({Key? key}) : super(key: key); // This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, title: 'Flutter Demo', theme: ThemeData(primarySwatch: Colors.blue, brightness: Brightness.light), home: const BasicDemo(), ); } } class BasicDemo extends StatelessWidget { const BasicDemo({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return Scaffold( body: CustomScrollView( slivers: [ SliverAppBar( pinned: true, expandedHeight: 300.0, flexibleSpace: const FlexibleSpaceBar( centerTitle: true, titlePadding: EdgeInsets.only(bottom: 25), title: Text('Title here'), ), bottom: PreferredSize( preferredSize: const Size.fromHeight(0.0), child: Transform.translate( offset: const Offset(0, 50), child: TextButton( child: const Text("Click Here"), onPressed: () { debugPrint("Click Here"); }, ), ), ), ), const SliverPadding( padding: EdgeInsets.only(top: 50), ), SliverList( delegate: SliverChildListDelegate( List.generate( 20, (index) { return Padding( padding: const EdgeInsets.all(5.0), child: ListTile( title: Text( '$index', style: Theme.of(context) .textTheme .headline5 ?.copyWith(color: Colors.black), ), onTap: () {}, ), ); }, ), ), ), ], ), ); } }