Skip to content

Instantly share code, notes, and snippets.

@duytq94
Last active June 25, 2019 03:45
Show Gist options
  • Save duytq94/54fb40b9473edc16448d6fa20f127f9f to your computer and use it in GitHub Desktop.
Save duytq94/54fb40b9473edc16448d6fa20f127f9f to your computer and use it in GitHub Desktop.
// Hero in screen current screen
child: new Hero(
createRectTween: createRectTween,
tag: planet.name,
child: new RadialExpansion(
maxRadius: kMaxRadius,
child: new Photo(
photo: planet.imagePath,
onTap: () {
Navigator.of(context).push(new PageRouteBuilder(
pageBuilder:
(BuildContext context, Animation<double> animation, Animation<double> secondaryAnimation) {
return new AnimatedBuilder(
animation: animation,
builder: (context, child) => new HeroAnimation2(planet, animation, durationSlowMode));
},
));
},
),
),
),
// Hero in next screen
child: new Hero(
createRectTween: createRectTween,
tag: planet.name,
child: new RadialExpansion(
maxRadius: kMaxRadius,
child: new Photo(
photo: planet.imagePath,
onTap: () {
Navigator.of(context).pop();
},
),
),
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment