我们如何调用以下方法:
MyClass obj = new MyClass(); obj.fun1().fun2()....;
就像Android中的alertDialog一样.
new AlertDialog.Builder(this).setTitle().create().show();
提前致谢.
这基本上就是你的方法返回的构建器模式,this
但你可以在Dart中做到更漂亮Method cascades
:
MyClass obj = new MyClass()
..fun1()
..fun2()
..fun3();