Created
May 7, 2020 13:32
-
-
Save mamedshahmaliyev/139e8d6728a65a53f6384768bd170917 to your computer and use it in GitHub Desktop.
flutter overlay with opacity
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
Stack( | |
children: <Widget>[ | |
Column( | |
children: <Widget>[ | |
Container(), | |
Container(), | |
], | |
), | |
_overlay(True) | |
], | |
), | |
Positioned _overlay(bool show){ | |
return Positioned( | |
right: show ? 5.0 : double.infinity, | |
top: 0.0, | |
left: 0.0, | |
bottom: 0.0, | |
child: Container( | |
color: Colors.white70.withOpacity(0.7), | |
), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment