Created
July 30, 2018 19:53
-
-
Save diegoveloper/f381cbc8a4b08a150bff5392717b4192 to your computer and use it in GitHub Desktop.
This file contains 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'; | |
import 'package:flutter_samples/hero_animations/main_hero_animations.dart'; | |
class Page2 extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
body: Padding( | |
padding: EdgeInsets.all(30.0), | |
child: Stack( | |
children: <Widget>[ | |
Align( | |
alignment: Alignment.topCenter, | |
child: Hero( | |
tag: "hero1", | |
child: Container( | |
padding: EdgeInsets.only(top: 50.0), | |
height: 250.0, | |
width: 250.0, | |
child: CustomLogo(), | |
), | |
), | |
), | |
Align( | |
alignment: Alignment.centerRight, | |
child: Hero( | |
tag: "hero2", | |
child: Material( | |
color: Colors.transparent, | |
child: Text("Hero Text", style: TextStyle(fontSize: 40.0),)), | |
), | |
), | |
OutlineButton( | |
onPressed: () => Navigator.of(context).pop(), | |
child: Icon(Icons.close), | |
) | |
], | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment