0
I receive data from an API of The Movie DB, of which I must take an image link,the movie poster. The problem is that the data of this image only generates me half the link.
Code:
class FilmePresentation extends StatelessWidget {
final Map _FilmeData;
FilmePresentation(this._FilmeData);
@override
Widget build(BuildContext context) {
var link = ["http://image.tmdb.org/t/p/w185/"];
return Scaffold(
appBar: AppBar(
title: Text(_FilmeData["title"]),
backgroundColor: Colors.pink,
),
backgroundColor: Colors.white,
body: Center(
child: Image.network(_FilmeData["poster_path"]),
),
);
}
}
note that I tried to create a "link" variable that has the first part of the link and the vector ["poster_path"] contains the second part. However, I have tried the following means and I cannot concatenate:
_FilmeData+link+["poster_path"] //ou
_FilmeData[link]["poster_path"] //ou
_FilmeData+"http://image.tmdb.org/t/p/w185/"+["poster_path"]
there is some way to put this link in the ["poster_path"]?
My friend you’re to be congratulated
– Lucas Pires
@Lucaspires if useful, mark the answer as accepted :)
– Julio Henrique Bitencourt