diff --git a/learning/tour-of-beam/frontend/lib/pages/tour/state.dart b/learning/tour-of-beam/frontend/lib/pages/tour/state.dart index 44fc9b5e23ef..5113397a8c28 100644 --- a/learning/tour-of-beam/frontend/lib/pages/tour/state.dart +++ b/learning/tour-of-beam/frontend/lib/pages/tour/state.dart @@ -123,16 +123,19 @@ class TourNotifier extends ChangeNotifier with PageStateMixin { return; } - await playgroundController.examplesLoader.load( - ExamplesLoadingDescriptor( - descriptors: [ - UserSharedExampleLoadingDescriptor( - sdk: sdk, - snippetId: taskSnippetId, - ), - ], - ), - ); + final sdk = Sdk.tryParse(_appNotifier.sdkId); + if (sdk != null) { + await playgroundController.examplesLoader.load( + ExamplesLoadingDescriptor( + descriptors: [ + UserSharedExampleLoadingDescriptor( + sdk: sdk, + snippetId: taskSnippetId, + ), + ], + ), + ); + } } // TODO(alexeyinkin): Hide the entire right pane instead. diff --git a/learning/tour-of-beam/frontend/lib/pages/tour/widgets/playground_demo.dart b/learning/tour-of-beam/frontend/lib/pages/tour/widgets/playground_demo.dart index 4b5347a24810..c8016a120caf 100644 --- a/learning/tour-of-beam/frontend/lib/pages/tour/widgets/playground_demo.dart +++ b/learning/tour-of-beam/frontend/lib/pages/tour/widgets/playground_demo.dart @@ -48,7 +48,6 @@ class PlaygroundDemoWidget extends StatelessWidget { first: SnippetEditor( controller: snippetController, isEditable: true, - goToContextLine: false, ), second: OutputWidget( playgroundController: playgroundController, diff --git a/learning/tour-of-beam/frontend/lib/repositories/client/cloud_functions_client.dart b/learning/tour-of-beam/frontend/lib/repositories/client/cloud_functions_client.dart index 4295115c8a4d..8986de435290 100644 --- a/learning/tour-of-beam/frontend/lib/repositories/client/cloud_functions_client.dart +++ b/learning/tour-of-beam/frontend/lib/repositories/client/cloud_functions_client.dart @@ -92,7 +92,7 @@ class CloudFunctionsTobClient extends TobClient { @override Future postUnitComplete(String sdkId, String id) async { final token = await GetIt.instance.get().getToken(); - final json = await http.post( + await http.post( Uri.parse( '$cloudFunctionsBaseUrl/postUnitComplete?sdk=$sdkId&id=$id', ), @@ -100,6 +100,5 @@ class CloudFunctionsTobClient extends TobClient { HttpHeaders.authorizationHeader: 'Bearer $token', }, ); - final map = jsonDecode(utf8.decode(json.bodyBytes)); } }