Use named Image constructors (#5129)
Some folks didn't realize these existed and asked us to add them. By using them in examples, hopefully folks will discover them more easily.
This commit is contained in:
@@ -429,7 +429,7 @@ class CardCollectionState extends State<CardCollection> {
|
||||
if (_sunshine) {
|
||||
cardCollection = new Stack(
|
||||
children: <Widget>[
|
||||
new Column(children: <Widget>[new Image(image: new NetworkImage(_sunshineURL))]),
|
||||
new Column(children: <Widget>[new Image.fromNetwork(src: _sunshineURL)]),
|
||||
new ShaderMask(child: cardCollection, shaderCallback: _createShader)
|
||||
]
|
||||
);
|
||||
|
||||
@@ -157,8 +157,8 @@ class WeatherButton extends StatelessWidget {
|
||||
child: new InkWell(
|
||||
onTap: onPressed,
|
||||
child: new Center(
|
||||
child: new Image(
|
||||
image: new AssetImage(icon),
|
||||
child: new Image.fromAssetBundle(
|
||||
name: icon,
|
||||
width: _kWeatherIconSize,
|
||||
height: _kWeatherIconSize
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user