Skip to content

Instantly share code, notes, and snippets.

@apptects
Created April 8, 2019 10:45
Show Gist options
  • Select an option

  • Save apptects/d0a87f48d07afaef4933da66e56f9c83 to your computer and use it in GitHub Desktop.

Select an option

Save apptects/d0a87f48d07afaef4933da66e56f9c83 to your computer and use it in GitHub Desktop.
Navigate to AlbumDetail route
class _TrackButtonShowAlbumDetails extends StatelessWidget {
final TrackItem _trackItem;
_TrackButtonShowAlbumDetails(this._trackItem);
@override
Widget build(BuildContext context) {
return IconButton(
icon: Icon(Icons.dehaze),
color: Theme.of(context).buttonColor,
iconSize: 20,
onPressed: () {
Navigator.push(context, MaterialPageRoute(builder: (context) => AlbumDetail(_trackItem)));
}
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment