Widget customWidget(int position){
return Transform(
transform: Matrix4.identity()..rotateY(position),
child: Container(
color: position % 2 == 0 ? Colors.lightBlueAccent: Colors.black87,
),
)
}
Matrix4.identity()..rotateY(position) 中的.. 是什么?
最佳答案
来自官方文档
Cascades (..) allow you to make a sequence of operations on the same object.
In addition to function calls, you can also access fields on that same object. This often saves you the step of creating a temporary variable and allows you to write more fluid code.
关于flutter - dart 中的 .. 运算符是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56521571/