Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.7k views
in Technique[技术] by (71.8m points)

Flutter 有的函数的参数为什么为常量?

例如:

BorderSide BorderSide({
 Color color = const Color(0xFF000000), 
 double width = 1.0, 
 BorderStyle style = BorderStyle.solid
})

BorderSide 这个内置函数中 color的值就是 const; const 声明的值不是常量么,这样写的意义是什么


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...