Created
October 31, 2020 16:53
-
-
Save rrifafauzikomara/2dcb049f8462ea6a58a6709ced7b0231 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
class DetailPage extends StatelessWidget { | |
final String image; | |
final int id; | |
DetailPage({@required this.id, @required this.image}); | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar(), | |
body: NestedScrollView( | |
headerSliverBuilder: (context, isScrolled) { | |
return [ | |
Hero(tag: id, child: Image.network(image)); | |
]; | |
}, | |
body: // your body widget to show the data from the API. | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment