Skip to content

Instantly share code, notes, and snippets.

@lukepighetti
Last active April 24, 2025 12:36
Show Gist options
  • Save lukepighetti/e7f7c9f1121b82949e5d4fd44af3d68e to your computer and use it in GitHub Desktop.
Save lukepighetti/e7f7c9f1121b82949e5d4fd44af3d68e to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'AppBar Example',
home: Scaffold(
backgroundColor: Colors.orange,
// CurvedAppBar
appBar: PreferredSize(
preferredSize: Size.fromHeight(kToolbarHeight + 40),
child: Column(
children: [
ColoredBox(
color: const Color(0xFF733C90),
child: AppBar(
title: Text("Example", style: TextStyle(color: Colors.white)),
backgroundColor: Colors.transparent,
),
),
Image.asset("assets/app-bar-bottom.png"),
],
),
),
body: SingleChildScrollView(
clipBehavior: Clip.none,
child: Column(
spacing: 8,
children: [
Placeholder(),
Placeholder(),
Placeholder(),
Placeholder(),
Placeholder(),
],
),
),
),
);
}
}
@lukepighetti
Copy link
Author

lukepighetti commented Apr 24, 2025

asset:

https://github.com/user-attachments/assets/bbe048fc-9276-4d6d-a80a-1fc26cc28163 app-bar-bottom.png

example:

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-04-24.at.08.32.21.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment