class Frame {
final double x;
final double y;
final double width;
final double height;
const Frame.only({this.x, this.y, this.width, this.height});
factory Frame(double x){
return Frame.only(x:x);
}
}
Frame(123.0);
Frame.only();
class Frame {
final double x;
final double y;
final double width;
final double height;
const Frame.only({this.x, this.y, this.width, this.height});
factory Frame(double x){
return Frame.only(x:x);
}
}
Frame(123.0);
Frame.only();
本文标题:flutter命名构造函数和工厂构造函数
本文链接:https://www.haomeiwen.com/subject/ertsnhtx.html
网友评论