Skip to content

Instantly share code, notes, and snippets.

@Christopher2K
Last active January 26, 2020 16:43
Show Gist options
  • Save Christopher2K/5fe489dd03e89671c403448a2e4a0405 to your computer and use it in GitHub Desktop.
Save Christopher2K/5fe489dd03e89671c403448a2e4a0405 to your computer and use it in GitHub Desktop.
[Transparent App Bar] How to get a transparent app bar #flutter #dart
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.transparent,
elevation: 0,
title: const Text('Hello !'),
),
extendBodyBehindAppBar: true,
body: Container(
color: Colors.red,
width: double.infinity,
height: double.infinity,
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment