alexeyinkin commented on code in PR #24338:
URL: https://github.com/apache/beam/pull/24338#discussion_r1043292258
##########
playground/frontend/lib/modules/examples/example_selector.dart:
##########
@@ -118,20 +85,29 @@ class _ExampleSelectorState extends State<ExampleSelector>
);
}
- OverlayEntry createExamplesDropdown() {
- Offset dropdownOffset = findDropdownOffset(key: selectorKey);
+ Future<void> _loadCatalogIfNot(PlaygroundController controller) async {
+ try {
+ await controller.exampleCache.loadAllPrecompiledObjectsIfNot();
+ } on Exception catch (ex) {
+ PlaygroundComponents.toastNotifier.addException(ex);
+ }
+ }
+
+ OverlayEntry _createExamplesDropdown() {
+ Offset dropdownOffset = findDropdownOffset(key: _selectorKey);
return OverlayEntry(
builder: (context) {
return ChangeNotifierProvider<PopoverState>(
create: (context) => PopoverState(false),
builder: (context, state) {
- return Consumer<PlaygroundController>(
- builder: (context, playgroundController, child) => Stack(
+ return ChangeNotifierProvider<PlaygroundController>.value(
+ value: widget.playgroundController,
Review Comment:
There is no more `PlaygroundController` above in the tree.
This is what I mean when stressing compile-time guarantee.
--
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]