注意:冒号后面需要有空格
示例:
import ‘./Person.dart‘ as P; main(List<String> args) { P.Person p1 = new P.Person("xxx", 12); }
fn1() { print("111"); } fn2() { print("222"); } fn3() { print("333"); }
import ‘./Person.dart‘ show fn1; main(List<String> args) { fn1(); }
import ‘./Person.dart‘ hide fn1;
此时会引入排除fn1以外的所有库
原文:https://www.cnblogs.com/codexlx/p/13849664.html