Skip to content

Instantly share code, notes, and snippets.

@Rahiche
Created December 18, 2018 21:41
Show Gist options
  • Save Rahiche/eb83ba4ea1bc30ea4a99bff36714e68e to your computer and use it in GitHub Desktop.
Save Rahiche/eb83ba4ea1bc30ea4a99bff36714e68e to your computer and use it in GitHub Desktop.
// how much space is available compared to the inital one {appBarHeight}
// in my example : appBarHeight = 200.0
double percent = ((constraints.maxHeight - kToolbarHeight) *
100 /
(appBarHeight - kToolbarHeight));
//we will rotate from 0 to 90
double angle = percent * 90 / 100;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment