Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有什么方法可以引用 pubspec.yaml 中的预定义名称?
我正在尝试在插件使用的结构中引用“名称”键的值
name: tpoly description: A new Flutter application. # [...] flutter_launcher_name: name: *name
最后插件应该收到(基本上应该替换值),
flutter_launcher_name: name: tpoly
首先使用 . 声明变量&。在这里,foo例如:
&
foo
name: &foo tpoly
要参考,请使用*.
*
flutter_launcher_name: name: *foo