miamihotline commented on a change in pull request #16910:
URL: https://github.com/apache/beam/pull/16910#discussion_r813852875
##########
File path: playground/frontend/lib/pages/playground/states/examples_state.dart
##########
@@ -82,31 +87,41 @@ class ExampleState with ChangeNotifier {
return example;
}
- _loadCategories() async {
- sdkCategories = await _exampleRepository.getListOfExamples(
- GetListOfExamplesRequestWrapper(sdk: null, category: null),
- );
- await _loadDefaultExamples(sdkCategories);
- notifyListeners();
+ _loadCategories() {
+ _exampleRepository
+ .getListOfExamples(
+ GetListOfExamplesRequestWrapper(sdk: null, category: null),
+ )
+ .then((map) => setSdkCategories(map));
}
changeSelectorVisibility() {
isSelectorOpened = !isSelectorOpened;
notifyListeners();
}
- _loadDefaultExamples(sdkCategories) async {
+ loadDefaultExamples() async {
+ if (defaultExamplesMap != null) {
+ return;
+ }
Review comment:
Sure, I'll add a new line in the next commit.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]