alexeyinkin commented on code in PR #23253:
URL: https://github.com/apache/beam/pull/23253#discussion_r972709362


##########
learning/tour-of-beam/frontend/lib/pages/tour/playground_demo.dart:
##########
@@ -0,0 +1,126 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import 'package:flutter/material.dart';
+import 'package:flutter/widgets.dart';
+import 'package:playground_components/playground_components.dart';
+
+// This is for demo only. Need a thought-though import in production.
+
+const String kApiClientURL =
+    'https://backend-router-beta-dot-apache-beam-testing.appspot.com';
+const String kApiJavaClientURL =
+    'https://backend-java-beta-dot-apache-beam-testing.appspot.com';
+const String kApiGoClientURL =
+    'https://backend-go-beta-dot-apache-beam-testing.appspot.com';
+const String kApiPythonClientURL =
+    'https://backend-python-beta-dot-apache-beam-testing.appspot.com';
+const String kApiScioClientURL =
+    'https://backend-scio-beta-dot-apache-beam-testing.appspot.com';
+
+class PlaygroundDemoWidget extends StatefulWidget {
+  const PlaygroundDemoWidget({Key? key}) : super(key: key);
+
+  @override
+  State<PlaygroundDemoWidget> createState() => _PlaygroundDemoWidgetState();
+}
+
+class _PlaygroundDemoWidgetState extends State<PlaygroundDemoWidget> {
+  late final PlaygroundController playgroundController;

Review Comment:
   My favorite way was to create dependencies in `createState` and then pass 
the result objects in the state constructor. But then I discovered that is 
discouraged by 
https://dart-lang.github.io/linter/lints/no_logic_in_create_state.html
   
   Anyway this is only to show the window at the meeting.
   
   In production, there will be a separate
   `TourScreenNotifier extends ChangeNotifier with PageStateNotifier<void>`
   
   Nothing stops us from creating `PlaygroundController` with all its 
dependencies in its constructor (if it is a factory constructor).



-- 
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]

Reply via email to