3.3 图片的混合模式和重复
1.源代码
import 'package:flutter/material.dart';
void main () => runApp(MyApp());
class MyApp extends StatelessWidget{
@override
Widget build(BuildContext context ){
return MaterialApp(
title:'All Widget Usages',
home:Scaffold(
body:
Center(
child:
Container(
margin: EdgeInsets.all(10.0),
width: 220.0,
height: 220.0,
color: Colors.blue,
child: Image.network("https://img.ivsky.com/img/tupian/t/201411/27/weixiao_de_ningmeng_3d_sheji.jpg",
fit: BoxFit.none,
color: Colors.red,
colorBlendMode: BlendMode.color,
repeat: ImageRepeat.repeat,
),
),
)
),
);
}
}
2.解释源代码
import 'package:flutter/material.dart';
void main () => runApp(MyApp());
class MyApp extends StatelessWidget{
@override
Widget build(BuildContext context ){
return MaterialApp(
title:'All Widget Usages',
home:Scaffold(
body:
Center(
child:
Container(
margin: EdgeInsets.all(10.0),
width: 220.0,
height: 220.0,
color: Colors.blue,
child: Image.network("https://img.ivsky.com/img/tupian/t/201411/27/weixiao_de_ningmeng_3d_sheji.jpg",
fit: BoxFit.none,
color: Colors.red,
colorBlendMode: BlendMode.color,
repeat: ImageRepeat.repeat,
),
),
)
),
);
}
}
3.效果图