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 2022/08/25 09:24:42 UTC

[GitHub] [beam] alexeyinkin commented on a diff in pull request #22794: [Tour of Beam]: Welcome Screen frontend layout

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


##########
learning/tour-of-beam/frontend/lib/components/complexity.dart:
##########
@@ -0,0 +1,65 @@
+/*
+ * 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 '../constants/colors.dart';
+import '../constants/sizes.dart';
+
+enum Complexity { basic, medium, advanced }
+
+class ComplexityWidget extends StatelessWidget {
+  final Complexity complexity;
+
+  const ComplexityWidget({required this.complexity});
+
+  @override
+  Widget build(BuildContext context) {
+    return Row(children: _dots[complexity]!);
+  }
+
+  static const Map<Complexity, List<Widget>> _dots = {
+    Complexity.basic: [_Dot.green, _Dot.grey, _Dot.grey],
+    Complexity.medium: [_Dot.orange, _Dot.orange, _Dot.grey],

Review Comment:
   Let's do `0x30808080` that fits both light and dark?
   
   ![image](https://user-images.githubusercontent.com/44893228/186627977-54cc652c-66f8-42e1-ad40-d458596fa128.png)
   ![image](https://user-images.githubusercontent.com/44893228/186627379-7b392f49-7c27-4f30-8f64-9caeb34fe199.png)
   ![image](https://user-images.githubusercontent.com/44893228/186627896-e681916c-175d-4631-9c9c-1d70f56a43b6.png)
   ![image](https://user-images.githubusercontent.com/44893228/186627490-628d7781-4e77-4193-9042-13ace8be8d9d.png)
   



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