1
我在app.config.dart创建了一个const对象用下面的代码:如何从const对象中获取值?
const configObj = const {
'webServer': const {
'appBaseHref' : "/"
},
'auth0': const {
'apiKey': "foo",
'domain': "bar",
'callbackUrl': "callback"
}
};
现在我的主要镖文件I导入app.config.dart
,我尝试到那里的价值观和理念,现在该怎么做。 configObj.auth0.apiKey
产生错误EXCEPTION: Class 'ImmutableMap' has no instance getter 'auth0'
。
那么我该怎么做?
谢谢!