Created
June 24, 2019 12:28
-
-
Save sbis04/90012a6ccdace4600a6477b4c511d329 to your computer and use it in GitHub Desktop.
flutter_os_start_1
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
WatchShape( | |
builder: (context, shape) { | |
var screenSize = MediaQuery.of(context).size; | |
final shape = InheritedShape.of(context).shape; | |
if (shape == Shape.round) { | |
// boxInsetLength requires radius, so divide by 2 | |
screenSize = Size(boxInsetLength(screenSize.width / 2), | |
boxInsetLength(screenSize.height / 2)); | |
} | |
var screenHeight = screenSize.height; | |
var screenWidth = screenSize.width; | |
...... | |
}, | |
), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment