Created
August 24, 2019 00:36
-
-
Save HansMuller/d06899a03337aab454cee53945eb1708 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'; | |
| class HomePage extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| extendBodyBehindAppBar: true, | |
| appBar: AppBar( | |
| backgroundColor: Colors.red.withOpacity(0.5), | |
| elevation: 0.0, | |
| title: Text('Semi-Transparent AppBar Background'), | |
| ), | |
| body: Container( | |
| color: Colors.blue.withOpacity(0.25), | |
| child: ListView.builder( | |
| itemCount: 30, | |
| itemBuilder: (context, index) { | |
| return Container( | |
| color: Colors.primaries[index % Colors.primaries.length].withOpacity(0.5), | |
| child: ListTile( | |
| title: Text('Item $index'), | |
| ), | |
| ); | |
| }, | |
| ), | |
| ), | |
| ); | |
| } | |
| } | |
| void main() { | |
| runApp(MaterialApp(home: HomePage())); | |
| } |
How can I use this in my project? The property extendBodyBehindAppBar is unknown
Yes you can use it, but the feature is not yet in the stable version, so
just clone the flutter repo instead of using the stable version (overwrite
the flutter folder with the GitHub repo)
…On Thu, Sep 26, 2019, 10:28 nils ***@***.***> wrote:
How can I use this in my project? The property extendBodyBehindAppBar is
unknown
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://gist.github.com/d06899a03337aab454cee53945eb1708?email_source=notifications&email_token=ADLUHNSLSXD6LUHLQUTXTH3QLRXEHA5CNFSM4I2TQGK2YY3PNVWWK3TUL52HS4DFVNDWS43UINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAFZNSM#gistcomment-3037990>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADLUHNXH3BZKT2RFQAGZQADQLRXEHANCNFSM4I2TQGKQ>
.
Alright, thanks! Not sure I follow exactly but it might be a bit overkill for my project anyways. Looking forward to seeing it released though
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, it works beautifully but strangely enough is not compatible with padding
so if you add on line 16 this:
then you get this result (the list starts from the status bar instead of from the appbar)