Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed config initialization error #1916

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions modules/ensemble/lib/ensemble.dart
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,12 @@ class Ensemble extends WithEnsemble with EnsembleRouteObserver {
final configString =
await rootBundle.loadString('${path}/config/appConfig.json');
final Map<String, dynamic> configMap = json.decode(configString);
// Loop through the envVariables from appConfig.json file and add them to the envOverrides
configMap["envVariables"].forEach((key, value) {
envOverrides![key] = value;
});
if (configMap["envVariables"] != null) {
// Loop through the envVariables from appConfig.json file and add them to the envOverrides
configMap["envVariables"].forEach((key, value) {
envOverrides![key] = value;
});
}
} catch (e) {
debugPrint("appConfig.json file doesn't exist");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class LocalDefinitionProvider extends FileDefinitionProvider {
// Note: Web with local definition caches even if we disable browser cache
// so you may need to re-run the app on definition changes
var pageStr = await rootBundle
.loadString('${path}screens/${screenId ?? screenName ?? appHome}.yaml');
.loadString('${path}/screens/${screenId ?? screenName ?? appHome}.yaml');
if (pageStr.isEmpty) {
return ScreenDefinition(YamlMap());
}
Expand Down