You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/09/30 18:55:17 UTC

[GitHub] [beam] damondouglas commented on a change in pull request #15626: [BEAM-12963] [Playground] Create base Beam Playground page structure

damondouglas commented on a change in pull request #15626:
URL: https://github.com/apache/beam/pull/15626#discussion_r719676377



##########
File path: playground/frontend/lib/config/colors.dart
##########
@@ -0,0 +1,28 @@
+/*
+ * 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';
+
+class LightColor {
+  static const Color primaryBackground = Colors.white;

Review comment:
       These comments are not blocking of the PR.
   
   One design pattern I've seen is to have a `constants.dart` file and begin constant variable names with `k...`.  For example:
   ```dart
   const kPrimaryBackground = Colors.white;
   ```
   
   Additionally, in dart, specifying the type before assignment is not needed.  One may write as:
   
   ```
   const kPrimaryBackground = Colors.white;
   ```
   
   instead of
   
   ```
   const Color kPrimaryBackground = Colors.white;
   ```
   
   I see the [TODO comment](https://github.com/apache/beam/pull/15626/files#diff-751203ee943c09f06c132849acb14e1005488cf2d1a375c6490de99d92c309ceR22) to add support for flutter themes.  I wonder when this TODO comment is addressed if a `final kLightTheme = ThemeData.from(...)` instead of using a class for color constants.
   




-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org