Last active
April 24, 2025 12:36
-
-
Save lukepighetti/e7f7c9f1121b82949e5d4fd44af3d68e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(), | |
], | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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