// api.dart
dynamic publicApi(String address, dynamic payload) {
...
}
dynamic login(String email, String password) {
return publicApi('login', {'email': email, 'password': password});
}
// loginPage.dart
import 'api.dart' as api;
...
final response = await api.login(emailText.text, pwdText.text);
如何使此源文件仅导出login()而不导出publicApi()?
答案 0 :(得分:1)