From cd404cb5e1aed30b46a7af7ddb91ba6e126fe4c2 Mon Sep 17 00:00:00 2001 From: Chad Jones Date: Fri, 19 Apr 2013 10:28:48 -0700 Subject: [PATCH 01/66] Initial empty repository From 90bfac27871403de00b03b616188affb0ce80a55 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Fri, 18 Sep 2015 09:49:20 -0700 Subject: [PATCH 02/66] Move theme into material.dart Also, introduce Colors and Typography to hold the material colors and the typography declarations. Previously we expected clients of these libraries to import them into a namespace, but that doesn't play nice with re-exporting them from material.dart. --- packages/flutter/lib/src/material/colors.dart | 380 ++++++++++++++++++ 1 file changed, 380 insertions(+) create mode 100644 packages/flutter/lib/src/material/colors.dart diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart new file mode 100644 index 000000000000..b1af32f31e58 --- /dev/null +++ b/packages/flutter/lib/src/material/colors.dart @@ -0,0 +1,380 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'dart:sky' show Color; + +/// [Color] constants which represent Material design's +/// [color palette](http://www.google.com/design/spec/style/color.html). +class Colors { + Colors._(); + + static const white = const Color(0xFFFFFFFF); + static const black = const Color(0xFF000000); + static const transparent = const Color(0x00000000); + static const white54 = const Color(0x8AFFFFFF); + static const white87 = const Color(0xDDFFFFFF); + static const black54 = const Color(0x8A000000); + static const black87 = const Color(0xDD000000); + + static const Map red = const { + 50: const Color(0xFFFFEBEE), + 100: const Color(0xFFFFCDD2), + 200: const Color(0xFFEF9A9A), + 300: const Color(0xFFE57373), + 400: const Color(0xFFEF5350), + 500: const Color(0xFFF44336), + 600: const Color(0xFFE53935), + 700: const Color(0xFFD32F2F), + 800: const Color(0xFFC62828), + 900: const Color(0xFFB71C1C), + }; + + static const Map redAccent = const { + 100: const Color(0xFFFF8A80), + 200: const Color(0xFFFF5252), + 400: const Color(0xFFFF1744), + 700: const Color(0xFFD50000), + }; + + static const Map pink = const { + 50: const Color(0xFFFCE4EC), + 100: const Color(0xFFF8BBD0), + 200: const Color(0xFFF48FB1), + 300: const Color(0xFFF06292), + 400: const Color(0xFFEC407A), + 500: const Color(0xFFE91E63), + 600: const Color(0xFFD81B60), + 700: const Color(0xFFC2185B), + 800: const Color(0xFFAD1457), + 900: const Color(0xFF880E4F), + }; + + static const Map pinkAccent = const { + 100: const Color(0xFFFF80AB), + 200: const Color(0xFFFF4081), + 400: const Color(0xFFF50057), + 700: const Color(0xFFC51162), + }; + + static const Map purple = const { + 50: const Color(0xFFF3E5F5), + 100: const Color(0xFFE1BEE7), + 200: const Color(0xFFCE93D8), + 300: const Color(0xFFBA68C8), + 400: const Color(0xFFAB47BC), + 500: const Color(0xFF9C27B0), + 600: const Color(0xFF8E24AA), + 700: const Color(0xFF7B1FA2), + 800: const Color(0xFF6A1B9A), + 900: const Color(0xFF4A148C), + }; + + static const Map purpleAccent = const { + 100: const Color(0xFFEA80FC), + 200: const Color(0xFFE040FB), + 400: const Color(0xFFD500F9), + 700: const Color(0xFFAA00FF), + }; + + static const Map deepPurple = const { + 50: const Color(0xFFEDE7F6), + 100: const Color(0xFFD1C4E9), + 200: const Color(0xFFB39DDB), + 300: const Color(0xFF9575CD), + 400: const Color(0xFF7E57C2), + 500: const Color(0xFF673AB7), + 600: const Color(0xFF5E35B1), + 700: const Color(0xFF512DA8), + 800: const Color(0xFF4527A0), + 900: const Color(0xFF311B92), + }; + + static const Map deepPurpleAccent = const { + 100: const Color(0xFFB388FF), + 200: const Color(0xFF7C4DFF), + 400: const Color(0xFF651FFF), + 700: const Color(0xFF6200EA), + }; + + static const Map indigo = const { + 50: const Color(0xFFE8EAF6), + 100: const Color(0xFFC5CAE9), + 200: const Color(0xFF9FA8DA), + 300: const Color(0xFF7986CB), + 400: const Color(0xFF5C6BC0), + 500: const Color(0xFF3F51B5), + 600: const Color(0xFF3949AB), + 700: const Color(0xFF303F9F), + 800: const Color(0xFF283593), + 900: const Color(0xFF1A237E), + }; + + static const Map indigoAccent = const { + 100: const Color(0xFF8C9EFF), + 200: const Color(0xFF536DFE), + 400: const Color(0xFF3D5AFE), + 700: const Color(0xFF304FFE), + }; + + static const Map blue = const { + 50: const Color(0xFFE3F2FD), + 100: const Color(0xFFBBDEFB), + 200: const Color(0xFF90CAF9), + 300: const Color(0xFF64B5F6), + 400: const Color(0xFF42A5F5), + 500: const Color(0xFF2196F3), + 600: const Color(0xFF1E88E5), + 700: const Color(0xFF1976D2), + 800: const Color(0xFF1565C0), + 900: const Color(0xFF0D47A1), + }; + + static const Map blueAccent = const { + 100: const Color(0xFF82B1FF), + 200: const Color(0xFF448AFF), + 400: const Color(0xFF2979FF), + 700: const Color(0xFF2962FF), + }; + + static const Map lightBlue = const { + 50: const Color(0xFFE1F5FE), + 100: const Color(0xFFB3E5FC), + 200: const Color(0xFF81D4FA), + 300: const Color(0xFF4FC3F7), + 400: const Color(0xFF29B6F6), + 500: const Color(0xFF03A9F4), + 600: const Color(0xFF039BE5), + 700: const Color(0xFF0288D1), + 800: const Color(0xFF0277BD), + 900: const Color(0xFF01579B), + }; + + static const Map lightBlueAccent = const { + 100: const Color(0xFF80D8FF), + 200: const Color(0xFF40C4FF), + 400: const Color(0xFF00B0FF), + 700: const Color(0xFF0091EA), + }; + + static const Map cyan = const { + 50: const Color(0xFFE0F7FA), + 100: const Color(0xFFB2EBF2), + 200: const Color(0xFF80DEEA), + 300: const Color(0xFF4DD0E1), + 400: const Color(0xFF26C6DA), + 500: const Color(0xFF00BCD4), + 600: const Color(0xFF00ACC1), + 700: const Color(0xFF0097A7), + 800: const Color(0xFF00838F), + 900: const Color(0xFF006064), + }; + + static const Map cyanAccent = const { + 100: const Color(0xFF84FFFF), + 200: const Color(0xFF18FFFF), + 400: const Color(0xFF00E5FF), + 700: const Color(0xFF00B8D4), + }; + + static const Map teal = const { + 50: const Color(0xFFE0F2F1), + 100: const Color(0xFFB2DFDB), + 200: const Color(0xFF80CBC4), + 300: const Color(0xFF4DB6AC), + 400: const Color(0xFF26A69A), + 500: const Color(0xFF009688), + 600: const Color(0xFF00897B), + 700: const Color(0xFF00796B), + 800: const Color(0xFF00695C), + 900: const Color(0xFF004D40), + }; + + static const Map tealAccent = const { + 100: const Color(0xFFA7FFEB), + 200: const Color(0xFF64FFDA), + 400: const Color(0xFF1DE9B6), + 700: const Color(0xFF00BFA5), + }; + + static const Map green = const { + 50: const Color(0xFFE8F5E9), + 100: const Color(0xFFC8E6C9), + 200: const Color(0xFFA5D6A7), + 300: const Color(0xFF81C784), + 400: const Color(0xFF66BB6A), + 500: const Color(0xFF4CAF50), + 600: const Color(0xFF43A047), + 700: const Color(0xFF388E3C), + 800: const Color(0xFF2E7D32), + 900: const Color(0xFF1B5E20), + }; + + static const Map greenAccent = const { + 100: const Color(0xFFB9F6CA), + 200: const Color(0xFF69F0AE), + 400: const Color(0xFF00E676), + 700: const Color(0xFF00C853), + }; + + static const Map lightGreen = const { + 50: const Color(0xFFF1F8E9), + 100: const Color(0xFFDCEDC8), + 200: const Color(0xFFC5E1A5), + 300: const Color(0xFFAED581), + 400: const Color(0xFF9CCC65), + 500: const Color(0xFF8BC34A), + 600: const Color(0xFF7CB342), + 700: const Color(0xFF689F38), + 800: const Color(0xFF558B2F), + 900: const Color(0xFF33691E), + }; + + static const Map lightGreenAccent = const { + 100: const Color(0xFFCCFF90), + 200: const Color(0xFFB2FF59), + 400: const Color(0xFF76FF03), + 700: const Color(0xFF64DD17), + }; + + static const Map lime = const { + 50: const Color(0xFFF9FBE7), + 100: const Color(0xFFF0F4C3), + 200: const Color(0xFFE6EE9C), + 300: const Color(0xFFDCE775), + 400: const Color(0xFFD4E157), + 500: const Color(0xFFCDDC39), + 600: const Color(0xFFC0CA33), + 700: const Color(0xFFAFB42B), + 800: const Color(0xFF9E9D24), + 900: const Color(0xFF827717), + }; + + static const Map limeAccent = const { + 100: const Color(0xFFF4FF81), + 200: const Color(0xFFEEFF41), + 400: const Color(0xFFC6FF00), + 700: const Color(0xFFAEEA00), + }; + + static const Map yellow = const { + 50: const Color(0xFFFFFDE7), + 100: const Color(0xFFFFF9C4), + 200: const Color(0xFFFFF59D), + 300: const Color(0xFFFFF176), + 400: const Color(0xFFFFEE58), + 500: const Color(0xFFFFEB3B), + 600: const Color(0xFFFDD835), + 700: const Color(0xFFFBC02D), + 800: const Color(0xFFF9A825), + 900: const Color(0xFFF57F17), + }; + + static const Map yellowAccent = const { + 100: const Color(0xFFFFFF8D), + 200: const Color(0xFFFFFF00), + 400: const Color(0xFFFFEA00), + 700: const Color(0xFFFFD600), + }; + + static const Map amber = const { + 50: const Color(0xFFFFF8E1), + 100: const Color(0xFFFFECB3), + 200: const Color(0xFFFFE082), + 300: const Color(0xFFFFD54F), + 400: const Color(0xFFFFCA28), + 500: const Color(0xFFFFC107), + 600: const Color(0xFFFFB300), + 700: const Color(0xFFFFA000), + 800: const Color(0xFFFF8F00), + 900: const Color(0xFFFF6F00), + }; + + static const Map amberAccent = const { + 100: const Color(0xFFFFE57F), + 200: const Color(0xFFFFD740), + 400: const Color(0xFFFFC400), + 700: const Color(0xFFFFAB00), + }; + + static const Map orange = const { + 50: const Color(0xFFFFF3E0), + 100: const Color(0xFFFFE0B2), + 200: const Color(0xFFFFCC80), + 300: const Color(0xFFFFB74D), + 400: const Color(0xFFFFA726), + 500: const Color(0xFFFF9800), + 600: const Color(0xFFFB8C00), + 700: const Color(0xFFF57C00), + 800: const Color(0xFFEF6C00), + 900: const Color(0xFFE65100), + }; + + static const Map orangeAccent = const { + 100: const Color(0xFFFFD180), + 200: const Color(0xFFFFAB40), + 400: const Color(0xFFFF9100), + 700: const Color(0xFFFF6D00), + }; + + static const Map deepOrange = const { + 50: const Color(0xFFFBE9E7), + 100: const Color(0xFFFFCCBC), + 200: const Color(0xFFFFAB91), + 300: const Color(0xFFFF8A65), + 400: const Color(0xFFFF7043), + 500: const Color(0xFFFF5722), + 600: const Color(0xFFF4511E), + 700: const Color(0xFFE64A19), + 800: const Color(0xFFD84315), + 900: const Color(0xFFBF360C), + }; + + static const Map deepOrangeAccent = const { + 100: const Color(0xFFFF9E80), + 200: const Color(0xFFFF6E40), + 400: const Color(0xFFFF3D00), + 700: const Color(0xFFDD2C00), + }; + + static const Map brown = const { + 50: const Color(0xFFEFEBE9), + 100: const Color(0xFFD7CCC8), + 200: const Color(0xFFBCAAA4), + 300: const Color(0xFFA1887F), + 400: const Color(0xFF8D6E63), + 500: const Color(0xFF795548), + 600: const Color(0xFF6D4C41), + 700: const Color(0xFF5D4037), + 800: const Color(0xFF4E342E), + 900: const Color(0xFF3E2723), + }; + + static const Map grey = const { + 50: const Color(0xFFFAFAFA), + 100: const Color(0xFFF5F5F5), + 200: const Color(0xFFEEEEEE), + 300: const Color(0xFFE0E0E0), + 350: const Color(0xFFD6D6D6), // only for raised button while pressed or disabled + 400: const Color(0xFFBDBDBD), + 500: const Color(0xFF9E9E9E), + 600: const Color(0xFF757575), + 700: const Color(0xFF616161), + 800: const Color(0xFF424242), + 850: const Color(0xFF303030), // only for background color in Dark theme + 900: const Color(0xFF212121), + }; + + static const Map blueGrey = const { + 50: const Color(0xFFECEFF1), + 100: const Color(0xFFCFD8DC), + 200: const Color(0xFFB0BEC5), + 300: const Color(0xFF90A4AE), + 400: const Color(0xFF78909C), + 500: const Color(0xFF607D8B), + 600: const Color(0xFF546E7A), + 700: const Color(0xFF455A64), + 800: const Color(0xFF37474F), + 900: const Color(0xFF263238), + }; +} From 70a3dbdde4aa12d62a12b5db12a9f8d60037e5c5 Mon Sep 17 00:00:00 2001 From: Hixie Date: Thu, 1 Oct 2015 09:28:40 -0700 Subject: [PATCH 03/66] Have Flat buttons set their default text styles. Also, have dialog buttons use the accent colour. Also, generally rationalise some of this stuff to match Material better. --- packages/flutter/lib/src/material/colors.dart | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index b1af32f31e58..bde576a1df03 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -9,13 +9,17 @@ import 'dart:sky' show Color; class Colors { Colors._(); - static const white = const Color(0xFFFFFFFF); - static const black = const Color(0xFF000000); static const transparent = const Color(0x00000000); - static const white54 = const Color(0x8AFFFFFF); - static const white87 = const Color(0xDDFFFFFF); - static const black54 = const Color(0x8A000000); + + static const black = const Color(0xFF000000); static const black87 = const Color(0xDD000000); + static const black54 = const Color(0x8A000000); + static const black26 = const Color(0x42000000); // text of disabled flat button in light theme + static const black12 = const Color(0x1F000000); // background of disabled raised buttons in light theme + static const white = const Color(0xFFFFFFFF); + static const white70 = const Color(0xB3FFFFFF); + static const white30 = const Color(0x4DFFFFFF); // text of disabled flat button in dark theme + static const white12 = const Color(0x1FFFFFFF); // background of disabled raised buttons in dark theme static const Map red = const { 50: const Color(0xFFFFEBEE), @@ -355,7 +359,7 @@ class Colors { 100: const Color(0xFFF5F5F5), 200: const Color(0xFFEEEEEE), 300: const Color(0xFFE0E0E0), - 350: const Color(0xFFD6D6D6), // only for raised button while pressed or disabled + 350: const Color(0xFFD6D6D6), // only for raised button while pressed in Light theme 400: const Color(0xFFBDBDBD), 500: const Color(0xFF9E9E9E), 600: const Color(0xFF757575), From d1c43540276fd86b6f49132af6d9a83464e1a84d Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Fri, 9 Oct 2015 19:27:13 -0700 Subject: [PATCH 04/66] Rename dart:sky to dart:ui --- packages/flutter/lib/src/material/colors.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index bde576a1df03..7df8de25292c 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:sky' show Color; +import 'dart:ui' show Color; /// [Color] constants which represent Material design's /// [color palette](http://www.google.com/design/spec/style/color.html). From a9818c212a5c01304226ac45ac537a9f14dc0ad4 Mon Sep 17 00:00:00 2001 From: Hixie Date: Fri, 9 Oct 2015 13:54:40 -0700 Subject: [PATCH 05/66] Lots of trivial warning fixes Add type annotations in many places. Fix some identifiers to have more lint-satisfying names. Make all operator==s consistent in style. Reorder some functions for consistency. Make ParentData no longer dynamic, and fix all the code around that. --- packages/flutter/lib/src/material/colors.dart | 70 +++++++++---------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 7df8de25292c..68fa5913e367 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -21,7 +21,7 @@ class Colors { static const white30 = const Color(0x4DFFFFFF); // text of disabled flat button in dark theme static const white12 = const Color(0x1FFFFFFF); // background of disabled raised buttons in dark theme - static const Map red = const { + static const Map red = const { 50: const Color(0xFFFFEBEE), 100: const Color(0xFFFFCDD2), 200: const Color(0xFFEF9A9A), @@ -34,14 +34,14 @@ class Colors { 900: const Color(0xFFB71C1C), }; - static const Map redAccent = const { + static const Map redAccent = const { 100: const Color(0xFFFF8A80), 200: const Color(0xFFFF5252), 400: const Color(0xFFFF1744), 700: const Color(0xFFD50000), }; - static const Map pink = const { + static const Map pink = const { 50: const Color(0xFFFCE4EC), 100: const Color(0xFFF8BBD0), 200: const Color(0xFFF48FB1), @@ -54,14 +54,14 @@ class Colors { 900: const Color(0xFF880E4F), }; - static const Map pinkAccent = const { + static const Map pinkAccent = const { 100: const Color(0xFFFF80AB), 200: const Color(0xFFFF4081), 400: const Color(0xFFF50057), 700: const Color(0xFFC51162), }; - static const Map purple = const { + static const Map purple = const { 50: const Color(0xFFF3E5F5), 100: const Color(0xFFE1BEE7), 200: const Color(0xFFCE93D8), @@ -74,14 +74,14 @@ class Colors { 900: const Color(0xFF4A148C), }; - static const Map purpleAccent = const { + static const Map purpleAccent = const { 100: const Color(0xFFEA80FC), 200: const Color(0xFFE040FB), 400: const Color(0xFFD500F9), 700: const Color(0xFFAA00FF), }; - static const Map deepPurple = const { + static const Map deepPurple = const { 50: const Color(0xFFEDE7F6), 100: const Color(0xFFD1C4E9), 200: const Color(0xFFB39DDB), @@ -94,14 +94,14 @@ class Colors { 900: const Color(0xFF311B92), }; - static const Map deepPurpleAccent = const { + static const Map deepPurpleAccent = const { 100: const Color(0xFFB388FF), 200: const Color(0xFF7C4DFF), 400: const Color(0xFF651FFF), 700: const Color(0xFF6200EA), }; - static const Map indigo = const { + static const Map indigo = const { 50: const Color(0xFFE8EAF6), 100: const Color(0xFFC5CAE9), 200: const Color(0xFF9FA8DA), @@ -114,14 +114,14 @@ class Colors { 900: const Color(0xFF1A237E), }; - static const Map indigoAccent = const { + static const Map indigoAccent = const { 100: const Color(0xFF8C9EFF), 200: const Color(0xFF536DFE), 400: const Color(0xFF3D5AFE), 700: const Color(0xFF304FFE), }; - static const Map blue = const { + static const Map blue = const { 50: const Color(0xFFE3F2FD), 100: const Color(0xFFBBDEFB), 200: const Color(0xFF90CAF9), @@ -134,14 +134,14 @@ class Colors { 900: const Color(0xFF0D47A1), }; - static const Map blueAccent = const { + static const Map blueAccent = const { 100: const Color(0xFF82B1FF), 200: const Color(0xFF448AFF), 400: const Color(0xFF2979FF), 700: const Color(0xFF2962FF), }; - static const Map lightBlue = const { + static const Map lightBlue = const { 50: const Color(0xFFE1F5FE), 100: const Color(0xFFB3E5FC), 200: const Color(0xFF81D4FA), @@ -154,14 +154,14 @@ class Colors { 900: const Color(0xFF01579B), }; - static const Map lightBlueAccent = const { + static const Map lightBlueAccent = const { 100: const Color(0xFF80D8FF), 200: const Color(0xFF40C4FF), 400: const Color(0xFF00B0FF), 700: const Color(0xFF0091EA), }; - static const Map cyan = const { + static const Map cyan = const { 50: const Color(0xFFE0F7FA), 100: const Color(0xFFB2EBF2), 200: const Color(0xFF80DEEA), @@ -174,14 +174,14 @@ class Colors { 900: const Color(0xFF006064), }; - static const Map cyanAccent = const { + static const Map cyanAccent = const { 100: const Color(0xFF84FFFF), 200: const Color(0xFF18FFFF), 400: const Color(0xFF00E5FF), 700: const Color(0xFF00B8D4), }; - static const Map teal = const { + static const Map teal = const { 50: const Color(0xFFE0F2F1), 100: const Color(0xFFB2DFDB), 200: const Color(0xFF80CBC4), @@ -194,14 +194,14 @@ class Colors { 900: const Color(0xFF004D40), }; - static const Map tealAccent = const { + static const Map tealAccent = const { 100: const Color(0xFFA7FFEB), 200: const Color(0xFF64FFDA), 400: const Color(0xFF1DE9B6), 700: const Color(0xFF00BFA5), }; - static const Map green = const { + static const Map green = const { 50: const Color(0xFFE8F5E9), 100: const Color(0xFFC8E6C9), 200: const Color(0xFFA5D6A7), @@ -214,14 +214,14 @@ class Colors { 900: const Color(0xFF1B5E20), }; - static const Map greenAccent = const { + static const Map greenAccent = const { 100: const Color(0xFFB9F6CA), 200: const Color(0xFF69F0AE), 400: const Color(0xFF00E676), 700: const Color(0xFF00C853), }; - static const Map lightGreen = const { + static const Map lightGreen = const { 50: const Color(0xFFF1F8E9), 100: const Color(0xFFDCEDC8), 200: const Color(0xFFC5E1A5), @@ -234,14 +234,14 @@ class Colors { 900: const Color(0xFF33691E), }; - static const Map lightGreenAccent = const { + static const Map lightGreenAccent = const { 100: const Color(0xFFCCFF90), 200: const Color(0xFFB2FF59), 400: const Color(0xFF76FF03), 700: const Color(0xFF64DD17), }; - static const Map lime = const { + static const Map lime = const { 50: const Color(0xFFF9FBE7), 100: const Color(0xFFF0F4C3), 200: const Color(0xFFE6EE9C), @@ -254,14 +254,14 @@ class Colors { 900: const Color(0xFF827717), }; - static const Map limeAccent = const { + static const Map limeAccent = const { 100: const Color(0xFFF4FF81), 200: const Color(0xFFEEFF41), 400: const Color(0xFFC6FF00), 700: const Color(0xFFAEEA00), }; - static const Map yellow = const { + static const Map yellow = const { 50: const Color(0xFFFFFDE7), 100: const Color(0xFFFFF9C4), 200: const Color(0xFFFFF59D), @@ -274,14 +274,14 @@ class Colors { 900: const Color(0xFFF57F17), }; - static const Map yellowAccent = const { + static const Map yellowAccent = const { 100: const Color(0xFFFFFF8D), 200: const Color(0xFFFFFF00), 400: const Color(0xFFFFEA00), 700: const Color(0xFFFFD600), }; - static const Map amber = const { + static const Map amber = const { 50: const Color(0xFFFFF8E1), 100: const Color(0xFFFFECB3), 200: const Color(0xFFFFE082), @@ -294,14 +294,14 @@ class Colors { 900: const Color(0xFFFF6F00), }; - static const Map amberAccent = const { + static const Map amberAccent = const { 100: const Color(0xFFFFE57F), 200: const Color(0xFFFFD740), 400: const Color(0xFFFFC400), 700: const Color(0xFFFFAB00), }; - static const Map orange = const { + static const Map orange = const { 50: const Color(0xFFFFF3E0), 100: const Color(0xFFFFE0B2), 200: const Color(0xFFFFCC80), @@ -314,14 +314,14 @@ class Colors { 900: const Color(0xFFE65100), }; - static const Map orangeAccent = const { + static const Map orangeAccent = const { 100: const Color(0xFFFFD180), 200: const Color(0xFFFFAB40), 400: const Color(0xFFFF9100), 700: const Color(0xFFFF6D00), }; - static const Map deepOrange = const { + static const Map deepOrange = const { 50: const Color(0xFFFBE9E7), 100: const Color(0xFFFFCCBC), 200: const Color(0xFFFFAB91), @@ -334,14 +334,14 @@ class Colors { 900: const Color(0xFFBF360C), }; - static const Map deepOrangeAccent = const { + static const Map deepOrangeAccent = const { 100: const Color(0xFFFF9E80), 200: const Color(0xFFFF6E40), 400: const Color(0xFFFF3D00), 700: const Color(0xFFDD2C00), }; - static const Map brown = const { + static const Map brown = const { 50: const Color(0xFFEFEBE9), 100: const Color(0xFFD7CCC8), 200: const Color(0xFFBCAAA4), @@ -354,7 +354,7 @@ class Colors { 900: const Color(0xFF3E2723), }; - static const Map grey = const { + static const Map grey = const { 50: const Color(0xFFFAFAFA), 100: const Color(0xFFF5F5F5), 200: const Color(0xFFEEEEEE), @@ -369,7 +369,7 @@ class Colors { 900: const Color(0xFF212121), }; - static const Map blueGrey = const { + static const Map blueGrey = const { 50: const Color(0xFFECEFF1), 100: const Color(0xFFCFD8DC), 200: const Color(0xFFB0BEC5), From 5bea15602b6adf1f2c183616315c5480ab2af3c1 Mon Sep 17 00:00:00 2001 From: Hixie Date: Mon, 26 Oct 2015 11:19:56 -0700 Subject: [PATCH 06/66] Radio button 'disabled' state. Also: - give card_collection an option to turn on or off the edit widgets - give card_collection an option to control text alignment (when not editing) - give card_collection a "dump" option to aid debugging - make the gesture detector report which gestures it is listening to --- packages/flutter/lib/src/material/colors.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 68fa5913e367..01c8d4b9a59d 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -14,11 +14,11 @@ class Colors { static const black = const Color(0xFF000000); static const black87 = const Color(0xDD000000); static const black54 = const Color(0x8A000000); - static const black26 = const Color(0x42000000); // text of disabled flat button in light theme + static const black26 = const Color(0x42000000); // disabled radio buttons and text of disabled flat buttons in light theme (26% black) static const black12 = const Color(0x1F000000); // background of disabled raised buttons in light theme static const white = const Color(0xFFFFFFFF); static const white70 = const Color(0xB3FFFFFF); - static const white30 = const Color(0x4DFFFFFF); // text of disabled flat button in dark theme + static const white30 = const Color(0x4DFFFFFF); // disabled radio buttons and text of disabled flat buttons in dark theme (30% white) static const white12 = const Color(0x1FFFFFFF); // background of disabled raised buttons in dark theme static const Map red = const { From d2e75edc763937812bf5863d676668cba548c793 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Thu, 26 Nov 2015 11:38:07 -0800 Subject: [PATCH 07/66] Properly paint disabled switches Also, refactor more common code into RenderToggleable and handle dark themes more correctly. Fixes #601 --- packages/flutter/lib/src/material/colors.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 01c8d4b9a59d..7da9936457a1 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -20,6 +20,7 @@ class Colors { static const white70 = const Color(0xB3FFFFFF); static const white30 = const Color(0x4DFFFFFF); // disabled radio buttons and text of disabled flat buttons in dark theme (30% white) static const white12 = const Color(0x1FFFFFFF); // background of disabled raised buttons in dark theme + static const white10 = const Color(0x1AFFFFFF); static const Map red = const { 50: const Color(0xFFFFEBEE), From 1169b181c0f590c94bc4a5d7e04308b9ead38b6a Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Tue, 17 Nov 2015 22:16:56 -0800 Subject: [PATCH 08/66] Model ink splashes more physically --- packages/flutter/lib/src/material/colors.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 7da9936457a1..d106b047aa5e 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -14,11 +14,13 @@ class Colors { static const black = const Color(0xFF000000); static const black87 = const Color(0xDD000000); static const black54 = const Color(0x8A000000); - static const black26 = const Color(0x42000000); // disabled radio buttons and text of disabled flat buttons in light theme (26% black) + static const black45 = const Color(0x73000000); // mask color + static const black26 = const Color(0x42000000); // disabled radio buttons and text of disabled flat buttons in light theme static const black12 = const Color(0x1F000000); // background of disabled raised buttons in light theme + static const white = const Color(0xFFFFFFFF); static const white70 = const Color(0xB3FFFFFF); - static const white30 = const Color(0x4DFFFFFF); // disabled radio buttons and text of disabled flat buttons in dark theme (30% white) + static const white30 = const Color(0x4DFFFFFF); // disabled radio buttons and text of disabled flat buttons in dark theme static const white12 = const Color(0x1FFFFFFF); // background of disabled raised buttons in dark theme static const white10 = const Color(0x1AFFFFFF); From 548ff4a4144155021a827134d122a4cc68c55ce6 Mon Sep 17 00:00:00 2001 From: Hixie Date: Wed, 9 Mar 2016 18:05:05 -0800 Subject: [PATCH 09/66] Enable always_specify_types lint And fix the zillion issues that uncovered. --- packages/flutter/lib/src/material/colors.dart | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index d106b047aa5e..102d5f2ade60 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -9,20 +9,20 @@ import 'dart:ui' show Color; class Colors { Colors._(); - static const transparent = const Color(0x00000000); - - static const black = const Color(0xFF000000); - static const black87 = const Color(0xDD000000); - static const black54 = const Color(0x8A000000); - static const black45 = const Color(0x73000000); // mask color - static const black26 = const Color(0x42000000); // disabled radio buttons and text of disabled flat buttons in light theme - static const black12 = const Color(0x1F000000); // background of disabled raised buttons in light theme - - static const white = const Color(0xFFFFFFFF); - static const white70 = const Color(0xB3FFFFFF); - static const white30 = const Color(0x4DFFFFFF); // disabled radio buttons and text of disabled flat buttons in dark theme - static const white12 = const Color(0x1FFFFFFF); // background of disabled raised buttons in dark theme - static const white10 = const Color(0x1AFFFFFF); + static const Color transparent = const Color(0x00000000); + + static const Color black = const Color(0xFF000000); + static const Color black87 = const Color(0xDD000000); + static const Color black54 = const Color(0x8A000000); + static const Color black45 = const Color(0x73000000); // mask color + static const Color black26 = const Color(0x42000000); // disabled radio buttons and text of disabled flat buttons in light theme + static const Color black12 = const Color(0x1F000000); // background of disabled raised buttons in light theme + + static const Color white = const Color(0xFFFFFFFF); + static const Color white70 = const Color(0xB3FFFFFF); + static const Color white30 = const Color(0x4DFFFFFF); // disabled radio buttons and text of disabled flat buttons in dark theme + static const Color white12 = const Color(0x1FFFFFFF); // background of disabled raised buttons in dark theme + static const Color white10 = const Color(0x1AFFFFFF); static const Map red = const { 50: const Color(0xFFFFEBEE), From 02382eeed206c0e16c44c69e0f8bdedcaedfea0b Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Sat, 12 Mar 2016 00:34:37 -0800 Subject: [PATCH 10/66] Revert "Merge pull request #2639 from Hixie/always_specify_types" This reverts commit f41b3411da35929b09009e47cb52474389e42874, reversing changes made to e33d8d96212f3e337a6660f1eb1118bffc945bf5. This was a bad check-in due to my mangling uploading a new version of the branch from a different machine. This reverts https://github.com/flutter/flutter/pull/2639 and will be replaced by https://github.com/flutter/flutter/pull/2640 --- packages/flutter/lib/src/material/colors.dart | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 102d5f2ade60..d106b047aa5e 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -9,20 +9,20 @@ import 'dart:ui' show Color; class Colors { Colors._(); - static const Color transparent = const Color(0x00000000); - - static const Color black = const Color(0xFF000000); - static const Color black87 = const Color(0xDD000000); - static const Color black54 = const Color(0x8A000000); - static const Color black45 = const Color(0x73000000); // mask color - static const Color black26 = const Color(0x42000000); // disabled radio buttons and text of disabled flat buttons in light theme - static const Color black12 = const Color(0x1F000000); // background of disabled raised buttons in light theme - - static const Color white = const Color(0xFFFFFFFF); - static const Color white70 = const Color(0xB3FFFFFF); - static const Color white30 = const Color(0x4DFFFFFF); // disabled radio buttons and text of disabled flat buttons in dark theme - static const Color white12 = const Color(0x1FFFFFFF); // background of disabled raised buttons in dark theme - static const Color white10 = const Color(0x1AFFFFFF); + static const transparent = const Color(0x00000000); + + static const black = const Color(0xFF000000); + static const black87 = const Color(0xDD000000); + static const black54 = const Color(0x8A000000); + static const black45 = const Color(0x73000000); // mask color + static const black26 = const Color(0x42000000); // disabled radio buttons and text of disabled flat buttons in light theme + static const black12 = const Color(0x1F000000); // background of disabled raised buttons in light theme + + static const white = const Color(0xFFFFFFFF); + static const white70 = const Color(0xB3FFFFFF); + static const white30 = const Color(0x4DFFFFFF); // disabled radio buttons and text of disabled flat buttons in dark theme + static const white12 = const Color(0x1FFFFFFF); // background of disabled raised buttons in dark theme + static const white10 = const Color(0x1AFFFFFF); static const Map red = const { 50: const Color(0xFFFFEBEE), From 902f2068fa270f625906637fddebcaaa671e45fa Mon Sep 17 00:00:00 2001 From: Hixie Date: Wed, 9 Mar 2016 18:05:05 -0800 Subject: [PATCH 11/66] Enable always_specify_types lint And fix the zillion issues that uncovered. --- packages/flutter/lib/src/material/colors.dart | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index d106b047aa5e..102d5f2ade60 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -9,20 +9,20 @@ import 'dart:ui' show Color; class Colors { Colors._(); - static const transparent = const Color(0x00000000); - - static const black = const Color(0xFF000000); - static const black87 = const Color(0xDD000000); - static const black54 = const Color(0x8A000000); - static const black45 = const Color(0x73000000); // mask color - static const black26 = const Color(0x42000000); // disabled radio buttons and text of disabled flat buttons in light theme - static const black12 = const Color(0x1F000000); // background of disabled raised buttons in light theme - - static const white = const Color(0xFFFFFFFF); - static const white70 = const Color(0xB3FFFFFF); - static const white30 = const Color(0x4DFFFFFF); // disabled radio buttons and text of disabled flat buttons in dark theme - static const white12 = const Color(0x1FFFFFFF); // background of disabled raised buttons in dark theme - static const white10 = const Color(0x1AFFFFFF); + static const Color transparent = const Color(0x00000000); + + static const Color black = const Color(0xFF000000); + static const Color black87 = const Color(0xDD000000); + static const Color black54 = const Color(0x8A000000); + static const Color black45 = const Color(0x73000000); // mask color + static const Color black26 = const Color(0x42000000); // disabled radio buttons and text of disabled flat buttons in light theme + static const Color black12 = const Color(0x1F000000); // background of disabled raised buttons in light theme + + static const Color white = const Color(0xFFFFFFFF); + static const Color white70 = const Color(0xB3FFFFFF); + static const Color white30 = const Color(0x4DFFFFFF); // disabled radio buttons and text of disabled flat buttons in dark theme + static const Color white12 = const Color(0x1FFFFFFF); // background of disabled raised buttons in dark theme + static const Color white10 = const Color(0x1AFFFFFF); static const Map red = const { 50: const Color(0xFFFFEBEE), From d323ee026f86dbbed012771edf722e74f55b668a Mon Sep 17 00:00:00 2001 From: Collin Jackson Date: Tue, 15 Mar 2016 13:56:18 -0700 Subject: [PATCH 12/66] Provide a list of Material design primary and accent color swatches --- packages/flutter/lib/src/material/colors.dart | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 102d5f2ade60..31393eb0254d 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -384,4 +384,47 @@ class Colors { 800: const Color(0xFF37474F), 900: const Color(0xFF263238), }; + + /// All Material design primary color swatches (except grey) + static const List> primaries = const >[ + red, + pink, + purple, + deepPurple, + indigo, + blue, + lightBlue, + cyan, + teal, + green, + lightGreen, + lime, + yellow, + amber, + orange, + deepOrange, + brown, + // grey intentionally omitted + blueGrey, + ]; + + /// All Material design accent color swatches + static const List> accents = const >[ + redAccent, + pinkAccent, + purpleAccent, + deepPurpleAccent, + indigoAccent, + blueAccent, + lightBlueAccent, + cyanAccent, + tealAccent, + greenAccent, + lightGreenAccent, + limeAccent, + yellowAccent, + amberAccent, + orangeAccent, + deepOrangeAccent, + ]; } From d362924cf0860c94d8f770d3c9f6238ac322f0d8 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Fri, 8 Apr 2016 12:33:35 -0700 Subject: [PATCH 13/66] Add more dartdoc to material.dart (#3204) The dartdoc will continue until morale improves. --- packages/flutter/lib/src/material/colors.dart | 80 +++++++++++++++++-- 1 file changed, 73 insertions(+), 7 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 31393eb0254d..253ce57698cd 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -9,21 +9,53 @@ import 'dart:ui' show Color; class Colors { Colors._(); + /// Completely invisible. static const Color transparent = const Color(0x00000000); + /// Completely opaque black. static const Color black = const Color(0xFF000000); + + /// Black with 87% opacity. static const Color black87 = const Color(0xDD000000); + + /// Black with 54% opacity. static const Color black54 = const Color(0x8A000000); - static const Color black45 = const Color(0x73000000); // mask color - static const Color black26 = const Color(0x42000000); // disabled radio buttons and text of disabled flat buttons in light theme - static const Color black12 = const Color(0x1F000000); // background of disabled raised buttons in light theme + /// Black with 45% opacity. + /// + /// Used for modal barriers. + static const Color black45 = const Color(0x73000000); + + /// Black with 26% opacity. + /// + /// Used for disabled radio buttons and text of disabled flat buttons in the light theme. + static const Color black26 = const Color(0x42000000); + + /// Black with 12% opacity. + /// + /// Used for the background of disabled raised buttons in the light theme. + static const Color black12 = const Color(0x1F000000); + + /// Completely opaque white. static const Color white = const Color(0xFFFFFFFF); + + /// White with 70% opacity. static const Color white70 = const Color(0xB3FFFFFF); - static const Color white30 = const Color(0x4DFFFFFF); // disabled radio buttons and text of disabled flat buttons in dark theme - static const Color white12 = const Color(0x1FFFFFFF); // background of disabled raised buttons in dark theme + + /// White with 32% opacity. + /// + /// Used for disabled radio buttons and text of disabled flat buttons in the dark theme. + static const Color white30 = const Color(0x4DFFFFFF); + + /// White with 12% opacity. + /// + /// Used for the background of disabled raised buttons in the dark theme. + static const Color white12 = const Color(0x1FFFFFFF); + + /// White with 10% opacity. static const Color white10 = const Color(0x1AFFFFFF); + /// The red primary swatch. static const Map red = const { 50: const Color(0xFFFFEBEE), 100: const Color(0xFFFFCDD2), @@ -37,6 +69,7 @@ class Colors { 900: const Color(0xFFB71C1C), }; + /// The red accent swatch. static const Map redAccent = const { 100: const Color(0xFFFF8A80), 200: const Color(0xFFFF5252), @@ -44,6 +77,7 @@ class Colors { 700: const Color(0xFFD50000), }; + /// The pink primary swatch. static const Map pink = const { 50: const Color(0xFFFCE4EC), 100: const Color(0xFFF8BBD0), @@ -57,6 +91,7 @@ class Colors { 900: const Color(0xFF880E4F), }; + /// The pink accent swatch. static const Map pinkAccent = const { 100: const Color(0xFFFF80AB), 200: const Color(0xFFFF4081), @@ -64,6 +99,7 @@ class Colors { 700: const Color(0xFFC51162), }; + /// The purple primary swatch. static const Map purple = const { 50: const Color(0xFFF3E5F5), 100: const Color(0xFFE1BEE7), @@ -77,6 +113,7 @@ class Colors { 900: const Color(0xFF4A148C), }; + /// The purple accent swatch. static const Map purpleAccent = const { 100: const Color(0xFFEA80FC), 200: const Color(0xFFE040FB), @@ -84,6 +121,7 @@ class Colors { 700: const Color(0xFFAA00FF), }; + /// The deep purple primary swatch. static const Map deepPurple = const { 50: const Color(0xFFEDE7F6), 100: const Color(0xFFD1C4E9), @@ -97,6 +135,7 @@ class Colors { 900: const Color(0xFF311B92), }; + /// The deep purple accent swatch. static const Map deepPurpleAccent = const { 100: const Color(0xFFB388FF), 200: const Color(0xFF7C4DFF), @@ -104,6 +143,7 @@ class Colors { 700: const Color(0xFF6200EA), }; + /// The indigo primary swatch. static const Map indigo = const { 50: const Color(0xFFE8EAF6), 100: const Color(0xFFC5CAE9), @@ -117,6 +157,7 @@ class Colors { 900: const Color(0xFF1A237E), }; + /// The indigo accent swatch. static const Map indigoAccent = const { 100: const Color(0xFF8C9EFF), 200: const Color(0xFF536DFE), @@ -124,6 +165,7 @@ class Colors { 700: const Color(0xFF304FFE), }; + /// The blue primary swatch. static const Map blue = const { 50: const Color(0xFFE3F2FD), 100: const Color(0xFFBBDEFB), @@ -137,6 +179,7 @@ class Colors { 900: const Color(0xFF0D47A1), }; + /// The blue accent swatch. static const Map blueAccent = const { 100: const Color(0xFF82B1FF), 200: const Color(0xFF448AFF), @@ -144,6 +187,7 @@ class Colors { 700: const Color(0xFF2962FF), }; + /// The light blue primary swatch. static const Map lightBlue = const { 50: const Color(0xFFE1F5FE), 100: const Color(0xFFB3E5FC), @@ -157,6 +201,7 @@ class Colors { 900: const Color(0xFF01579B), }; + /// The light blue accent swatch. static const Map lightBlueAccent = const { 100: const Color(0xFF80D8FF), 200: const Color(0xFF40C4FF), @@ -164,6 +209,7 @@ class Colors { 700: const Color(0xFF0091EA), }; + /// The cyan primary swatch. static const Map cyan = const { 50: const Color(0xFFE0F7FA), 100: const Color(0xFFB2EBF2), @@ -177,6 +223,7 @@ class Colors { 900: const Color(0xFF006064), }; + /// The cyan accent swatch. static const Map cyanAccent = const { 100: const Color(0xFF84FFFF), 200: const Color(0xFF18FFFF), @@ -184,6 +231,7 @@ class Colors { 700: const Color(0xFF00B8D4), }; + /// The teal primary swatch. static const Map teal = const { 50: const Color(0xFFE0F2F1), 100: const Color(0xFFB2DFDB), @@ -197,6 +245,7 @@ class Colors { 900: const Color(0xFF004D40), }; + /// The teal accent swatch. static const Map tealAccent = const { 100: const Color(0xFFA7FFEB), 200: const Color(0xFF64FFDA), @@ -204,6 +253,7 @@ class Colors { 700: const Color(0xFF00BFA5), }; + /// The green primary swatch. static const Map green = const { 50: const Color(0xFFE8F5E9), 100: const Color(0xFFC8E6C9), @@ -217,6 +267,7 @@ class Colors { 900: const Color(0xFF1B5E20), }; + /// The green accent swatch. static const Map greenAccent = const { 100: const Color(0xFFB9F6CA), 200: const Color(0xFF69F0AE), @@ -224,6 +275,7 @@ class Colors { 700: const Color(0xFF00C853), }; + /// The light green primary swatch. static const Map lightGreen = const { 50: const Color(0xFFF1F8E9), 100: const Color(0xFFDCEDC8), @@ -237,6 +289,7 @@ class Colors { 900: const Color(0xFF33691E), }; + /// The light green accent swatch. static const Map lightGreenAccent = const { 100: const Color(0xFFCCFF90), 200: const Color(0xFFB2FF59), @@ -244,6 +297,7 @@ class Colors { 700: const Color(0xFF64DD17), }; + /// The lime primary swatch. static const Map lime = const { 50: const Color(0xFFF9FBE7), 100: const Color(0xFFF0F4C3), @@ -257,6 +311,7 @@ class Colors { 900: const Color(0xFF827717), }; + /// The lime accent primary swatch. static const Map limeAccent = const { 100: const Color(0xFFF4FF81), 200: const Color(0xFFEEFF41), @@ -264,6 +319,7 @@ class Colors { 700: const Color(0xFFAEEA00), }; + /// The yellow primary swatch. static const Map yellow = const { 50: const Color(0xFFFFFDE7), 100: const Color(0xFFFFF9C4), @@ -277,6 +333,7 @@ class Colors { 900: const Color(0xFFF57F17), }; + /// The yellow accent swatch. static const Map yellowAccent = const { 100: const Color(0xFFFFFF8D), 200: const Color(0xFFFFFF00), @@ -284,6 +341,7 @@ class Colors { 700: const Color(0xFFFFD600), }; + /// The amber primary swatch. static const Map amber = const { 50: const Color(0xFFFFF8E1), 100: const Color(0xFFFFECB3), @@ -297,6 +355,7 @@ class Colors { 900: const Color(0xFFFF6F00), }; + /// The amber accent swatch. static const Map amberAccent = const { 100: const Color(0xFFFFE57F), 200: const Color(0xFFFFD740), @@ -304,6 +363,7 @@ class Colors { 700: const Color(0xFFFFAB00), }; + /// The orange primary swatch. static const Map orange = const { 50: const Color(0xFFFFF3E0), 100: const Color(0xFFFFE0B2), @@ -317,6 +377,7 @@ class Colors { 900: const Color(0xFFE65100), }; + /// The orange accent swatch. static const Map orangeAccent = const { 100: const Color(0xFFFFD180), 200: const Color(0xFFFFAB40), @@ -324,6 +385,7 @@ class Colors { 700: const Color(0xFFFF6D00), }; + /// The deep orange primary swatch. static const Map deepOrange = const { 50: const Color(0xFFFBE9E7), 100: const Color(0xFFFFCCBC), @@ -337,6 +399,7 @@ class Colors { 900: const Color(0xFFBF360C), }; + /// The deep orange accent swatch. static const Map deepOrangeAccent = const { 100: const Color(0xFFFF9E80), 200: const Color(0xFFFF6E40), @@ -344,6 +407,7 @@ class Colors { 700: const Color(0xFFDD2C00), }; + /// The brown primary swatch. static const Map brown = const { 50: const Color(0xFFEFEBE9), 100: const Color(0xFFD7CCC8), @@ -357,6 +421,7 @@ class Colors { 900: const Color(0xFF3E2723), }; + /// The grey primary swatch. static const Map grey = const { 50: const Color(0xFFFAFAFA), 100: const Color(0xFFF5F5F5), @@ -372,6 +437,7 @@ class Colors { 900: const Color(0xFF212121), }; + /// The blue-grey primary swatch. static const Map blueGrey = const { 50: const Color(0xFFECEFF1), 100: const Color(0xFFCFD8DC), @@ -385,7 +451,7 @@ class Colors { 900: const Color(0xFF263238), }; - /// All Material design primary color swatches (except grey) + /// The material design primary color swatches (except grey). static const List> primaries = const >[ red, pink, @@ -408,7 +474,7 @@ class Colors { blueGrey, ]; - /// All Material design accent color swatches + /// The material design accent color swatches. static const List> accents = const >[ redAccent, pinkAccent, From cc9dc18bd30ce83b3229095a3d09d61cde64a322 Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Fri, 15 Apr 2016 16:51:03 -0700 Subject: [PATCH 14/66] Material Data Tables (#3337) + Add new demo to gallery to show data tables. (This currently doesn't use a Card; I'll create a Card version in a subsequent patch.) + Fix checkbox alignment. It now centers in its box regardless. + Add Colors.black54. + Some minor fixes to dartdocs. + DataTable, DataColumn, DataRow, DataCell + RowInkWell + Augment dartdocs of materia/debug.dart. + DropDownButtonHideUnderline to hide the underline in a drop-down when used in a DataTable. + Add new capabilities to InkResponse to support RowInkWell. + Augment dartdocs of materia/material.dart. + Add an assert to catch nested Blocks. + Fix a crash in RenderBox when you remove an object and an ancestor used its baseline. (https://github.com/flutter/flutter/issues/2874) + Fix (and redocument) RenderBaseline/Baseline. + Add flex support to IntrinsicColumnWidth. + Document more stuff on the RenderTable side. + Fix a bug with parentData handling on RenderTable children. + Completely rewrite the column width computations. The old logic made no sense at all. + Add dartdocs to widgets/debug.dart. + Add a toString for TableRow. --- packages/flutter/lib/src/material/colors.dart | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 253ce57698cd..b6bb1e8c1fa5 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -12,6 +12,7 @@ class Colors { /// Completely invisible. static const Color transparent = const Color(0x00000000); + /// Completely opaque black. static const Color black = const Color(0xFF000000); @@ -21,6 +22,11 @@ class Colors { /// Black with 54% opacity. static const Color black54 = const Color(0x8A000000); + /// Black with 38% opacity. + /// + /// Used for the placeholder text in data tables in light themes. + static const Color black38 = const Color(0x61000000); + /// Black with 45% opacity. /// /// Used for modal barriers. @@ -28,14 +34,15 @@ class Colors { /// Black with 26% opacity. /// - /// Used for disabled radio buttons and text of disabled flat buttons in the light theme. + /// Used for disabled radio buttons and the text of disabled flat buttons in light themes. static const Color black26 = const Color(0x42000000); /// Black with 12% opacity. /// - /// Used for the background of disabled raised buttons in the light theme. + /// Used for the background of disabled raised buttons in light themes. static const Color black12 = const Color(0x1F000000); + /// Completely opaque white. static const Color white = const Color(0xFFFFFFFF); @@ -44,17 +51,18 @@ class Colors { /// White with 32% opacity. /// - /// Used for disabled radio buttons and text of disabled flat buttons in the dark theme. + /// Used for disabled radio buttons and the text of disabled flat buttons in dark themes. static const Color white30 = const Color(0x4DFFFFFF); /// White with 12% opacity. /// - /// Used for the background of disabled raised buttons in the dark theme. + /// Used for the background of disabled raised buttons in dark themes. static const Color white12 = const Color(0x1FFFFFFF); /// White with 10% opacity. static const Color white10 = const Color(0x1AFFFFFF); + /// The red primary swatch. static const Map red = const { 50: const Color(0xFFFFEBEE), From 3e5bf71b5b16fd680000231954e6a1627f612592 Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Thu, 20 Oct 2016 19:08:12 -0400 Subject: [PATCH 15/66] Add more docs regarding color. (#6439) Based on observations of usability study participant P1. --- packages/flutter/lib/src/material/colors.dart | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index b6bb1e8c1fa5..9771f58bc074 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -6,6 +6,21 @@ import 'dart:ui' show Color; /// [Color] constants which represent Material design's /// [color palette](http://www.google.com/design/spec/style/color.html). +/// +/// To select a specific color from one of the swatches, index into the swatch +/// using an integer for the specific color desired, as follows: +/// +/// ```dart +/// Colors.green[400] // Selects a mid-range green. +/// ``` +/// +/// Most swatches have colors from 100 to 900 in increments of one hundred, plus +/// the color 50. The smaller the number, the more pale the color. The greater +/// the number, the darker the color. The accent swatches (e.g. [redAccent]) only +/// have the values 100, 200, 400, and 700. +/// +/// In addition, a series of blacks and whites with common opacities are +/// available. For example, [black54] is a pure black with 54% opacity. class Colors { Colors._(); From 2a67795f3ede756d8c1365f08bbc800dab60290d Mon Sep 17 00:00:00 2001 From: Wyatt Arent Date: Sat, 22 Oct 2016 21:51:53 -0700 Subject: [PATCH 16/66] #6344 update google.com/material links to material.google.com (#6484) --- packages/flutter/lib/src/material/colors.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 9771f58bc074..de35aaab3062 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -5,7 +5,7 @@ import 'dart:ui' show Color; /// [Color] constants which represent Material design's -/// [color palette](http://www.google.com/design/spec/style/color.html). +/// [color palette](http://material.google.com/style/color.html). /// /// To select a specific color from one of the swatches, index into the swatch /// using an integer for the specific color desired, as follows: From 5267516b4e31b33cdf2ed1e146f6ddc9b0c9128c Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Mon, 24 Oct 2016 10:40:52 -0700 Subject: [PATCH 17/66] Improve docs for colors (#6473) --- packages/flutter/lib/src/material/colors.dart | 517 +++++++++++++++++- 1 file changed, 515 insertions(+), 2 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index de35aaab3062..4c166cda80fa 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -7,6 +7,11 @@ import 'dart:ui' show Color; /// [Color] constants which represent Material design's /// [color palette](http://material.google.com/style/color.html). /// +/// Instead of using an absolute color from these palettes, consider using +/// [Theme.of] to obtain the local [ThemeData] structure, which exposes the +/// colors selected for the current theme, such as [ThemeData.primaryColor] and +/// [ThemeData.accentColor] (among many others). +/// /// To select a specific color from one of the swatches, index into the swatch /// using an integer for the specific color desired, as follows: /// @@ -32,9 +37,25 @@ class Colors { static const Color black = const Color(0xFF000000); /// Black with 87% opacity. + /// + /// This is a good contrasting color for text in light themes. + /// + /// See also: + /// + /// * [Typography.black], which uses this color for its text styles. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Color black87 = const Color(0xDD000000); /// Black with 54% opacity. + /// + /// This is a color commonly used for headings in light themes. + /// + /// See also: + /// + /// * [Typography.black], which uses this color for its text styles. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Color black54 = const Color(0x8A000000); /// Black with 38% opacity. @@ -50,6 +71,12 @@ class Colors { /// Black with 26% opacity. /// /// Used for disabled radio buttons and the text of disabled flat buttons in light themes. + /// + /// See also: + /// + /// * [ThemeData.disabledColor], which uses this color by default in light themes. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Color black26 = const Color(0x42000000); /// Black with 12% opacity. @@ -59,14 +86,37 @@ class Colors { /// Completely opaque white. + /// + /// This is a good contrasting color for the [ThemeData.primaryColor] in the + /// dark theme. See [ThemeData.brightness]. + /// + /// See also: + /// + /// * [Typography.white], which uses this color for its text styles. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Color white = const Color(0xFFFFFFFF); /// White with 70% opacity. + /// + /// This is a color commonly used for headings in dark themes. + /// + /// See also: + /// + /// * [Typography.white], which uses this color for its text styles. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Color white70 = const Color(0xB3FFFFFF); /// White with 32% opacity. /// /// Used for disabled radio buttons and the text of disabled flat buttons in dark themes. + /// + /// See also: + /// + /// * [ThemeData.disabledColor], which uses this color by default in dark themes. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Color white30 = const Color(0x4DFFFFFF); /// White with 12% opacity. @@ -79,6 +129,19 @@ class Colors { /// The red primary swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.red[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [redAccent], the corresponding accent colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map red = const { 50: const Color(0xFFFFEBEE), 100: const Color(0xFFFFCDD2), @@ -93,6 +156,19 @@ class Colors { }; /// The red accent swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.redAccent[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [red], the corresponding primary colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map redAccent = const { 100: const Color(0xFFFF8A80), 200: const Color(0xFFFF5252), @@ -101,6 +177,19 @@ class Colors { }; /// The pink primary swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.pink[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [pinkAccent], the corresponding accent colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map pink = const { 50: const Color(0xFFFCE4EC), 100: const Color(0xFFF8BBD0), @@ -115,6 +204,19 @@ class Colors { }; /// The pink accent swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.pinkAccent[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [pink], the corresponding primary colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map pinkAccent = const { 100: const Color(0xFFFF80AB), 200: const Color(0xFFFF4081), @@ -123,6 +225,19 @@ class Colors { }; /// The purple primary swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.purple[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [purpleAccent], the corresponding accent colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map purple = const { 50: const Color(0xFFF3E5F5), 100: const Color(0xFFE1BEE7), @@ -137,6 +252,19 @@ class Colors { }; /// The purple accent swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.purpleAccent[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [purple], the corresponding primary colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map purpleAccent = const { 100: const Color(0xFFEA80FC), 200: const Color(0xFFE040FB), @@ -145,6 +273,19 @@ class Colors { }; /// The deep purple primary swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.deepPurple[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [deepPurpleAccent], the corresponding accent colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map deepPurple = const { 50: const Color(0xFFEDE7F6), 100: const Color(0xFFD1C4E9), @@ -159,6 +300,19 @@ class Colors { }; /// The deep purple accent swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.deepPurpleAccent[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [deepPurple], the corresponding primary colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map deepPurpleAccent = const { 100: const Color(0xFFB388FF), 200: const Color(0xFF7C4DFF), @@ -167,6 +321,19 @@ class Colors { }; /// The indigo primary swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.indigo[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [indigoAccent], the corresponding accent colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map indigo = const { 50: const Color(0xFFE8EAF6), 100: const Color(0xFFC5CAE9), @@ -181,6 +348,19 @@ class Colors { }; /// The indigo accent swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.indigoAccent[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [indigo], the corresponding primary colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map indigoAccent = const { 100: const Color(0xFF8C9EFF), 200: const Color(0xFF536DFE), @@ -189,6 +369,19 @@ class Colors { }; /// The blue primary swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.blue[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [blueAccent], the corresponding accent colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map blue = const { 50: const Color(0xFFE3F2FD), 100: const Color(0xFFBBDEFB), @@ -203,6 +396,19 @@ class Colors { }; /// The blue accent swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.blueAccent[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [blue], the corresponding primary colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map blueAccent = const { 100: const Color(0xFF82B1FF), 200: const Color(0xFF448AFF), @@ -211,6 +417,19 @@ class Colors { }; /// The light blue primary swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.lightBlue[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [lightBlueAccent], the corresponding accent colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map lightBlue = const { 50: const Color(0xFFE1F5FE), 100: const Color(0xFFB3E5FC), @@ -225,6 +444,19 @@ class Colors { }; /// The light blue accent swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.lightBlueAccent[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [lightBlue], the corresponding primary colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map lightBlueAccent = const { 100: const Color(0xFF80D8FF), 200: const Color(0xFF40C4FF), @@ -233,6 +465,19 @@ class Colors { }; /// The cyan primary swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.cyan[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [cyanAccent], the corresponding accent colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map cyan = const { 50: const Color(0xFFE0F7FA), 100: const Color(0xFFB2EBF2), @@ -247,6 +492,19 @@ class Colors { }; /// The cyan accent swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.cyanAccent[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [cyan], the corresponding primary colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map cyanAccent = const { 100: const Color(0xFF84FFFF), 200: const Color(0xFF18FFFF), @@ -255,6 +513,19 @@ class Colors { }; /// The teal primary swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.teal[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [tealAccent], the corresponding accent colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map teal = const { 50: const Color(0xFFE0F2F1), 100: const Color(0xFFB2DFDB), @@ -269,6 +540,19 @@ class Colors { }; /// The teal accent swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.tealAccent[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [teal], the corresponding primary colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map tealAccent = const { 100: const Color(0xFFA7FFEB), 200: const Color(0xFF64FFDA), @@ -277,6 +561,19 @@ class Colors { }; /// The green primary swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.green[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [greenAccent], the corresponding accent colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map green = const { 50: const Color(0xFFE8F5E9), 100: const Color(0xFFC8E6C9), @@ -291,6 +588,19 @@ class Colors { }; /// The green accent swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.greenAccent[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [green], the corresponding primary colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map greenAccent = const { 100: const Color(0xFFB9F6CA), 200: const Color(0xFF69F0AE), @@ -299,6 +609,19 @@ class Colors { }; /// The light green primary swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.lightGreen[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [lightGreenAccent], the corresponding accent colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map lightGreen = const { 50: const Color(0xFFF1F8E9), 100: const Color(0xFFDCEDC8), @@ -313,6 +636,19 @@ class Colors { }; /// The light green accent swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.lightGreenAccent[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [lightGreen], the corresponding primary colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map lightGreenAccent = const { 100: const Color(0xFFCCFF90), 200: const Color(0xFFB2FF59), @@ -321,6 +657,19 @@ class Colors { }; /// The lime primary swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.lime[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [limeAccent], the corresponding accent colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map lime = const { 50: const Color(0xFFF9FBE7), 100: const Color(0xFFF0F4C3), @@ -335,6 +684,19 @@ class Colors { }; /// The lime accent primary swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.limeAccent[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [lime], the corresponding primary colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map limeAccent = const { 100: const Color(0xFFF4FF81), 200: const Color(0xFFEEFF41), @@ -343,6 +705,19 @@ class Colors { }; /// The yellow primary swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.yellow[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [yellowAccentAccent], the corresponding accent colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map yellow = const { 50: const Color(0xFFFFFDE7), 100: const Color(0xFFFFF9C4), @@ -357,6 +732,19 @@ class Colors { }; /// The yellow accent swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.yellowAccent[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [yellow], the corresponding primary colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map yellowAccent = const { 100: const Color(0xFFFFFF8D), 200: const Color(0xFFFFFF00), @@ -365,6 +753,19 @@ class Colors { }; /// The amber primary swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.amber[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [amberAccent], the corresponding accent colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map amber = const { 50: const Color(0xFFFFF8E1), 100: const Color(0xFFFFECB3), @@ -379,6 +780,19 @@ class Colors { }; /// The amber accent swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.amberAccent[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [amber], the corresponding primary colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map amberAccent = const { 100: const Color(0xFFFFE57F), 200: const Color(0xFFFFD740), @@ -387,6 +801,19 @@ class Colors { }; /// The orange primary swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.orange[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [orangeAccent], the corresponding accent colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map orange = const { 50: const Color(0xFFFFF3E0), 100: const Color(0xFFFFE0B2), @@ -401,6 +828,19 @@ class Colors { }; /// The orange accent swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.orangeAccent[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [orange], the corresponding primary colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map orangeAccent = const { 100: const Color(0xFFFFD180), 200: const Color(0xFFFFAB40), @@ -409,6 +849,19 @@ class Colors { }; /// The deep orange primary swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.deepOrange[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [deepOrangeAccent], the corresponding accent colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map deepOrange = const { 50: const Color(0xFFFBE9E7), 100: const Color(0xFFFFCCBC), @@ -423,6 +876,19 @@ class Colors { }; /// The deep orange accent swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.deepOrangeAccent[400], + /// ), + /// ``` + /// + /// See also: + /// + /// * [deepOrange], the corresponding primary colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map deepOrangeAccent = const { 100: const Color(0xFFFF9E80), 200: const Color(0xFFFF6E40), @@ -431,6 +897,20 @@ class Colors { }; /// The brown primary swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.brown[400], + /// ), + /// ``` + /// + /// This swatch has no corresponding accent swatch. + /// + /// See also: + /// + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map brown = const { 50: const Color(0xFFEFEBE9), 100: const Color(0xFFD7CCC8), @@ -445,22 +925,55 @@ class Colors { }; /// The grey primary swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.grey[400], + /// ), + /// ``` + /// + /// This swatch has no corresponding accent swatch. + /// + /// This swatch, in addition to the values 50 and 100 to 900 in 100 + /// increments, also features the special values 350 and 850. The 350 value is + /// used for raised button while pressed in light themes, and 850 is used for + /// the background color of the dark theme. See [ThemeData.brightness]. + /// + /// See also: + /// + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map grey = const { 50: const Color(0xFFFAFAFA), 100: const Color(0xFFF5F5F5), 200: const Color(0xFFEEEEEE), 300: const Color(0xFFE0E0E0), - 350: const Color(0xFFD6D6D6), // only for raised button while pressed in Light theme + 350: const Color(0xFFD6D6D6), // only for raised button while pressed in light theme 400: const Color(0xFFBDBDBD), 500: const Color(0xFF9E9E9E), 600: const Color(0xFF757575), 700: const Color(0xFF616161), 800: const Color(0xFF424242), - 850: const Color(0xFF303030), // only for background color in Dark theme + 850: const Color(0xFF303030), // only for background color in dark theme 900: const Color(0xFF212121), }; /// The blue-grey primary swatch. + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.blueGrey[400], + /// ), + /// ``` + /// + /// This swatch has no corresponding accent swatch. + /// + /// See also: + /// + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const Map blueGrey = const { 50: const Color(0xFFECEFF1), 100: const Color(0xFFCFD8DC), From bac98e184a57ed181e823308e411ea2a3e356051 Mon Sep 17 00:00:00 2001 From: Hans Muller Date: Fri, 17 Mar 2017 15:24:54 -0700 Subject: [PATCH 18/66] Now each Colors.foo constant is-a Color and a color swatch (#8833) --- packages/flutter/lib/src/material/colors.dart | 984 +++++++++++------- 1 file changed, 604 insertions(+), 380 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 4c166cda80fa..967503237499 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -2,9 +2,85 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:ui' show Color; +import 'dart:ui' show Color, hashValues; -/// [Color] constants which represent Material design's +/// A color that has a small table of related colors called a "swatch". +/// +/// See also: +/// +/// * [MaterialColor] and [MaterialAccentColor], which define material design +/// primary and accent color swatches. +/// * [Colors], which defines all of the standard material design colors. +class ColorSwatch extends Color { + // Creates a color that has a small table of related colors called a "swatch". + const ColorSwatch(int primary, this._swatch) : super(primary); + + final Map _swatch; + + /// Returns an element of the [swatch] table. + Color operator [](int index) => _swatch[index]; + + @override + bool operator ==(dynamic other) { + if (identical(this, other)) + return true; + if (other.runtimeType != runtimeType) + return false; + final ColorSwatch typedOther = other; + return super==(other) && _swatch == typedOther._swatch; + } + + @override + int get hashCode => hashValues(runtimeType, value, _swatch); + + @override + String toString() => '$runtimeType(primary value: ${super.toString()})'; + +} + +/// Defines a single color as well a color swatch with ten shades of the color. +/// +/// The color's shades are referred to by index. The greater the index, the +/// darker the color. There are 10 valid indices: 50, 100, 200, ..., 900. +/// The value of this color should the same the value of index 500 and [shade500]. +/// +/// See also: +/// +/// * [Colors], which defines all of the standard material colors. +class MaterialColor extends ColorSwatch { + const MaterialColor(int primary, Map swatch) : super(primary, swatch); + Color get shade50 => _swatch[50]; + Color get shade100 => _swatch[100]; + Color get shade200 => _swatch[200]; + Color get shade300 => _swatch[300]; + Color get shade400 => _swatch[400]; + Color get shade500 => _swatch[500]; + Color get shade600 => _swatch[600]; + Color get shade700 => _swatch[700]; + Color get shade800 => _swatch[800]; + Color get shade900 => _swatch[900]; +} + +/// Defines a single accent color as well a swatch of four shades of the +/// accent color. +/// +/// The color's shades are referred to by index, the colors with smaller +/// indices are lighter, larger indices are darker. There are four valid +/// indices: 100, 200, 400, and 700. The value of this color should be the +/// same as the value of index 200 and [shade200]. +/// +/// See also: +/// +/// * [Colors], which defines all of the standard material colors. +class MaterialAccentColor extends ColorSwatch { + const MaterialAccentColor(int primary, Map swatch) : super(primary, swatch); + Color get shade100 => _swatch[100]; + Color get shade200 => _swatch[200]; + Color get shade400 => _swatch[400]; + Color get shade700 => _swatch[700]; +} + +/// [Color] and [ColorSwatch] constants which represent Material design's /// [color palette](http://material.google.com/style/color.html). /// /// Instead of using an absolute color from these palettes, consider using @@ -19,6 +95,14 @@ import 'dart:ui' show Color; /// Colors.green[400] // Selects a mid-range green. /// ``` /// +/// Each ColorSwatch constant is a color and can used directly. For example +/// +/// ```dart +/// new Container( +/// color: Colors.blue, // same as Colors.blue[500] or Colors.blue.shade500 +/// ) +/// ``` +/// /// Most swatches have colors from 100 to 900 in increments of one hundred, plus /// the color 50. The smaller the number, the more pale the color. The greater /// the number, the darker the color. The accent swatches (e.g. [redAccent]) only @@ -128,7 +212,7 @@ class Colors { static const Color white10 = const Color(0x1AFFFFFF); - /// The red primary swatch. + /// The red primary color and swatch. /// /// ```dart /// new Icon( @@ -142,18 +226,22 @@ class Colors { /// * [redAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map red = const { - 50: const Color(0xFFFFEBEE), - 100: const Color(0xFFFFCDD2), - 200: const Color(0xFFEF9A9A), - 300: const Color(0xFFE57373), - 400: const Color(0xFFEF5350), - 500: const Color(0xFFF44336), - 600: const Color(0xFFE53935), - 700: const Color(0xFFD32F2F), - 800: const Color(0xFFC62828), - 900: const Color(0xFFB71C1C), - }; + static const int _redPrimaryValue = 0xFFF44336; + static const MaterialColor red = const MaterialColor( + _redPrimaryValue, + const { + 50: const Color(0xFFFFEBEE), + 100: const Color(0xFFFFCDD2), + 200: const Color(0xFFEF9A9A), + 300: const Color(0xFFE57373), + 400: const Color(0xFFEF5350), + 500: const Color(_redPrimaryValue), + 600: const Color(0xFFE53935), + 700: const Color(0xFFD32F2F), + 800: const Color(0xFFC62828), + 900: const Color(0xFFB71C1C), + }, + ); /// The red accent swatch. /// @@ -169,14 +257,18 @@ class Colors { /// * [red], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map redAccent = const { - 100: const Color(0xFFFF8A80), - 200: const Color(0xFFFF5252), - 400: const Color(0xFFFF1744), - 700: const Color(0xFFD50000), - }; + static const int _redAccentValue = 0xFFFF5252; + static const MaterialAccentColor redAccent = const MaterialAccentColor( + _redAccentValue, + const { + 100: const Color(0xFFFF8A80), + 200: const Color(_redAccentValue), + 400: const Color(0xFFFF1744), + 700: const Color(0xFFD50000), + }, + ); - /// The pink primary swatch. + /// The pink primary color and swatch. /// /// ```dart /// new Icon( @@ -190,20 +282,24 @@ class Colors { /// * [pinkAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map pink = const { - 50: const Color(0xFFFCE4EC), - 100: const Color(0xFFF8BBD0), - 200: const Color(0xFFF48FB1), - 300: const Color(0xFFF06292), - 400: const Color(0xFFEC407A), - 500: const Color(0xFFE91E63), - 600: const Color(0xFFD81B60), - 700: const Color(0xFFC2185B), - 800: const Color(0xFFAD1457), - 900: const Color(0xFF880E4F), - }; - - /// The pink accent swatch. + static const int _pinkPrimaryValue = 0xFFE91E63; + static const MaterialColor pink = const MaterialColor( + _pinkPrimaryValue, + const { + 50: const Color(0xFFFCE4EC), + 100: const Color(0xFFF8BBD0), + 200: const Color(0xFFF48FB1), + 300: const Color(0xFFF06292), + 400: const Color(0xFFEC407A), + 500: const Color(_pinkPrimaryValue), + 600: const Color(0xFFD81B60), + 700: const Color(0xFFC2185B), + 800: const Color(0xFFAD1457), + 900: const Color(0xFF880E4F), + }, + ); + + /// The pink accent color swatch. /// /// ```dart /// new Icon( @@ -217,14 +313,18 @@ class Colors { /// * [pink], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map pinkAccent = const { - 100: const Color(0xFFFF80AB), - 200: const Color(0xFFFF4081), - 400: const Color(0xFFF50057), - 700: const Color(0xFFC51162), - }; + static const int _pinkAccentPrimaryValue = 0xFFFF4081; + static const MaterialAccentColor pinkAccent = const MaterialAccentColor( + _pinkAccentPrimaryValue, + const { + 100: const Color(0xFFFF80AB), + 200: const Color(_pinkAccentPrimaryValue), + 400: const Color(0xFFF50057), + 700: const Color(0xFFC51162), + }, + ); - /// The purple primary swatch. + /// The purple primary color and swatch. /// /// ```dart /// new Icon( @@ -238,20 +338,24 @@ class Colors { /// * [purpleAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map purple = const { - 50: const Color(0xFFF3E5F5), - 100: const Color(0xFFE1BEE7), - 200: const Color(0xFFCE93D8), - 300: const Color(0xFFBA68C8), - 400: const Color(0xFFAB47BC), - 500: const Color(0xFF9C27B0), - 600: const Color(0xFF8E24AA), - 700: const Color(0xFF7B1FA2), - 800: const Color(0xFF6A1B9A), - 900: const Color(0xFF4A148C), - }; - - /// The purple accent swatch. + static const int _purplePrimaryValue = 0xFF9C27B0; + static const MaterialColor purple = const MaterialColor( + _purplePrimaryValue, + const { + 50: const Color(0xFFF3E5F5), + 100: const Color(0xFFE1BEE7), + 200: const Color(0xFFCE93D8), + 300: const Color(0xFFBA68C8), + 400: const Color(0xFFAB47BC), + 500: const Color(_purplePrimaryValue), + 600: const Color(0xFF8E24AA), + 700: const Color(0xFF7B1FA2), + 800: const Color(0xFF6A1B9A), + 900: const Color(0xFF4A148C), + }, + ); + + /// The purple accent color and swatch. /// /// ```dart /// new Icon( @@ -265,14 +369,18 @@ class Colors { /// * [purple], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map purpleAccent = const { - 100: const Color(0xFFEA80FC), - 200: const Color(0xFFE040FB), - 400: const Color(0xFFD500F9), - 700: const Color(0xFFAA00FF), - }; + static const int _purpleAccentPrimaryValue = 0xFFE040FB; + static const MaterialAccentColor purpleAccent = const MaterialAccentColor( + _purpleAccentPrimaryValue, + const { + 100: const Color(0xFFEA80FC), + 200: const Color(_purpleAccentPrimaryValue), + 400: const Color(0xFFD500F9), + 700: const Color(0xFFAA00FF), + }, + ); - /// The deep purple primary swatch. + /// The deep purple primary color and swatch. /// /// ```dart /// new Icon( @@ -286,20 +394,24 @@ class Colors { /// * [deepPurpleAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map deepPurple = const { - 50: const Color(0xFFEDE7F6), - 100: const Color(0xFFD1C4E9), - 200: const Color(0xFFB39DDB), - 300: const Color(0xFF9575CD), - 400: const Color(0xFF7E57C2), - 500: const Color(0xFF673AB7), - 600: const Color(0xFF5E35B1), - 700: const Color(0xFF512DA8), - 800: const Color(0xFF4527A0), - 900: const Color(0xFF311B92), - }; - - /// The deep purple accent swatch. + static const int _deepPurplePrimaryValue = 0xFF673AB7; + static const MaterialColor deepPurple = const MaterialColor( + _deepPurplePrimaryValue, + const { + 50: const Color(0xFFEDE7F6), + 100: const Color(0xFFD1C4E9), + 200: const Color(0xFFB39DDB), + 300: const Color(0xFF9575CD), + 400: const Color(0xFF7E57C2), + 500: const Color(_deepPurplePrimaryValue), + 600: const Color(0xFF5E35B1), + 700: const Color(0xFF512DA8), + 800: const Color(0xFF4527A0), + 900: const Color(0xFF311B92), + }, + ); + + /// The deep purple accent color and swatch. /// /// ```dart /// new Icon( @@ -313,14 +425,18 @@ class Colors { /// * [deepPurple], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map deepPurpleAccent = const { - 100: const Color(0xFFB388FF), - 200: const Color(0xFF7C4DFF), - 400: const Color(0xFF651FFF), - 700: const Color(0xFF6200EA), - }; + static const int _deepPurpleAccentPrimaryValue = 0xFF7C4DFF; + static const MaterialAccentColor deepPurpleAccent = const MaterialAccentColor( + _deepPurpleAccentPrimaryValue, + const { + 100: const Color(0xFFB388FF), + 200: const Color(_deepPurpleAccentPrimaryValue), + 400: const Color(0xFF651FFF), + 700: const Color(0xFF6200EA), + }, + ); - /// The indigo primary swatch. + /// The indigo primary color and swatch. /// /// ```dart /// new Icon( @@ -334,20 +450,24 @@ class Colors { /// * [indigoAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map indigo = const { - 50: const Color(0xFFE8EAF6), - 100: const Color(0xFFC5CAE9), - 200: const Color(0xFF9FA8DA), - 300: const Color(0xFF7986CB), - 400: const Color(0xFF5C6BC0), - 500: const Color(0xFF3F51B5), - 600: const Color(0xFF3949AB), - 700: const Color(0xFF303F9F), - 800: const Color(0xFF283593), - 900: const Color(0xFF1A237E), - }; - - /// The indigo accent swatch. + static const int _indigoPrimaryValue = 0xFF3F51B5; + static const MaterialColor indigo = const MaterialColor( + _indigoPrimaryValue, + const { + 50: const Color(0xFFE8EAF6), + 100: const Color(0xFFC5CAE9), + 200: const Color(0xFF9FA8DA), + 300: const Color(0xFF7986CB), + 400: const Color(0xFF5C6BC0), + 500: const Color(_indigoPrimaryValue), + 600: const Color(0xFF3949AB), + 700: const Color(0xFF303F9F), + 800: const Color(0xFF283593), + 900: const Color(0xFF1A237E), + }, + ); + + /// The indigo accent color and swatch. /// /// ```dart /// new Icon( @@ -361,14 +481,18 @@ class Colors { /// * [indigo], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map indigoAccent = const { - 100: const Color(0xFF8C9EFF), - 200: const Color(0xFF536DFE), - 400: const Color(0xFF3D5AFE), - 700: const Color(0xFF304FFE), - }; + static const int _indigoAccentPrimaryValue = 0xFF536DFE; + static const MaterialAccentColor indigoAccent = const MaterialAccentColor( + _indigoAccentPrimaryValue, + const { + 100: const Color(0xFF8C9EFF), + 200: const Color(_indigoAccentPrimaryValue), + 400: const Color(0xFF3D5AFE), + 700: const Color(0xFF304FFE), + }, + ); - /// The blue primary swatch. + /// The blue primary color and swatch. /// /// ```dart /// new Icon( @@ -382,20 +506,24 @@ class Colors { /// * [blueAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map blue = const { - 50: const Color(0xFFE3F2FD), - 100: const Color(0xFFBBDEFB), - 200: const Color(0xFF90CAF9), - 300: const Color(0xFF64B5F6), - 400: const Color(0xFF42A5F5), - 500: const Color(0xFF2196F3), - 600: const Color(0xFF1E88E5), - 700: const Color(0xFF1976D2), - 800: const Color(0xFF1565C0), - 900: const Color(0xFF0D47A1), - }; - - /// The blue accent swatch. + static const int _bluePrimaryValue = 0xFF2196F3; + static const MaterialColor blue = const MaterialColor( + _bluePrimaryValue, + const { + 50: const Color(0xFFE3F2FD), + 100: const Color(0xFFBBDEFB), + 200: const Color(0xFF90CAF9), + 300: const Color(0xFF64B5F6), + 400: const Color(0xFF42A5F5), + 500: const Color(_bluePrimaryValue), + 600: const Color(0xFF1E88E5), + 700: const Color(0xFF1976D2), + 800: const Color(0xFF1565C0), + 900: const Color(0xFF0D47A1), + }, + ); + + /// The blue accent color and swatch. /// /// ```dart /// new Icon( @@ -409,14 +537,18 @@ class Colors { /// * [blue], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map blueAccent = const { - 100: const Color(0xFF82B1FF), - 200: const Color(0xFF448AFF), - 400: const Color(0xFF2979FF), - 700: const Color(0xFF2962FF), - }; + static const int _blueAccentPrimaryValue = 0xFF448AFF; + static const MaterialAccentColor blueAccent = const MaterialAccentColor( + _blueAccentPrimaryValue, + const { + 100: const Color(0xFF82B1FF), + 200: const Color(_blueAccentPrimaryValue), + 400: const Color(0xFF2979FF), + 700: const Color(0xFF2962FF), + }, + ); - /// The light blue primary swatch. + /// The light blue primary color and swatch. /// /// ```dart /// new Icon( @@ -430,18 +562,22 @@ class Colors { /// * [lightBlueAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map lightBlue = const { - 50: const Color(0xFFE1F5FE), - 100: const Color(0xFFB3E5FC), - 200: const Color(0xFF81D4FA), - 300: const Color(0xFF4FC3F7), - 400: const Color(0xFF29B6F6), - 500: const Color(0xFF03A9F4), - 600: const Color(0xFF039BE5), - 700: const Color(0xFF0288D1), - 800: const Color(0xFF0277BD), - 900: const Color(0xFF01579B), - }; + static const int _lightBluePrimaryValue = 0xFF03A9F4; + static const MaterialColor lightBlue = const MaterialColor( + _lightBluePrimaryValue, + const { + 50: const Color(0xFFE1F5FE), + 100: const Color(0xFFB3E5FC), + 200: const Color(0xFF81D4FA), + 300: const Color(0xFF4FC3F7), + 400: const Color(0xFF29B6F6), + 500: const Color(_lightBluePrimaryValue), + 600: const Color(0xFF039BE5), + 700: const Color(0xFF0288D1), + 800: const Color(0xFF0277BD), + 900: const Color(0xFF01579B), + }, + ); /// The light blue accent swatch. /// @@ -457,14 +593,18 @@ class Colors { /// * [lightBlue], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map lightBlueAccent = const { - 100: const Color(0xFF80D8FF), - 200: const Color(0xFF40C4FF), - 400: const Color(0xFF00B0FF), - 700: const Color(0xFF0091EA), - }; + static const int _lightBlueAccentPrimaryValue = 0xFF40C4FF; + static const MaterialAccentColor lightBlueAccent = const MaterialAccentColor( + _lightBlueAccentPrimaryValue, + const { + 100: const Color(0xFF80D8FF), + 200: const Color(_lightBlueAccentPrimaryValue), + 400: const Color(0xFF00B0FF), + 700: const Color(0xFF0091EA), + }, + ); - /// The cyan primary swatch. + /// The cyan primary color and swatch. /// /// ```dart /// new Icon( @@ -478,20 +618,24 @@ class Colors { /// * [cyanAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map cyan = const { - 50: const Color(0xFFE0F7FA), - 100: const Color(0xFFB2EBF2), - 200: const Color(0xFF80DEEA), - 300: const Color(0xFF4DD0E1), - 400: const Color(0xFF26C6DA), - 500: const Color(0xFF00BCD4), - 600: const Color(0xFF00ACC1), - 700: const Color(0xFF0097A7), - 800: const Color(0xFF00838F), - 900: const Color(0xFF006064), - }; - - /// The cyan accent swatch. + static const int _cyanPrimaryValue = 0xFF00BCD4; + static const MaterialColor cyan = const MaterialColor( + _cyanPrimaryValue, + const { + 50: const Color(0xFFE0F7FA), + 100: const Color(0xFFB2EBF2), + 200: const Color(0xFF80DEEA), + 300: const Color(0xFF4DD0E1), + 400: const Color(0xFF26C6DA), + 500: const Color(_cyanPrimaryValue), + 600: const Color(0xFF00ACC1), + 700: const Color(0xFF0097A7), + 800: const Color(0xFF00838F), + 900: const Color(0xFF006064), + }, + ); + + /// The cyan accent color and swatch. /// /// ```dart /// new Icon( @@ -505,14 +649,18 @@ class Colors { /// * [cyan], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map cyanAccent = const { - 100: const Color(0xFF84FFFF), - 200: const Color(0xFF18FFFF), - 400: const Color(0xFF00E5FF), - 700: const Color(0xFF00B8D4), - }; + static const int _cyanAccentPrimaryValue = 0xFF18FFFF; + static const MaterialAccentColor cyanAccent = const MaterialAccentColor( + _cyanAccentPrimaryValue, + const { + 100: const Color(0xFF84FFFF), + 200: const Color(_cyanAccentPrimaryValue), + 400: const Color(0xFF00E5FF), + 700: const Color(0xFF00B8D4), + }, + ); - /// The teal primary swatch. + /// The teal primary color and swatch. /// /// ```dart /// new Icon( @@ -526,20 +674,24 @@ class Colors { /// * [tealAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map teal = const { - 50: const Color(0xFFE0F2F1), - 100: const Color(0xFFB2DFDB), - 200: const Color(0xFF80CBC4), - 300: const Color(0xFF4DB6AC), - 400: const Color(0xFF26A69A), - 500: const Color(0xFF009688), - 600: const Color(0xFF00897B), - 700: const Color(0xFF00796B), - 800: const Color(0xFF00695C), - 900: const Color(0xFF004D40), - }; - - /// The teal accent swatch. + static const int _tealPrimaryValue = 0xFF009688; + static const MaterialColor teal = const MaterialColor( + _tealPrimaryValue, + const { + 50: const Color(0xFFE0F2F1), + 100: const Color(0xFFB2DFDB), + 200: const Color(0xFF80CBC4), + 300: const Color(0xFF4DB6AC), + 400: const Color(0xFF26A69A), + 500: const Color(_tealPrimaryValue), + 600: const Color(0xFF00897B), + 700: const Color(0xFF00796B), + 800: const Color(0xFF00695C), + 900: const Color(0xFF004D40), + }, + ); + + /// The teal accent color and swatch. /// /// ```dart /// new Icon( @@ -553,14 +705,18 @@ class Colors { /// * [teal], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map tealAccent = const { - 100: const Color(0xFFA7FFEB), - 200: const Color(0xFF64FFDA), - 400: const Color(0xFF1DE9B6), - 700: const Color(0xFF00BFA5), - }; + static const int _tealAccentPrimaryValue = 0xFF64FFDA; + static const MaterialAccentColor tealAccent = const MaterialAccentColor( + _tealAccentPrimaryValue, + const { + 100: const Color(0xFFA7FFEB), + 200: const Color(_tealAccentPrimaryValue), + 400: const Color(0xFF1DE9B6), + 700: const Color(0xFF00BFA5), + }, + ); - /// The green primary swatch. + /// The green primary color and swatch. /// /// ```dart /// new Icon( @@ -574,20 +730,24 @@ class Colors { /// * [greenAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map green = const { - 50: const Color(0xFFE8F5E9), - 100: const Color(0xFFC8E6C9), - 200: const Color(0xFFA5D6A7), - 300: const Color(0xFF81C784), - 400: const Color(0xFF66BB6A), - 500: const Color(0xFF4CAF50), - 600: const Color(0xFF43A047), - 700: const Color(0xFF388E3C), - 800: const Color(0xFF2E7D32), - 900: const Color(0xFF1B5E20), - }; - - /// The green accent swatch. + static const int _greenPrimaryValue = 0xFF4CAF50; + static const MaterialColor green = const MaterialColor( + _greenPrimaryValue, + const { + 50: const Color(0xFFE8F5E9), + 100: const Color(0xFFC8E6C9), + 200: const Color(0xFFA5D6A7), + 300: const Color(0xFF81C784), + 400: const Color(0xFF66BB6A), + 500: const Color(_greenPrimaryValue), + 600: const Color(0xFF43A047), + 700: const Color(0xFF388E3C), + 800: const Color(0xFF2E7D32), + 900: const Color(0xFF1B5E20), + }, + ); + + /// The green accent color and swatch. /// /// ```dart /// new Icon( @@ -601,14 +761,18 @@ class Colors { /// * [green], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map greenAccent = const { - 100: const Color(0xFFB9F6CA), - 200: const Color(0xFF69F0AE), - 400: const Color(0xFF00E676), - 700: const Color(0xFF00C853), - }; + static const int _greenAccentPrimaryValue = 0xFF69F0AE; + static const MaterialAccentColor greenAccent = const MaterialAccentColor( + _greenAccentPrimaryValue, + const { + 100: const Color(0xFFB9F6CA), + 200: const Color(_greenAccentPrimaryValue), + 400: const Color(0xFF00E676), + 700: const Color(0xFF00C853), + }, + ); - /// The light green primary swatch. + /// The light green primary color and swatch. /// /// ```dart /// new Icon( @@ -622,20 +786,24 @@ class Colors { /// * [lightGreenAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map lightGreen = const { - 50: const Color(0xFFF1F8E9), - 100: const Color(0xFFDCEDC8), - 200: const Color(0xFFC5E1A5), - 300: const Color(0xFFAED581), - 400: const Color(0xFF9CCC65), - 500: const Color(0xFF8BC34A), - 600: const Color(0xFF7CB342), - 700: const Color(0xFF689F38), - 800: const Color(0xFF558B2F), - 900: const Color(0xFF33691E), - }; - - /// The light green accent swatch. + static const int _lightGreenPrimaryValue = 0xFF8BC34A; + static const MaterialColor lightGreen = const MaterialColor( + _lightGreenPrimaryValue, + const { + 50: const Color(0xFFF1F8E9), + 100: const Color(0xFFDCEDC8), + 200: const Color(0xFFC5E1A5), + 300: const Color(0xFFAED581), + 400: const Color(0xFF9CCC65), + 500: const Color(_lightGreenPrimaryValue), + 600: const Color(0xFF7CB342), + 700: const Color(0xFF689F38), + 800: const Color(0xFF558B2F), + 900: const Color(0xFF33691E), + }, + ); + + /// The light green accent color and swatch. /// /// ```dart /// new Icon( @@ -649,14 +817,18 @@ class Colors { /// * [lightGreen], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map lightGreenAccent = const { - 100: const Color(0xFFCCFF90), - 200: const Color(0xFFB2FF59), - 400: const Color(0xFF76FF03), - 700: const Color(0xFF64DD17), - }; + static const int _lightGreenAccentPrimaryValue = 0xFFB2FF59; + static const MaterialAccentColor lightGreenAccent = const MaterialAccentColor( + _lightGreenAccentPrimaryValue, + const { + 100: const Color(0xFFCCFF90), + 200: const Color(_lightGreenAccentPrimaryValue), + 400: const Color(0xFF76FF03), + 700: const Color(0xFF64DD17), + }, + ); - /// The lime primary swatch. + /// The lime primary color and swatch. /// /// ```dart /// new Icon( @@ -670,20 +842,24 @@ class Colors { /// * [limeAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map lime = const { - 50: const Color(0xFFF9FBE7), - 100: const Color(0xFFF0F4C3), - 200: const Color(0xFFE6EE9C), - 300: const Color(0xFFDCE775), - 400: const Color(0xFFD4E157), - 500: const Color(0xFFCDDC39), - 600: const Color(0xFFC0CA33), - 700: const Color(0xFFAFB42B), - 800: const Color(0xFF9E9D24), - 900: const Color(0xFF827717), - }; - - /// The lime accent primary swatch. + static const int _limePrimaryValue = 0xFFCDDC39; + static const MaterialColor lime = const MaterialColor( + _limePrimaryValue, + const { + 50: const Color(0xFFF9FBE7), + 100: const Color(0xFFF0F4C3), + 200: const Color(0xFFE6EE9C), + 300: const Color(0xFFDCE775), + 400: const Color(0xFFD4E157), + 500: const Color(_limePrimaryValue), + 600: const Color(0xFFC0CA33), + 700: const Color(0xFFAFB42B), + 800: const Color(0xFF9E9D24), + 900: const Color(0xFF827717), + }, + ); + + /// The lime accent primary color and swatch. /// /// ```dart /// new Icon( @@ -697,14 +873,18 @@ class Colors { /// * [lime], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map limeAccent = const { - 100: const Color(0xFFF4FF81), - 200: const Color(0xFFEEFF41), - 400: const Color(0xFFC6FF00), - 700: const Color(0xFFAEEA00), - }; + static const int _limeAccentPrimaryValue = 0xFFEEFF41; + static const MaterialAccentColor limeAccent = const MaterialAccentColor( + _limeAccentPrimaryValue, + const { + 100: const Color(0xFFF4FF81), + 200: const Color(_limeAccentPrimaryValue), + 400: const Color(0xFFC6FF00), + 700: const Color(0xFFAEEA00), + }, + ); - /// The yellow primary swatch. + /// The yellow primary color and swatch. /// /// ```dart /// new Icon( @@ -718,20 +898,24 @@ class Colors { /// * [yellowAccentAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map yellow = const { - 50: const Color(0xFFFFFDE7), - 100: const Color(0xFFFFF9C4), - 200: const Color(0xFFFFF59D), - 300: const Color(0xFFFFF176), - 400: const Color(0xFFFFEE58), - 500: const Color(0xFFFFEB3B), - 600: const Color(0xFFFDD835), - 700: const Color(0xFFFBC02D), - 800: const Color(0xFFF9A825), - 900: const Color(0xFFF57F17), - }; - - /// The yellow accent swatch. + static const int _yellowPrimaryValue = 0xFFFFEB3B; + static const MaterialColor yellow = const MaterialColor( + _yellowPrimaryValue, + const { + 50: const Color(0xFFFFFDE7), + 100: const Color(0xFFFFF9C4), + 200: const Color(0xFFFFF59D), + 300: const Color(0xFFFFF176), + 400: const Color(0xFFFFEE58), + 500: const Color(_yellowPrimaryValue), + 600: const Color(0xFFFDD835), + 700: const Color(0xFFFBC02D), + 800: const Color(0xFFF9A825), + 900: const Color(0xFFF57F17), + }, + ); + + /// The yellow accent color and swatch. /// /// ```dart /// new Icon( @@ -745,14 +929,18 @@ class Colors { /// * [yellow], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map yellowAccent = const { - 100: const Color(0xFFFFFF8D), - 200: const Color(0xFFFFFF00), - 400: const Color(0xFFFFEA00), - 700: const Color(0xFFFFD600), - }; + static const int _yellowAccentPrimaryValue = 0xFFFFFF00; + static const MaterialAccentColor yellowAccent = const MaterialAccentColor( + _yellowAccentPrimaryValue, + const { + 100: const Color(0xFFFFFF8D), + 200: const Color(_yellowAccentPrimaryValue), + 400: const Color(0xFFFFEA00), + 700: const Color(0xFFFFD600), + }, + ); - /// The amber primary swatch. + /// The amber primary color and swatch. /// /// ```dart /// new Icon( @@ -766,20 +954,24 @@ class Colors { /// * [amberAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map amber = const { - 50: const Color(0xFFFFF8E1), - 100: const Color(0xFFFFECB3), - 200: const Color(0xFFFFE082), - 300: const Color(0xFFFFD54F), - 400: const Color(0xFFFFCA28), - 500: const Color(0xFFFFC107), - 600: const Color(0xFFFFB300), - 700: const Color(0xFFFFA000), - 800: const Color(0xFFFF8F00), - 900: const Color(0xFFFF6F00), - }; - - /// The amber accent swatch. + static const int _amberPrimaryValue = 0xFFFFC107; + static const MaterialColor amber = const MaterialColor( + _amberPrimaryValue, + const { + 50: const Color(0xFFFFF8E1), + 100: const Color(0xFFFFECB3), + 200: const Color(0xFFFFE082), + 300: const Color(0xFFFFD54F), + 400: const Color(0xFFFFCA28), + 500: const Color(_amberPrimaryValue), + 600: const Color(0xFFFFB300), + 700: const Color(0xFFFFA000), + 800: const Color(0xFFFF8F00), + 900: const Color(0xFFFF6F00), + }, + ); + + /// The amber accent color and swatch. /// /// ```dart /// new Icon( @@ -793,14 +985,18 @@ class Colors { /// * [amber], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map amberAccent = const { - 100: const Color(0xFFFFE57F), - 200: const Color(0xFFFFD740), - 400: const Color(0xFFFFC400), - 700: const Color(0xFFFFAB00), - }; + static const int _amberAccentPrimaryValue = 0xFFFFD740; + static const MaterialAccentColor amberAccent = const MaterialAccentColor( + _amberAccentPrimaryValue, + const { + 100: const Color(0xFFFFE57F), + 200: const Color(_amberAccentPrimaryValue), + 400: const Color(0xFFFFC400), + 700: const Color(0xFFFFAB00), + }, + ); - /// The orange primary swatch. + /// The orange primary color and swatch. /// /// ```dart /// new Icon( @@ -814,20 +1010,24 @@ class Colors { /// * [orangeAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map orange = const { - 50: const Color(0xFFFFF3E0), - 100: const Color(0xFFFFE0B2), - 200: const Color(0xFFFFCC80), - 300: const Color(0xFFFFB74D), - 400: const Color(0xFFFFA726), - 500: const Color(0xFFFF9800), - 600: const Color(0xFFFB8C00), - 700: const Color(0xFFF57C00), - 800: const Color(0xFFEF6C00), - 900: const Color(0xFFE65100), - }; - - /// The orange accent swatch. + static const int _orangePrimaryValue = 0xFFFF9800; + static const MaterialColor orange = const MaterialColor( + _orangePrimaryValue, + const { + 50: const Color(0xFFFFF3E0), + 100: const Color(0xFFFFE0B2), + 200: const Color(0xFFFFCC80), + 300: const Color(0xFFFFB74D), + 400: const Color(0xFFFFA726), + 500: const Color(_orangePrimaryValue), + 600: const Color(0xFFFB8C00), + 700: const Color(0xFFF57C00), + 800: const Color(0xFFEF6C00), + 900: const Color(0xFFE65100), + }, + ); + + /// The orange accent color and swatch. /// /// ```dart /// new Icon( @@ -841,14 +1041,18 @@ class Colors { /// * [orange], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map orangeAccent = const { - 100: const Color(0xFFFFD180), - 200: const Color(0xFFFFAB40), - 400: const Color(0xFFFF9100), - 700: const Color(0xFFFF6D00), - }; + static const int _orangeAccentPrimaryValue = 0xFFFFAB40; + static const MaterialAccentColor orangeAccent = const MaterialAccentColor( + _orangeAccentPrimaryValue, + const { + 100: const Color(0xFFFFD180), + 200: const Color(_orangeAccentPrimaryValue), + 400: const Color(0xFFFF9100), + 700: const Color(0xFFFF6D00), + }, + ); - /// The deep orange primary swatch. + /// The deep orange primary color and swatch. /// /// ```dart /// new Icon( @@ -862,20 +1066,24 @@ class Colors { /// * [deepOrangeAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map deepOrange = const { - 50: const Color(0xFFFBE9E7), - 100: const Color(0xFFFFCCBC), - 200: const Color(0xFFFFAB91), - 300: const Color(0xFFFF8A65), - 400: const Color(0xFFFF7043), - 500: const Color(0xFFFF5722), - 600: const Color(0xFFF4511E), - 700: const Color(0xFFE64A19), - 800: const Color(0xFFD84315), - 900: const Color(0xFFBF360C), - }; - - /// The deep orange accent swatch. + static const int _deepOrangePrimaryValue = 0xFFFF5722; + static const MaterialColor deepOrange = const MaterialColor( + _deepOrangePrimaryValue, + const { + 50: const Color(0xFFFBE9E7), + 100: const Color(0xFFFFCCBC), + 200: const Color(0xFFFFAB91), + 300: const Color(0xFFFF8A65), + 400: const Color(0xFFFF7043), + 500: const Color(_deepOrangePrimaryValue), + 600: const Color(0xFFF4511E), + 700: const Color(0xFFE64A19), + 800: const Color(0xFFD84315), + 900: const Color(0xFFBF360C), + }, + ); + + /// The deep orange accent color and swatch. /// /// ```dart /// new Icon( @@ -889,14 +1097,18 @@ class Colors { /// * [deepOrange], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map deepOrangeAccent = const { - 100: const Color(0xFFFF9E80), - 200: const Color(0xFFFF6E40), - 400: const Color(0xFFFF3D00), - 700: const Color(0xFFDD2C00), - }; + static const int _deepOrangeAccentPrimaryValue = 0xFFFF6E40; + static const MaterialAccentColor deepOrangeAccent = const MaterialAccentColor( + _deepOrangeAccentPrimaryValue, + const { + 100: const Color(0xFFFF9E80), + 200: const Color(_deepOrangeAccentPrimaryValue), + 400: const Color(0xFFFF3D00), + 700: const Color(0xFFDD2C00), + }, + ); - /// The brown primary swatch. + /// The brown primary color and swatch. /// /// ```dart /// new Icon( @@ -905,26 +1117,30 @@ class Colors { /// ), /// ``` /// - /// This swatch has no corresponding accent swatch. + /// This swatch has no corresponding accent color and swatch. /// /// See also: /// /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map brown = const { - 50: const Color(0xFFEFEBE9), - 100: const Color(0xFFD7CCC8), - 200: const Color(0xFFBCAAA4), - 300: const Color(0xFFA1887F), - 400: const Color(0xFF8D6E63), - 500: const Color(0xFF795548), - 600: const Color(0xFF6D4C41), - 700: const Color(0xFF5D4037), - 800: const Color(0xFF4E342E), - 900: const Color(0xFF3E2723), - }; - - /// The grey primary swatch. + static const int _brownPrimaryValue = 0xFF795548; + static const MaterialColor brown = const MaterialColor( + _brownPrimaryValue, + const { + 50: const Color(0xFFEFEBE9), + 100: const Color(0xFFD7CCC8), + 200: const Color(0xFFBCAAA4), + 300: const Color(0xFFA1887F), + 400: const Color(0xFF8D6E63), + 500: const Color(_brownPrimaryValue), + 600: const Color(0xFF6D4C41), + 700: const Color(0xFF5D4037), + 800: const Color(0xFF4E342E), + 900: const Color(0xFF3E2723), + }, + ); + + /// The grey primary color and swatch. /// /// ```dart /// new Icon( @@ -944,22 +1160,26 @@ class Colors { /// /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map grey = const { - 50: const Color(0xFFFAFAFA), - 100: const Color(0xFFF5F5F5), - 200: const Color(0xFFEEEEEE), - 300: const Color(0xFFE0E0E0), - 350: const Color(0xFFD6D6D6), // only for raised button while pressed in light theme - 400: const Color(0xFFBDBDBD), - 500: const Color(0xFF9E9E9E), - 600: const Color(0xFF757575), - 700: const Color(0xFF616161), - 800: const Color(0xFF424242), - 850: const Color(0xFF303030), // only for background color in dark theme - 900: const Color(0xFF212121), - }; - - /// The blue-grey primary swatch. + static const int _greyPrimaryValue = 0xFF9E9E9E; + static const MaterialColor grey = const MaterialColor( + _greyPrimaryValue, + const { + 50: const Color(0xFFFAFAFA), + 100: const Color(0xFFF5F5F5), + 200: const Color(0xFFEEEEEE), + 300: const Color(0xFFE0E0E0), + 350: const Color(0xFFD6D6D6), // only for raised button while pressed in light theme + 400: const Color(0xFFBDBDBD), + 500: const Color(_greyPrimaryValue), + 600: const Color(0xFF757575), + 700: const Color(0xFF616161), + 800: const Color(0xFF424242), + 850: const Color(0xFF303030), // only for background color in dark theme + 900: const Color(0xFF212121), + }, + ); + + /// The blue-grey primary color and swatch. /// /// ```dart /// new Icon( @@ -974,21 +1194,25 @@ class Colors { /// /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const Map blueGrey = const { - 50: const Color(0xFFECEFF1), - 100: const Color(0xFFCFD8DC), - 200: const Color(0xFFB0BEC5), - 300: const Color(0xFF90A4AE), - 400: const Color(0xFF78909C), - 500: const Color(0xFF607D8B), - 600: const Color(0xFF546E7A), - 700: const Color(0xFF455A64), - 800: const Color(0xFF37474F), - 900: const Color(0xFF263238), - }; + static const int _blueGreyPrimaryValue = 0xFF607D8B; + static const MaterialColor blueGrey = const MaterialColor( + _blueGreyPrimaryValue, + const { + 50: const Color(0xFFECEFF1), + 100: const Color(0xFFCFD8DC), + 200: const Color(0xFFB0BEC5), + 300: const Color(0xFF90A4AE), + 400: const Color(0xFF78909C), + 500: const Color(_blueGreyPrimaryValue), + 600: const Color(0xFF546E7A), + 700: const Color(0xFF455A64), + 800: const Color(0xFF37474F), + 900: const Color(0xFF263238), + }, + ); /// The material design primary color swatches (except grey). - static const List> primaries = const >[ + static const List primaries = const [ red, pink, purple, @@ -1011,7 +1235,7 @@ class Colors { ]; /// The material design accent color swatches. - static const List> accents = const >[ + static const List accents = const [ redAccent, pinkAccent, purpleAccent, From a398a15bd580300b09033d9dc5cead20e6d76208 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Mon, 3 Apr 2017 22:08:51 -0700 Subject: [PATCH 19/66] Add more dartdocs (#9174) --- packages/flutter/lib/src/material/colors.dart | 110 +++++++++++------- 1 file changed, 71 insertions(+), 39 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 967503237499..77c8db708882 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -12,7 +12,7 @@ import 'dart:ui' show Color, hashValues; /// primary and accent color swatches. /// * [Colors], which defines all of the standard material design colors. class ColorSwatch extends Color { - // Creates a color that has a small table of related colors called a "swatch". + /// Creates a color that has a small table of related colors called a "swatch". const ColorSwatch(int primary, this._swatch) : super(primary); final Map _swatch; @@ -48,16 +48,37 @@ class ColorSwatch extends Color { /// /// * [Colors], which defines all of the standard material colors. class MaterialColor extends ColorSwatch { + /// Creates a color swatch with a variety of shades. const MaterialColor(int primary, Map swatch) : super(primary, swatch); + + /// The lightest shade. Color get shade50 => _swatch[50]; + + /// The second lightest shade. Color get shade100 => _swatch[100]; + + /// The third lightest shade. Color get shade200 => _swatch[200]; + + /// The fourth lightest shade. Color get shade300 => _swatch[300]; + + /// The fifth lightest shade. Color get shade400 => _swatch[400]; + + /// The default shade. Color get shade500 => _swatch[500]; + + /// The fourth darkest shade. Color get shade600 => _swatch[600]; + + /// The third darkest shade. Color get shade700 => _swatch[700]; + + /// The second darkest shade. Color get shade800 => _swatch[800]; + + /// The darkest shade. Color get shade900 => _swatch[900]; } @@ -72,11 +93,25 @@ class MaterialColor extends ColorSwatch { /// See also: /// /// * [Colors], which defines all of the standard material colors. +/// * class MaterialAccentColor extends ColorSwatch { + /// Creates a color swatch with a variety of shades appropriate for accent + /// colors. const MaterialAccentColor(int primary, Map swatch) : super(primary, swatch); + + /// The lightest shade. + Color get shade50 => _swatch[50]; + + /// The second lightest shade. Color get shade100 => _swatch[100]; + + /// The default shade. Color get shade200 => _swatch[200]; + + /// The second darkest shade. Color get shade400 => _swatch[400]; + + /// The darkest shade. Color get shade700 => _swatch[700]; } @@ -116,7 +151,6 @@ class Colors { /// Completely invisible. static const Color transparent = const Color(0x00000000); - /// Completely opaque black. static const Color black = const Color(0xFF000000); @@ -168,7 +202,6 @@ class Colors { /// Used for the background of disabled raised buttons in light themes. static const Color black12 = const Color(0x1F000000); - /// Completely opaque white. /// /// This is a good contrasting color for the [ThemeData.primaryColor] in the @@ -211,7 +244,6 @@ class Colors { /// White with 10% opacity. static const Color white10 = const Color(0x1AFFFFFF); - /// The red primary color and swatch. /// /// ```dart @@ -226,7 +258,6 @@ class Colors { /// * [redAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _redPrimaryValue = 0xFFF44336; static const MaterialColor red = const MaterialColor( _redPrimaryValue, const { @@ -242,6 +273,7 @@ class Colors { 900: const Color(0xFFB71C1C), }, ); + static const int _redPrimaryValue = 0xFFF44336; /// The red accent swatch. /// @@ -257,7 +289,6 @@ class Colors { /// * [red], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _redAccentValue = 0xFFFF5252; static const MaterialAccentColor redAccent = const MaterialAccentColor( _redAccentValue, const { @@ -267,6 +298,7 @@ class Colors { 700: const Color(0xFFD50000), }, ); + static const int _redAccentValue = 0xFFFF5252; /// The pink primary color and swatch. /// @@ -282,7 +314,6 @@ class Colors { /// * [pinkAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _pinkPrimaryValue = 0xFFE91E63; static const MaterialColor pink = const MaterialColor( _pinkPrimaryValue, const { @@ -298,6 +329,7 @@ class Colors { 900: const Color(0xFF880E4F), }, ); + static const int _pinkPrimaryValue = 0xFFE91E63; /// The pink accent color swatch. /// @@ -313,7 +345,6 @@ class Colors { /// * [pink], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _pinkAccentPrimaryValue = 0xFFFF4081; static const MaterialAccentColor pinkAccent = const MaterialAccentColor( _pinkAccentPrimaryValue, const { @@ -323,6 +354,7 @@ class Colors { 700: const Color(0xFFC51162), }, ); + static const int _pinkAccentPrimaryValue = 0xFFFF4081; /// The purple primary color and swatch. /// @@ -338,7 +370,6 @@ class Colors { /// * [purpleAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _purplePrimaryValue = 0xFF9C27B0; static const MaterialColor purple = const MaterialColor( _purplePrimaryValue, const { @@ -354,6 +385,7 @@ class Colors { 900: const Color(0xFF4A148C), }, ); + static const int _purplePrimaryValue = 0xFF9C27B0; /// The purple accent color and swatch. /// @@ -369,7 +401,6 @@ class Colors { /// * [purple], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _purpleAccentPrimaryValue = 0xFFE040FB; static const MaterialAccentColor purpleAccent = const MaterialAccentColor( _purpleAccentPrimaryValue, const { @@ -379,6 +410,7 @@ class Colors { 700: const Color(0xFFAA00FF), }, ); + static const int _purpleAccentPrimaryValue = 0xFFE040FB; /// The deep purple primary color and swatch. /// @@ -394,7 +426,6 @@ class Colors { /// * [deepPurpleAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _deepPurplePrimaryValue = 0xFF673AB7; static const MaterialColor deepPurple = const MaterialColor( _deepPurplePrimaryValue, const { @@ -410,6 +441,7 @@ class Colors { 900: const Color(0xFF311B92), }, ); + static const int _deepPurplePrimaryValue = 0xFF673AB7; /// The deep purple accent color and swatch. /// @@ -425,7 +457,6 @@ class Colors { /// * [deepPurple], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _deepPurpleAccentPrimaryValue = 0xFF7C4DFF; static const MaterialAccentColor deepPurpleAccent = const MaterialAccentColor( _deepPurpleAccentPrimaryValue, const { @@ -435,6 +466,7 @@ class Colors { 700: const Color(0xFF6200EA), }, ); + static const int _deepPurpleAccentPrimaryValue = 0xFF7C4DFF; /// The indigo primary color and swatch. /// @@ -450,7 +482,6 @@ class Colors { /// * [indigoAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _indigoPrimaryValue = 0xFF3F51B5; static const MaterialColor indigo = const MaterialColor( _indigoPrimaryValue, const { @@ -466,6 +497,7 @@ class Colors { 900: const Color(0xFF1A237E), }, ); + static const int _indigoPrimaryValue = 0xFF3F51B5; /// The indigo accent color and swatch. /// @@ -481,7 +513,6 @@ class Colors { /// * [indigo], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _indigoAccentPrimaryValue = 0xFF536DFE; static const MaterialAccentColor indigoAccent = const MaterialAccentColor( _indigoAccentPrimaryValue, const { @@ -491,6 +522,7 @@ class Colors { 700: const Color(0xFF304FFE), }, ); + static const int _indigoAccentPrimaryValue = 0xFF536DFE; /// The blue primary color and swatch. /// @@ -506,7 +538,6 @@ class Colors { /// * [blueAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _bluePrimaryValue = 0xFF2196F3; static const MaterialColor blue = const MaterialColor( _bluePrimaryValue, const { @@ -522,6 +553,7 @@ class Colors { 900: const Color(0xFF0D47A1), }, ); + static const int _bluePrimaryValue = 0xFF2196F3; /// The blue accent color and swatch. /// @@ -537,7 +569,6 @@ class Colors { /// * [blue], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _blueAccentPrimaryValue = 0xFF448AFF; static const MaterialAccentColor blueAccent = const MaterialAccentColor( _blueAccentPrimaryValue, const { @@ -547,6 +578,7 @@ class Colors { 700: const Color(0xFF2962FF), }, ); + static const int _blueAccentPrimaryValue = 0xFF448AFF; /// The light blue primary color and swatch. /// @@ -562,7 +594,6 @@ class Colors { /// * [lightBlueAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _lightBluePrimaryValue = 0xFF03A9F4; static const MaterialColor lightBlue = const MaterialColor( _lightBluePrimaryValue, const { @@ -578,6 +609,7 @@ class Colors { 900: const Color(0xFF01579B), }, ); + static const int _lightBluePrimaryValue = 0xFF03A9F4; /// The light blue accent swatch. /// @@ -593,7 +625,6 @@ class Colors { /// * [lightBlue], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _lightBlueAccentPrimaryValue = 0xFF40C4FF; static const MaterialAccentColor lightBlueAccent = const MaterialAccentColor( _lightBlueAccentPrimaryValue, const { @@ -603,6 +634,7 @@ class Colors { 700: const Color(0xFF0091EA), }, ); + static const int _lightBlueAccentPrimaryValue = 0xFF40C4FF; /// The cyan primary color and swatch. /// @@ -618,7 +650,6 @@ class Colors { /// * [cyanAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _cyanPrimaryValue = 0xFF00BCD4; static const MaterialColor cyan = const MaterialColor( _cyanPrimaryValue, const { @@ -634,6 +665,7 @@ class Colors { 900: const Color(0xFF006064), }, ); + static const int _cyanPrimaryValue = 0xFF00BCD4; /// The cyan accent color and swatch. /// @@ -649,7 +681,6 @@ class Colors { /// * [cyan], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _cyanAccentPrimaryValue = 0xFF18FFFF; static const MaterialAccentColor cyanAccent = const MaterialAccentColor( _cyanAccentPrimaryValue, const { @@ -659,6 +690,7 @@ class Colors { 700: const Color(0xFF00B8D4), }, ); + static const int _cyanAccentPrimaryValue = 0xFF18FFFF; /// The teal primary color and swatch. /// @@ -674,7 +706,6 @@ class Colors { /// * [tealAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _tealPrimaryValue = 0xFF009688; static const MaterialColor teal = const MaterialColor( _tealPrimaryValue, const { @@ -690,6 +721,7 @@ class Colors { 900: const Color(0xFF004D40), }, ); + static const int _tealPrimaryValue = 0xFF009688; /// The teal accent color and swatch. /// @@ -705,7 +737,6 @@ class Colors { /// * [teal], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _tealAccentPrimaryValue = 0xFF64FFDA; static const MaterialAccentColor tealAccent = const MaterialAccentColor( _tealAccentPrimaryValue, const { @@ -715,6 +746,7 @@ class Colors { 700: const Color(0xFF00BFA5), }, ); + static const int _tealAccentPrimaryValue = 0xFF64FFDA; /// The green primary color and swatch. /// @@ -730,7 +762,6 @@ class Colors { /// * [greenAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _greenPrimaryValue = 0xFF4CAF50; static const MaterialColor green = const MaterialColor( _greenPrimaryValue, const { @@ -746,6 +777,7 @@ class Colors { 900: const Color(0xFF1B5E20), }, ); + static const int _greenPrimaryValue = 0xFF4CAF50; /// The green accent color and swatch. /// @@ -761,7 +793,6 @@ class Colors { /// * [green], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _greenAccentPrimaryValue = 0xFF69F0AE; static const MaterialAccentColor greenAccent = const MaterialAccentColor( _greenAccentPrimaryValue, const { @@ -771,6 +802,7 @@ class Colors { 700: const Color(0xFF00C853), }, ); + static const int _greenAccentPrimaryValue = 0xFF69F0AE; /// The light green primary color and swatch. /// @@ -786,7 +818,6 @@ class Colors { /// * [lightGreenAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _lightGreenPrimaryValue = 0xFF8BC34A; static const MaterialColor lightGreen = const MaterialColor( _lightGreenPrimaryValue, const { @@ -802,6 +833,7 @@ class Colors { 900: const Color(0xFF33691E), }, ); + static const int _lightGreenPrimaryValue = 0xFF8BC34A; /// The light green accent color and swatch. /// @@ -817,7 +849,6 @@ class Colors { /// * [lightGreen], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _lightGreenAccentPrimaryValue = 0xFFB2FF59; static const MaterialAccentColor lightGreenAccent = const MaterialAccentColor( _lightGreenAccentPrimaryValue, const { @@ -827,6 +858,7 @@ class Colors { 700: const Color(0xFF64DD17), }, ); + static const int _lightGreenAccentPrimaryValue = 0xFFB2FF59; /// The lime primary color and swatch. /// @@ -842,7 +874,6 @@ class Colors { /// * [limeAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _limePrimaryValue = 0xFFCDDC39; static const MaterialColor lime = const MaterialColor( _limePrimaryValue, const { @@ -858,6 +889,7 @@ class Colors { 900: const Color(0xFF827717), }, ); + static const int _limePrimaryValue = 0xFFCDDC39; /// The lime accent primary color and swatch. /// @@ -873,7 +905,6 @@ class Colors { /// * [lime], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _limeAccentPrimaryValue = 0xFFEEFF41; static const MaterialAccentColor limeAccent = const MaterialAccentColor( _limeAccentPrimaryValue, const { @@ -883,6 +914,7 @@ class Colors { 700: const Color(0xFFAEEA00), }, ); + static const int _limeAccentPrimaryValue = 0xFFEEFF41; /// The yellow primary color and swatch. /// @@ -898,7 +930,6 @@ class Colors { /// * [yellowAccentAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _yellowPrimaryValue = 0xFFFFEB3B; static const MaterialColor yellow = const MaterialColor( _yellowPrimaryValue, const { @@ -914,6 +945,7 @@ class Colors { 900: const Color(0xFFF57F17), }, ); + static const int _yellowPrimaryValue = 0xFFFFEB3B; /// The yellow accent color and swatch. /// @@ -929,7 +961,6 @@ class Colors { /// * [yellow], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _yellowAccentPrimaryValue = 0xFFFFFF00; static const MaterialAccentColor yellowAccent = const MaterialAccentColor( _yellowAccentPrimaryValue, const { @@ -939,6 +970,7 @@ class Colors { 700: const Color(0xFFFFD600), }, ); + static const int _yellowAccentPrimaryValue = 0xFFFFFF00; /// The amber primary color and swatch. /// @@ -954,7 +986,6 @@ class Colors { /// * [amberAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _amberPrimaryValue = 0xFFFFC107; static const MaterialColor amber = const MaterialColor( _amberPrimaryValue, const { @@ -970,6 +1001,7 @@ class Colors { 900: const Color(0xFFFF6F00), }, ); + static const int _amberPrimaryValue = 0xFFFFC107; /// The amber accent color and swatch. /// @@ -985,7 +1017,6 @@ class Colors { /// * [amber], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _amberAccentPrimaryValue = 0xFFFFD740; static const MaterialAccentColor amberAccent = const MaterialAccentColor( _amberAccentPrimaryValue, const { @@ -995,6 +1026,7 @@ class Colors { 700: const Color(0xFFFFAB00), }, ); + static const int _amberAccentPrimaryValue = 0xFFFFD740; /// The orange primary color and swatch. /// @@ -1010,7 +1042,6 @@ class Colors { /// * [orangeAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _orangePrimaryValue = 0xFFFF9800; static const MaterialColor orange = const MaterialColor( _orangePrimaryValue, const { @@ -1026,6 +1057,7 @@ class Colors { 900: const Color(0xFFE65100), }, ); + static const int _orangePrimaryValue = 0xFFFF9800; /// The orange accent color and swatch. /// @@ -1041,7 +1073,6 @@ class Colors { /// * [orange], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _orangeAccentPrimaryValue = 0xFFFFAB40; static const MaterialAccentColor orangeAccent = const MaterialAccentColor( _orangeAccentPrimaryValue, const { @@ -1051,6 +1082,7 @@ class Colors { 700: const Color(0xFFFF6D00), }, ); + static const int _orangeAccentPrimaryValue = 0xFFFFAB40; /// The deep orange primary color and swatch. /// @@ -1066,7 +1098,6 @@ class Colors { /// * [deepOrangeAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _deepOrangePrimaryValue = 0xFFFF5722; static const MaterialColor deepOrange = const MaterialColor( _deepOrangePrimaryValue, const { @@ -1082,6 +1113,7 @@ class Colors { 900: const Color(0xFFBF360C), }, ); + static const int _deepOrangePrimaryValue = 0xFFFF5722; /// The deep orange accent color and swatch. /// @@ -1097,7 +1129,6 @@ class Colors { /// * [deepOrange], the corresponding primary colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _deepOrangeAccentPrimaryValue = 0xFFFF6E40; static const MaterialAccentColor deepOrangeAccent = const MaterialAccentColor( _deepOrangeAccentPrimaryValue, const { @@ -1107,6 +1138,7 @@ class Colors { 700: const Color(0xFFDD2C00), }, ); + static const int _deepOrangeAccentPrimaryValue = 0xFFFF6E40; /// The brown primary color and swatch. /// @@ -1123,7 +1155,6 @@ class Colors { /// /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _brownPrimaryValue = 0xFF795548; static const MaterialColor brown = const MaterialColor( _brownPrimaryValue, const { @@ -1139,6 +1170,7 @@ class Colors { 900: const Color(0xFF3E2723), }, ); + static const int _brownPrimaryValue = 0xFF795548; /// The grey primary color and swatch. /// @@ -1160,7 +1192,6 @@ class Colors { /// /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _greyPrimaryValue = 0xFF9E9E9E; static const MaterialColor grey = const MaterialColor( _greyPrimaryValue, const { @@ -1178,6 +1209,7 @@ class Colors { 900: const Color(0xFF212121), }, ); + static const int _greyPrimaryValue = 0xFF9E9E9E; /// The blue-grey primary color and swatch. /// @@ -1194,7 +1226,6 @@ class Colors { /// /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const int _blueGreyPrimaryValue = 0xFF607D8B; static const MaterialColor blueGrey = const MaterialColor( _blueGreyPrimaryValue, const { @@ -1210,6 +1241,7 @@ class Colors { 900: const Color(0xFF263238), }, ); + static const int _blueGreyPrimaryValue = 0xFF607D8B; /// The material design primary color swatches (except grey). static const List primaries = const [ From e8d564addb9418c7c410ea9b498d12fb2f3ea747 Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Thu, 4 May 2017 19:54:06 -0700 Subject: [PATCH 20/66] Fix many dartdoc typos (#9822) --- packages/flutter/lib/src/material/colors.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 77c8db708882..7186c0b56757 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -17,7 +17,7 @@ class ColorSwatch extends Color { final Map _swatch; - /// Returns an element of the [swatch] table. + /// Returns an element of the swatch table. Color operator [](int index) => _swatch[index]; @override @@ -927,7 +927,7 @@ class Colors { /// /// See also: /// - /// * [yellowAccentAccent], the corresponding accent colors. + /// * [yellowAccent], the corresponding accent colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. static const MaterialColor yellow = const MaterialColor( From 06388bfce2dd9f3909d3df01288e139d2b161350 Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Mon, 5 Jun 2017 13:14:11 -0700 Subject: [PATCH 21/66] Make ColorSwatch more general, and test it (#10505) --- packages/flutter/lib/src/material/colors.dart | 72 ++++++------------- 1 file changed, 20 insertions(+), 52 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 7186c0b56757..45d4b8939522 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -2,41 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:ui' show Color, hashValues; +import 'dart:ui' show Color; -/// A color that has a small table of related colors called a "swatch". -/// -/// See also: -/// -/// * [MaterialColor] and [MaterialAccentColor], which define material design -/// primary and accent color swatches. -/// * [Colors], which defines all of the standard material design colors. -class ColorSwatch extends Color { - /// Creates a color that has a small table of related colors called a "swatch". - const ColorSwatch(int primary, this._swatch) : super(primary); - - final Map _swatch; - - /// Returns an element of the swatch table. - Color operator [](int index) => _swatch[index]; - - @override - bool operator ==(dynamic other) { - if (identical(this, other)) - return true; - if (other.runtimeType != runtimeType) - return false; - final ColorSwatch typedOther = other; - return super==(other) && _swatch == typedOther._swatch; - } - - @override - int get hashCode => hashValues(runtimeType, value, _swatch); - - @override - String toString() => '$runtimeType(primary value: ${super.toString()})'; - -} +import 'package:flutter/painting.dart'; /// Defines a single color as well a color swatch with ten shades of the color. /// @@ -47,39 +15,39 @@ class ColorSwatch extends Color { /// See also: /// /// * [Colors], which defines all of the standard material colors. -class MaterialColor extends ColorSwatch { +class MaterialColor extends ColorSwatch { /// Creates a color swatch with a variety of shades. const MaterialColor(int primary, Map swatch) : super(primary, swatch); /// The lightest shade. - Color get shade50 => _swatch[50]; + Color get shade50 => this[50]; /// The second lightest shade. - Color get shade100 => _swatch[100]; + Color get shade100 => this[100]; /// The third lightest shade. - Color get shade200 => _swatch[200]; + Color get shade200 => this[200]; /// The fourth lightest shade. - Color get shade300 => _swatch[300]; + Color get shade300 => this[300]; /// The fifth lightest shade. - Color get shade400 => _swatch[400]; + Color get shade400 => this[400]; /// The default shade. - Color get shade500 => _swatch[500]; + Color get shade500 => this[500]; /// The fourth darkest shade. - Color get shade600 => _swatch[600]; + Color get shade600 => this[600]; /// The third darkest shade. - Color get shade700 => _swatch[700]; + Color get shade700 => this[700]; /// The second darkest shade. - Color get shade800 => _swatch[800]; + Color get shade800 => this[800]; /// The darkest shade. - Color get shade900 => _swatch[900]; + Color get shade900 => this[900]; } /// Defines a single accent color as well a swatch of four shades of the @@ -94,25 +62,25 @@ class MaterialColor extends ColorSwatch { /// /// * [Colors], which defines all of the standard material colors. /// * -class MaterialAccentColor extends ColorSwatch { +class MaterialAccentColor extends ColorSwatch { /// Creates a color swatch with a variety of shades appropriate for accent /// colors. const MaterialAccentColor(int primary, Map swatch) : super(primary, swatch); /// The lightest shade. - Color get shade50 => _swatch[50]; + Color get shade50 => this[50]; /// The second lightest shade. - Color get shade100 => _swatch[100]; + Color get shade100 => this[100]; /// The default shade. - Color get shade200 => _swatch[200]; + Color get shade200 => this[200]; /// The second darkest shade. - Color get shade400 => _swatch[400]; + Color get shade400 => this[400]; /// The darkest shade. - Color get shade700 => _swatch[700]; + Color get shade700 => this[700]; } /// [Color] and [ColorSwatch] constants which represent Material design's @@ -130,7 +98,7 @@ class MaterialAccentColor extends ColorSwatch { /// Colors.green[400] // Selects a mid-range green. /// ``` /// -/// Each ColorSwatch constant is a color and can used directly. For example +/// Each [ColorSwatch] constant is a color and can used directly. For example /// /// ```dart /// new Container( From d570512bcf0e0684866045e10d991ad34b4b57a6 Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Mon, 5 Jun 2017 22:44:49 -0700 Subject: [PATCH 22/66] More documentation (#10519) --- packages/flutter/lib/src/material/colors.dart | 863 +++++++++++++++--- 1 file changed, 718 insertions(+), 145 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 45d4b8939522..14a1fa798768 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -91,6 +91,16 @@ class MaterialAccentColor extends ColorSwatch { /// colors selected for the current theme, such as [ThemeData.primaryColor] and /// [ThemeData.accentColor] (among many others). /// +/// Most swatches have colors from 100 to 900 in increments of one hundred, plus +/// the color 50. The smaller the number, the more pale the color. The greater +/// the number, the darker the color. The accent swatches (e.g. [redAccent]) only +/// have the values 100, 200, 400, and 700. +/// +/// In addition, a series of blacks and whites with common opacities are +/// available. For example, [black54] is a pure black with 54% opacity. +/// +/// ## Sample code +/// /// To select a specific color from one of the swatches, index into the swatch /// using an integer for the specific color desired, as follows: /// @@ -98,7 +108,7 @@ class MaterialAccentColor extends ColorSwatch { /// Colors.green[400] // Selects a mid-range green. /// ``` /// -/// Each [ColorSwatch] constant is a color and can used directly. For example +/// Each [ColorSwatch] constant is a color and can used directly. For example: /// /// ```dart /// new Container( @@ -106,13 +116,73 @@ class MaterialAccentColor extends ColorSwatch { /// ) /// ``` /// -/// Most swatches have colors from 100 to 900 in increments of one hundred, plus -/// the color 50. The smaller the number, the more pale the color. The greater -/// the number, the darker the color. The accent swatches (e.g. [redAccent]) only -/// have the values 100, 200, 400, and 700. +/// ## Color palettes /// -/// In addition, a series of blacks and whites with common opacities are -/// available. For example, [black54] is a pure black with 54% opacity. +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pink.png) +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pinkAccent.png) +/// +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.red.png) +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.redAccent.png) +/// +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrange.png) +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrangeAccent.png) +/// +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orange.png) +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orangeAccent.png) +/// +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amber.png) +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amberAccent.png) +/// +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellow.png) +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellowAccent.png) +/// +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lime.png) +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.limeAccent.png) +/// +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreen.png) +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreenAccent.png) +/// +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.green.png) +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.greenAccent.png) +/// +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.teal.png) +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.tealAccent.png) +/// +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyan.png) +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyanAccent.png) +/// +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlue.png) +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlueAccent.png) +/// +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blue.png) +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blueAccent.png) +/// +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigo.png) +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigoAccent.png) +/// +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purple.png) +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purpleAccent.png) +/// +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurple.png) +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurpleAccent.png) +/// +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blueGrey.png) +/// +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.brown.png) +/// +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.grey.png) +/// +/// ## Blacks and whites +/// +/// These colors are identified by their transparency. The low transparency +/// levels (e.g. [Colors.white12] and [Colors.white10]) are very hard to see and +/// should be avoided in general. They are intended for very subtle effects. +/// +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blacks.png) +/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.whites.png) +/// +/// The [Colors.transparent] color isn't shown here because it is entirely +/// invisible! class Colors { Colors._(); @@ -120,54 +190,97 @@ class Colors { static const Color transparent = const Color(0x00000000); /// Completely opaque black. + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blacks.png) + /// + /// See also: + /// + /// * [black87], [black54], [black45], [black38], [black26], [black12], which + /// are variants on this color but with different opacities. + /// * [white], a solid white color. + /// * [transparent], a fully-transparent color. static const Color black = const Color(0xFF000000); /// Black with 87% opacity. /// /// This is a good contrasting color for text in light themes. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blacks.png) + /// /// See also: /// - /// * [Typography.black], which uses this color for its text styles. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [Typography.black], which uses this color for its text styles. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. + /// * [black], [black54], [black45], [black38], [black26], [black12], which + /// are variants on this color but with different opacities. static const Color black87 = const Color(0xDD000000); /// Black with 54% opacity. /// - /// This is a color commonly used for headings in light themes. + /// This is a color commonly used for headings in light themes. It's also used + /// as the mask color behind dialogs. + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blacks.png) /// /// See also: /// - /// * [Typography.black], which uses this color for its text styles. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [Typography.black], which uses this color for its text styles. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. + /// * [black], [black87], [black45], [black38], [black26], [black12], which + /// are variants on this color but with different opacities. static const Color black54 = const Color(0x8A000000); + /// Black with 45% opacity. + /// + /// Used for disabled icons. + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blacks.png) + /// + /// See also: + /// + /// * [black], [black87], [black54], [black38], [black26], [black12], which + /// are variants on this color but with different opacities. + static const Color black45 = const Color(0x73000000); + /// Black with 38% opacity. /// /// Used for the placeholder text in data tables in light themes. - static const Color black38 = const Color(0x61000000); - - /// Black with 45% opacity. /// - /// Used for modal barriers. - static const Color black45 = const Color(0x73000000); + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blacks.png) + /// + /// See also: + /// + /// * [black], [black87], [black54], [black45], [black26], [black12], which + /// are variants on this color but with different opacities. + static const Color black38 = const Color(0x61000000); /// Black with 26% opacity. /// /// Used for disabled radio buttons and the text of disabled flat buttons in light themes. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blacks.png) + /// /// See also: /// - /// * [ThemeData.disabledColor], which uses this color by default in light themes. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [ThemeData.disabledColor], which uses this color by default in light themes. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. + /// * [black], [black87], [black54], [black45], [black38], [black12], which + /// are variants on this color but with different opacities. static const Color black26 = const Color(0x42000000); /// Black with 12% opacity. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blacks.png) + /// /// Used for the background of disabled raised buttons in light themes. + /// + /// See also: + /// + /// * [black], [black87], [black54], [black45], [black38], [black26], which + /// are variants on this color but with different opacities. static const Color black12 = const Color(0x1F000000); /// Completely opaque white. @@ -175,45 +288,85 @@ class Colors { /// This is a good contrasting color for the [ThemeData.primaryColor] in the /// dark theme. See [ThemeData.brightness]. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.whites.png) + /// /// See also: /// - /// * [Typography.white], which uses this color for its text styles. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [Typography.white], which uses this color for its text styles. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. + /// * [white70, white30, white12, white10], which are variants on this color + /// but with different opacities. + /// * [black], a solid black color. + /// * [transparent], a fully-transparent color. static const Color white = const Color(0xFFFFFFFF); /// White with 70% opacity. /// /// This is a color commonly used for headings in dark themes. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.whites.png) + /// /// See also: /// - /// * [Typography.white], which uses this color for its text styles. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [Typography.white], which uses this color for its text styles. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. + /// * [white, white30, white12, white10], which are variants on this color + /// but with different opacities. static const Color white70 = const Color(0xB3FFFFFF); /// White with 32% opacity. /// /// Used for disabled radio buttons and the text of disabled flat buttons in dark themes. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.whites.png) + /// /// See also: /// - /// * [ThemeData.disabledColor], which uses this color by default in dark themes. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [ThemeData.disabledColor], which uses this color by default in dark themes. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. + /// * [white, white70, white12, white10], which are variants on this color + /// but with different opacities. static const Color white30 = const Color(0x4DFFFFFF); /// White with 12% opacity. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.whites.png) + /// /// Used for the background of disabled raised buttons in dark themes. + /// + /// See also: + /// + /// * [white, white70, white30, white10], which are variants on this color + /// but with different opacities. static const Color white12 = const Color(0x1FFFFFFF); /// White with 10% opacity. + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.whites.png) + /// + /// See also: + /// + /// * [white, white70, white30, white12], which are variants on this color + /// but with different opacities. + /// * [transparent], a fully-transparent color, not far from this one. static const Color white10 = const Color(0x1AFFFFFF); /// The red primary color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.red.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.redAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrange.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrangeAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pink.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pinkAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -223,9 +376,10 @@ class Colors { /// /// See also: /// - /// * [redAccent], the corresponding accent colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [redAccent], the corresponding accent colors. + /// * [deepOrange] and [pink], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialColor red = const MaterialColor( _redPrimaryValue, const { @@ -245,6 +399,17 @@ class Colors { /// The red accent swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.red.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.redAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrange.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrangeAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pink.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pinkAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -254,9 +419,10 @@ class Colors { /// /// See also: /// - /// * [red], the corresponding primary colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [red], the corresponding primary colors. + /// * [deepOrangeAccent] and [pinkAccent], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialAccentColor redAccent = const MaterialAccentColor( _redAccentValue, const { @@ -270,6 +436,17 @@ class Colors { /// The pink primary color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pink.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pinkAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.red.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.redAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purple.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purpleAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -279,9 +456,10 @@ class Colors { /// /// See also: /// - /// * [pinkAccent], the corresponding accent colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [pinkAccent], the corresponding accent colors. + /// * [red] and [purple], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialColor pink = const MaterialColor( _pinkPrimaryValue, const { @@ -301,6 +479,17 @@ class Colors { /// The pink accent color swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pink.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pinkAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.red.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.redAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purple.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purpleAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -310,9 +499,10 @@ class Colors { /// /// See also: /// - /// * [pink], the corresponding primary colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [pink], the corresponding primary colors. + /// * [redAccent] and [purpleAccent], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialAccentColor pinkAccent = const MaterialAccentColor( _pinkAccentPrimaryValue, const { @@ -326,6 +516,17 @@ class Colors { /// The purple primary color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purple.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purpleAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurple.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurpleAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pink.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pinkAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -335,9 +536,10 @@ class Colors { /// /// See also: /// - /// * [purpleAccent], the corresponding accent colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [purpleAccent], the corresponding accent colors. + /// * [deepPurple] and [pink], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialColor purple = const MaterialColor( _purplePrimaryValue, const { @@ -357,6 +559,17 @@ class Colors { /// The purple accent color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purple.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purpleAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurple.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurpleAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pink.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pinkAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -366,9 +579,10 @@ class Colors { /// /// See also: /// - /// * [purple], the corresponding primary colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [purple], the corresponding primary colors. + /// * [deepPurpleAccent] and [pinkAccent], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialAccentColor purpleAccent = const MaterialAccentColor( _purpleAccentPrimaryValue, const { @@ -382,6 +596,17 @@ class Colors { /// The deep purple primary color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurple.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurpleAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purple.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purpleAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigo.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigoAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -391,9 +616,10 @@ class Colors { /// /// See also: /// - /// * [deepPurpleAccent], the corresponding accent colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [deepPurpleAccent], the corresponding accent colors. + /// * [purple] and [indigo], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialColor deepPurple = const MaterialColor( _deepPurplePrimaryValue, const { @@ -413,6 +639,17 @@ class Colors { /// The deep purple accent color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurple.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurpleAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purple.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purpleAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigo.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigoAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -422,9 +659,10 @@ class Colors { /// /// See also: /// - /// * [deepPurple], the corresponding primary colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [deepPurple], the corresponding primary colors. + /// * [purpleAccent] and [indigoAccent], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialAccentColor deepPurpleAccent = const MaterialAccentColor( _deepPurpleAccentPrimaryValue, const { @@ -438,6 +676,17 @@ class Colors { /// The indigo primary color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigo.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigoAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blue.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blueAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurple.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurpleAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -447,9 +696,10 @@ class Colors { /// /// See also: /// - /// * [indigoAccent], the corresponding accent colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [indigoAccent], the corresponding accent colors. + /// * [blue] and [deepPurple], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialColor indigo = const MaterialColor( _indigoPrimaryValue, const { @@ -469,6 +719,17 @@ class Colors { /// The indigo accent color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigo.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigoAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blue.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blueAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurple.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurpleAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -478,9 +739,10 @@ class Colors { /// /// See also: /// - /// * [indigo], the corresponding primary colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [indigo], the corresponding primary colors. + /// * [blueAccent] and [deepPurpleAccent], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialAccentColor indigoAccent = const MaterialAccentColor( _indigoAccentPrimaryValue, const { @@ -494,6 +756,19 @@ class Colors { /// The blue primary color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blue.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blueAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigo.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigoAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlue.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlueAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blueGrey.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -503,9 +778,10 @@ class Colors { /// /// See also: /// - /// * [blueAccent], the corresponding accent colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [blueAccent], the corresponding accent colors. + /// * [indigo], [lightBlue], and [blueGrey], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialColor blue = const MaterialColor( _bluePrimaryValue, const { @@ -525,6 +801,17 @@ class Colors { /// The blue accent color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blue.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blueAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigo.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigoAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlue.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlueAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -534,9 +821,10 @@ class Colors { /// /// See also: /// - /// * [blue], the corresponding primary colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [blue], the corresponding primary colors. + /// * [indigoAccent] and [lightBlueAccent], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialAccentColor blueAccent = const MaterialAccentColor( _blueAccentPrimaryValue, const { @@ -550,6 +838,17 @@ class Colors { /// The light blue primary color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlue.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlueAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blue.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blueAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyan.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyanAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -559,9 +858,10 @@ class Colors { /// /// See also: /// - /// * [lightBlueAccent], the corresponding accent colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [lightBlueAccent], the corresponding accent colors. + /// * [blue] and [cyan], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialColor lightBlue = const MaterialColor( _lightBluePrimaryValue, const { @@ -581,6 +881,17 @@ class Colors { /// The light blue accent swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlue.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlueAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blue.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blueAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyan.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyanAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -590,9 +901,10 @@ class Colors { /// /// See also: /// - /// * [lightBlue], the corresponding primary colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [lightBlue], the corresponding primary colors. + /// * [blueAccent] and [cyanAccent], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialAccentColor lightBlueAccent = const MaterialAccentColor( _lightBlueAccentPrimaryValue, const { @@ -606,6 +918,19 @@ class Colors { /// The cyan primary color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyan.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyanAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlue.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlueAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.teal.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.tealAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blueGrey.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -615,9 +940,10 @@ class Colors { /// /// See also: /// - /// * [cyanAccent], the corresponding accent colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [cyanAccent], the corresponding accent colors. + /// * [lightBlue], [teal], and [blueGrey], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialColor cyan = const MaterialColor( _cyanPrimaryValue, const { @@ -637,6 +963,17 @@ class Colors { /// The cyan accent color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyan.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyanAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlue.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlueAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.teal.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.tealAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -646,9 +983,10 @@ class Colors { /// /// See also: /// - /// * [cyan], the corresponding primary colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [cyan], the corresponding primary colors. + /// * [lightBlueAccent] and [tealAccent], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialAccentColor cyanAccent = const MaterialAccentColor( _cyanAccentPrimaryValue, const { @@ -662,6 +1000,17 @@ class Colors { /// The teal primary color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.teal.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.tealAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.green.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.greenAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyan.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyanAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -671,9 +1020,10 @@ class Colors { /// /// See also: /// - /// * [tealAccent], the corresponding accent colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [tealAccent], the corresponding accent colors. + /// * [green] and [cyan], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialColor teal = const MaterialColor( _tealPrimaryValue, const { @@ -693,6 +1043,17 @@ class Colors { /// The teal accent color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.teal.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.tealAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.green.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.greenAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyan.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyanAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -702,9 +1063,10 @@ class Colors { /// /// See also: /// - /// * [teal], the corresponding primary colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [teal], the corresponding primary colors. + /// * [greenAccent] and [cyanAccent], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialAccentColor tealAccent = const MaterialAccentColor( _tealAccentPrimaryValue, const { @@ -718,6 +1080,20 @@ class Colors { /// The green primary color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.green.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.greenAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.teal.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.tealAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreen.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreenAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lime.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.limeAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -727,9 +1103,10 @@ class Colors { /// /// See also: /// - /// * [greenAccent], the corresponding accent colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [greenAccent], the corresponding accent colors. + /// * [teal], [lightGreen], and [lime], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialColor green = const MaterialColor( _greenPrimaryValue, const { @@ -749,6 +1126,20 @@ class Colors { /// The green accent color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.green.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.greenAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.teal.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.tealAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreen.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreenAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lime.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.limeAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -758,9 +1149,10 @@ class Colors { /// /// See also: /// - /// * [green], the corresponding primary colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [green], the corresponding primary colors. + /// * [tealAccent], [lightGreenAccent], and [limeAccent], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialAccentColor greenAccent = const MaterialAccentColor( _greenAccentPrimaryValue, const { @@ -774,6 +1166,17 @@ class Colors { /// The light green primary color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreen.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreenAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.green.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.greenAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lime.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.limeAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -783,9 +1186,10 @@ class Colors { /// /// See also: /// - /// * [lightGreenAccent], the corresponding accent colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [lightGreenAccent], the corresponding accent colors. + /// * [green] and [lime], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialColor lightGreen = const MaterialColor( _lightGreenPrimaryValue, const { @@ -805,6 +1209,17 @@ class Colors { /// The light green accent color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreen.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreenAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.green.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.greenAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lime.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.limeAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -814,9 +1229,10 @@ class Colors { /// /// See also: /// - /// * [lightGreen], the corresponding primary colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [lightGreen], the corresponding primary colors. + /// * [greenAccent] and [limeAccent], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialAccentColor lightGreenAccent = const MaterialAccentColor( _lightGreenAccentPrimaryValue, const { @@ -830,6 +1246,17 @@ class Colors { /// The lime primary color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lime.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.limeAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreen.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreenAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellow.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellowAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -839,9 +1266,10 @@ class Colors { /// /// See also: /// - /// * [limeAccent], the corresponding accent colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [limeAccent], the corresponding accent colors. + /// * [lightGreen] and [yellow], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialColor lime = const MaterialColor( _limePrimaryValue, const { @@ -861,6 +1289,17 @@ class Colors { /// The lime accent primary color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lime.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.limeAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreen.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreenAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellow.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellowAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -870,9 +1309,10 @@ class Colors { /// /// See also: /// - /// * [lime], the corresponding primary colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [lime], the corresponding primary colors. + /// * [lightGreenAccent] and [yellowAccent], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialAccentColor limeAccent = const MaterialAccentColor( _limeAccentPrimaryValue, const { @@ -886,6 +1326,17 @@ class Colors { /// The yellow primary color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellow.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellowAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lime.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.limeAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amber.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amberAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -895,9 +1346,10 @@ class Colors { /// /// See also: /// - /// * [yellowAccent], the corresponding accent colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [yellowAccent], the corresponding accent colors. + /// * [lime] and [amber], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialColor yellow = const MaterialColor( _yellowPrimaryValue, const { @@ -917,6 +1369,17 @@ class Colors { /// The yellow accent color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellow.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellowAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lime.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.limeAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amber.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amberAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -926,9 +1389,10 @@ class Colors { /// /// See also: /// - /// * [yellow], the corresponding primary colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [yellow], the corresponding primary colors. + /// * [limeAccent] and [amberAccent], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialAccentColor yellowAccent = const MaterialAccentColor( _yellowAccentPrimaryValue, const { @@ -942,6 +1406,17 @@ class Colors { /// The amber primary color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amber.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amberAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellow.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellowAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orange.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orangeAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -951,9 +1426,10 @@ class Colors { /// /// See also: /// - /// * [amberAccent], the corresponding accent colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [amberAccent], the corresponding accent colors. + /// * [yellow] and [orange], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialColor amber = const MaterialColor( _amberPrimaryValue, const { @@ -973,6 +1449,17 @@ class Colors { /// The amber accent color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amber.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amberAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellow.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellowAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orange.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orangeAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -982,9 +1469,10 @@ class Colors { /// /// See also: /// - /// * [amber], the corresponding primary colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [amber], the corresponding primary colors. + /// * [yellowAccent] and [orangeAccent], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialAccentColor amberAccent = const MaterialAccentColor( _amberAccentPrimaryValue, const { @@ -998,6 +1486,19 @@ class Colors { /// The orange primary color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orange.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orangeAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amber.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amberAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrange.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrangeAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.brown.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -1007,9 +1508,10 @@ class Colors { /// /// See also: /// - /// * [orangeAccent], the corresponding accent colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [orangeAccent], the corresponding accent colors. + /// * [amber], [deepOrange], and [brown], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialColor orange = const MaterialColor( _orangePrimaryValue, const { @@ -1029,6 +1531,17 @@ class Colors { /// The orange accent color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orange.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orangeAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amber.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amberAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrange.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrangeAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -1038,9 +1551,10 @@ class Colors { /// /// See also: /// - /// * [orange], the corresponding primary colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [orange], the corresponding primary colors. + /// * [amberAccent] and [deepOrangeAccent], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialAccentColor orangeAccent = const MaterialAccentColor( _orangeAccentPrimaryValue, const { @@ -1054,6 +1568,19 @@ class Colors { /// The deep orange primary color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrange.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrangeAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orange.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orangeAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.red.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.redAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.brown.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -1063,9 +1590,10 @@ class Colors { /// /// See also: /// - /// * [deepOrangeAccent], the corresponding accent colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [deepOrangeAccent], the corresponding accent colors. + /// * [orange], [red], and [brown], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialColor deepOrange = const MaterialColor( _deepOrangePrimaryValue, const { @@ -1085,6 +1613,17 @@ class Colors { /// The deep orange accent color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrange.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrangeAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orange.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orangeAccent.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.red.png) + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.redAccent.png) + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -1094,9 +1633,10 @@ class Colors { /// /// See also: /// - /// * [deepOrange], the corresponding primary colors. - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [deepOrange], the corresponding primary colors. + /// * [orangeAccent] [redAccent], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialAccentColor deepOrangeAccent = const MaterialAccentColor( _deepOrangeAccentPrimaryValue, const { @@ -1110,6 +1650,16 @@ class Colors { /// The brown primary color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.brown.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orange.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blueGrey.png) + /// + /// This swatch has no corresponding accent color and swatch. + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -1117,12 +1667,11 @@ class Colors { /// ), /// ``` /// - /// This swatch has no corresponding accent color and swatch. - /// /// See also: /// - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [orange] and [blueGrey], vaguely similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialColor brown = const MaterialColor( _brownPrimaryValue, const { @@ -1142,12 +1691,11 @@ class Colors { /// The grey primary color and swatch. /// - /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.grey[400], - /// ), - /// ``` + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.grey.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blueGrey.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.brown.png) /// /// This swatch has no corresponding accent swatch. /// @@ -1156,10 +1704,22 @@ class Colors { /// used for raised button while pressed in light themes, and 850 is used for /// the background color of the dark theme. See [ThemeData.brightness]. /// + /// ## Sample code + /// + /// ```dart + /// new Icon( + /// icon: Icons.widgets, + /// color: Colors.grey[400], + /// ), + /// ``` + /// /// See also: /// - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [blueGrey] and [brown], somewhat similar colors. + /// * [black], [black87], [black54], [black45], [black38], [black26], [black12], which + /// provide a different approach to showing shades of grey. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialColor grey = const MaterialColor( _greyPrimaryValue, const { @@ -1181,6 +1741,18 @@ class Colors { /// The blue-grey primary color and swatch. /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blueGrey.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.grey.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyan.png) + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blue.png) + /// + /// This swatch has no corresponding accent swatch. + /// + /// ## Sample code + /// /// ```dart /// new Icon( /// icon: Icons.widgets, @@ -1188,12 +1760,11 @@ class Colors { /// ), /// ``` /// - /// This swatch has no corresponding accent swatch. - /// /// See also: /// - /// * [Theme.of], which allows you to select colors from the current theme - /// rather than hard-coding colors in your build methods. + /// * [grey], [cyan], and [blue], similar colors. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. static const MaterialColor blueGrey = const MaterialColor( _blueGreyPrimaryValue, const { @@ -1211,7 +1782,7 @@ class Colors { ); static const int _blueGreyPrimaryValue = 0xFF607D8B; - /// The material design primary color swatches (except grey). + /// The material design primary color swatches, excluding grey. static const List primaries = const [ red, pink, @@ -1230,7 +1801,9 @@ class Colors { orange, deepOrange, brown, - // grey intentionally omitted + // The grey swatch is intentionally omitted because when picking a color + // randomly from this list to colorize an application, picking grey suddenly + // makes the app look disabled. blueGrey, ]; From 3aeeabb34a37237458e76f8505ad361cb5eece83 Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Mon, 12 Jun 2017 16:52:35 -0700 Subject: [PATCH 23/66] Analyze sample code (#10619) --- packages/flutter/lib/src/material/colors.dart | 282 +++++++++--------- 1 file changed, 141 insertions(+), 141 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 14a1fa798768..f11c21079159 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -105,7 +105,7 @@ class MaterialAccentColor extends ColorSwatch { /// using an integer for the specific color desired, as follows: /// /// ```dart -/// Colors.green[400] // Selects a mid-range green. +/// Color selection = Colors.green[400]; // Selects a mid-range green. /// ``` /// /// Each [ColorSwatch] constant is a color and can used directly. For example: @@ -368,10 +368,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.red[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.red[400], + /// ) /// ``` /// /// See also: @@ -411,10 +411,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.redAccent[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.redAccent[400], + /// ) /// ``` /// /// See also: @@ -448,10 +448,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.pink[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.pink[400], + /// ) /// ``` /// /// See also: @@ -491,10 +491,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.pinkAccent[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.pinkAccent[400], + /// ) /// ``` /// /// See also: @@ -528,10 +528,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.purple[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.purple[400], + /// ) /// ``` /// /// See also: @@ -571,10 +571,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.purpleAccent[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.purpleAccent[400], + /// ) /// ``` /// /// See also: @@ -608,10 +608,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.deepPurple[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.deepPurple[400], + /// ) /// ``` /// /// See also: @@ -651,10 +651,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.deepPurpleAccent[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.deepPurpleAccent[400], + /// ) /// ``` /// /// See also: @@ -688,10 +688,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.indigo[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.indigo[400], + /// ) /// ``` /// /// See also: @@ -731,10 +731,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.indigoAccent[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.indigoAccent[400], + /// ) /// ``` /// /// See also: @@ -770,10 +770,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.blue[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.blue[400], + /// ) /// ``` /// /// See also: @@ -813,10 +813,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.blueAccent[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.blueAccent[400], + /// ) /// ``` /// /// See also: @@ -850,10 +850,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.lightBlue[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.lightBlue[400], + /// ) /// ``` /// /// See also: @@ -893,10 +893,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.lightBlueAccent[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.lightBlueAccent[400], + /// ) /// ``` /// /// See also: @@ -932,10 +932,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.cyan[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.cyan[400], + /// ) /// ``` /// /// See also: @@ -975,10 +975,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.cyanAccent[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.cyanAccent[400], + /// ) /// ``` /// /// See also: @@ -1012,10 +1012,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.teal[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.teal[400], + /// ) /// ``` /// /// See also: @@ -1055,10 +1055,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.tealAccent[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.tealAccent[400], + /// ) /// ``` /// /// See also: @@ -1095,10 +1095,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.green[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.green[400], + /// ) /// ``` /// /// See also: @@ -1141,10 +1141,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.greenAccent[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.greenAccent[400], + /// ) /// ``` /// /// See also: @@ -1178,10 +1178,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.lightGreen[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.lightGreen[400], + /// ) /// ``` /// /// See also: @@ -1221,10 +1221,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.lightGreenAccent[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.lightGreenAccent[400], + /// ) /// ``` /// /// See also: @@ -1258,10 +1258,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.lime[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.lime[400], + /// ) /// ``` /// /// See also: @@ -1301,10 +1301,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.limeAccent[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.limeAccent[400], + /// ) /// ``` /// /// See also: @@ -1338,10 +1338,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.yellow[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.yellow[400], + /// ) /// ``` /// /// See also: @@ -1381,10 +1381,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.yellowAccent[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.yellowAccent[400], + /// ) /// ``` /// /// See also: @@ -1418,10 +1418,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.amber[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.amber[400], + /// ) /// ``` /// /// See also: @@ -1461,10 +1461,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.amberAccent[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.amberAccent[400], + /// ) /// ``` /// /// See also: @@ -1500,10 +1500,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.orange[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.orange[400], + /// ) /// ``` /// /// See also: @@ -1543,10 +1543,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.orangeAccent[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.orangeAccent[400], + /// ) /// ``` /// /// See also: @@ -1582,10 +1582,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.deepOrange[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.deepOrange[400], + /// ) /// ``` /// /// See also: @@ -1625,10 +1625,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.deepOrangeAccent[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.deepOrangeAccent[400], + /// ) /// ``` /// /// See also: @@ -1661,10 +1661,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.brown[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.brown[400], + /// ) /// ``` /// /// See also: @@ -1707,10 +1707,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.grey[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.grey[400], + /// ) /// ``` /// /// See also: @@ -1754,10 +1754,10 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( - /// icon: Icons.widgets, - /// color: Colors.blueGrey[400], - /// ), + /// new Icon( + /// Icons.widgets, + /// color: Colors.blueGrey[400], + /// ) /// ``` /// /// See also: From 1eab0a72f8714ea64a4594f5f45a02ea37582f6a Mon Sep 17 00:00:00 2001 From: Alexandre Ardhuin Date: Fri, 2 Feb 2018 23:27:29 +0100 Subject: [PATCH 24/66] some whitespace cleanup (#14443) --- packages/flutter/lib/src/material/colors.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index f11c21079159..fde3e5a23ef7 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -199,7 +199,7 @@ class Colors { /// are variants on this color but with different opacities. /// * [white], a solid white color. /// * [transparent], a fully-transparent color. - static const Color black = const Color(0xFF000000); + static const Color black = const Color(0xFF000000); /// Black with 87% opacity. /// @@ -299,7 +299,7 @@ class Colors { /// but with different opacities. /// * [black], a solid black color. /// * [transparent], a fully-transparent color. - static const Color white = const Color(0xFFFFFFFF); + static const Color white = const Color(0xFFFFFFFF); /// White with 70% opacity. /// From 800612941e08f9690bab4661e463f87344995cac Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Fri, 2 Feb 2018 16:00:57 -0800 Subject: [PATCH 25/66] Explain MaterialColor's constructor better. (#14407) Fixes https://github.com/flutter/flutter/issues/14393 --- packages/flutter/lib/src/material/colors.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index fde3e5a23ef7..a25b9c63412f 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -17,6 +17,11 @@ import 'package:flutter/painting.dart'; /// * [Colors], which defines all of the standard material colors. class MaterialColor extends ColorSwatch { /// Creates a color swatch with a variety of shades. + /// + /// The `primary` argument should be the 32 bit ARGB value of one of the + /// values in the swatch, as would be passed to the [new Color] constructor + /// for that same color, and as is exposed by [value]. (This is distinct from + /// the specific index of the color in the swatch.) const MaterialColor(int primary, Map swatch) : super(primary, swatch); /// The lightest shade. From aad40f87c7cccaa5d27e462e4dc295381580f090 Mon Sep 17 00:00:00 2001 From: Hans Muller Date: Mon, 5 Feb 2018 12:59:45 -0800 Subject: [PATCH 26/66] Material button update (#14410) --- packages/flutter/lib/src/material/colors.dart | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index a25b9c63412f..124f60e3f22c 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -336,6 +336,18 @@ class Colors { /// but with different opacities. static const Color white30 = const Color(0x4DFFFFFF); + /// White with 24% opacity. + /// + /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.whites.png) + /// + /// Used for the splash color for filled buttons. + /// + /// See also: + /// + /// * [white, white70, white30, white10], which are variants on this color + /// but with different opacities. + static const Color white24 = const Color(0x3DFFFFFF); + /// White with 12% opacity. /// /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.whites.png) From f60c0c9c41bb74216a8e51f939ac11a52a4ff61f Mon Sep 17 00:00:00 2001 From: Adrian Secord Date: Mon, 30 Apr 2018 23:29:46 -0400 Subject: [PATCH 27/66] Updated links to Material design guidelines to use short links. (#17077) --- packages/flutter/lib/src/material/colors.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 124f60e3f22c..c9b3c91b1699 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -66,7 +66,7 @@ class MaterialColor extends ColorSwatch { /// See also: /// /// * [Colors], which defines all of the standard material colors. -/// * +/// * class MaterialAccentColor extends ColorSwatch { /// Creates a color swatch with a variety of shades appropriate for accent /// colors. From 5b3a7fb86458ef5c0660a93e9d4a238bdaa93801 Mon Sep 17 00:00:00 2001 From: Greg Spencer Date: Thu, 17 May 2018 09:53:06 -0700 Subject: [PATCH 28/66] Moving API doc asset URLs to point to the new location. (#17697) I'm moving the assets in the assets-for-api-docs repo to a slightly different location to help with organization in that repo, so this PR points the doc URLs to the new location. The old assets won't be removed until this PR makes its way to the API docs website. No documentation or code changes here, other than changing doc image URLs. --- packages/flutter/lib/src/material/colors.dart | 520 +++++++++--------- 1 file changed, 260 insertions(+), 260 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index c9b3c91b1699..0c2666838f2b 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -123,59 +123,59 @@ class MaterialAccentColor extends ColorSwatch { /// /// ## Color palettes /// -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pink.png) -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pinkAccent.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pink.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pinkAccent.png) /// -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.red.png) -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.redAccent.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.red.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.redAccent.png) /// -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrange.png) -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrangeAccent.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepOrange.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepOrangeAccent.png) /// -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orange.png) -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orangeAccent.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.orange.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.orangeAccent.png) /// -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amber.png) -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amberAccent.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.amber.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.amberAccent.png) /// -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellow.png) -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellowAccent.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.yellow.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.yellowAccent.png) /// -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lime.png) -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.limeAccent.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lime.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.limeAccent.png) /// -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreen.png) -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreenAccent.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightGreen.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightGreenAccent.png) /// -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.green.png) -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.greenAccent.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.green.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.greenAccent.png) /// -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.teal.png) -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.tealAccent.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.teal.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.tealAccent.png) /// -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyan.png) -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyanAccent.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyan.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyanAccent.png) /// -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlue.png) -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlueAccent.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightBlue.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightBlueAccent.png) /// -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blue.png) -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blueAccent.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blue.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blueAccent.png) /// -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigo.png) -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigoAccent.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.indigo.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.indigoAccent.png) /// -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purple.png) -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purpleAccent.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.purple.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.purpleAccent.png) /// -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurple.png) -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurpleAccent.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepPurple.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepPurpleAccent.png) /// -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blueGrey.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blueGrey.png) /// -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.brown.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.brown.png) /// -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.grey.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.grey.png) /// /// ## Blacks and whites /// @@ -183,8 +183,8 @@ class MaterialAccentColor extends ColorSwatch { /// levels (e.g. [Colors.white12] and [Colors.white10]) are very hard to see and /// should be avoided in general. They are intended for very subtle effects. /// -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blacks.png) -/// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.whites.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blacks.png) +/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.whites.png) /// /// The [Colors.transparent] color isn't shown here because it is entirely /// invisible! @@ -196,7 +196,7 @@ class Colors { /// Completely opaque black. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blacks.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blacks.png) /// /// See also: /// @@ -210,7 +210,7 @@ class Colors { /// /// This is a good contrasting color for text in light themes. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blacks.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blacks.png) /// /// See also: /// @@ -226,7 +226,7 @@ class Colors { /// This is a color commonly used for headings in light themes. It's also used /// as the mask color behind dialogs. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blacks.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blacks.png) /// /// See also: /// @@ -241,7 +241,7 @@ class Colors { /// /// Used for disabled icons. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blacks.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blacks.png) /// /// See also: /// @@ -253,7 +253,7 @@ class Colors { /// /// Used for the placeholder text in data tables in light themes. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blacks.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blacks.png) /// /// See also: /// @@ -265,7 +265,7 @@ class Colors { /// /// Used for disabled radio buttons and the text of disabled flat buttons in light themes. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blacks.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blacks.png) /// /// See also: /// @@ -278,7 +278,7 @@ class Colors { /// Black with 12% opacity. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blacks.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blacks.png) /// /// Used for the background of disabled raised buttons in light themes. /// @@ -293,7 +293,7 @@ class Colors { /// This is a good contrasting color for the [ThemeData.primaryColor] in the /// dark theme. See [ThemeData.brightness]. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.whites.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.whites.png) /// /// See also: /// @@ -310,7 +310,7 @@ class Colors { /// /// This is a color commonly used for headings in dark themes. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.whites.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.whites.png) /// /// See also: /// @@ -325,7 +325,7 @@ class Colors { /// /// Used for disabled radio buttons and the text of disabled flat buttons in dark themes. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.whites.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.whites.png) /// /// See also: /// @@ -338,7 +338,7 @@ class Colors { /// White with 24% opacity. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.whites.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.whites.png) /// /// Used for the splash color for filled buttons. /// @@ -350,7 +350,7 @@ class Colors { /// White with 12% opacity. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.whites.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.whites.png) /// /// Used for the background of disabled raised buttons in dark themes. /// @@ -362,7 +362,7 @@ class Colors { /// White with 10% opacity. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.whites.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.whites.png) /// /// See also: /// @@ -373,14 +373,14 @@ class Colors { /// The red primary color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.red.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.redAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.red.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.redAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrange.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrangeAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepOrange.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepOrangeAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pink.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pinkAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pink.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pinkAccent.png) /// /// ## Sample code /// @@ -416,14 +416,14 @@ class Colors { /// The red accent swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.red.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.redAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.red.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.redAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrange.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrangeAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepOrange.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepOrangeAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pink.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pinkAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pink.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pinkAccent.png) /// /// ## Sample code /// @@ -453,14 +453,14 @@ class Colors { /// The pink primary color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pink.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pinkAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pink.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pinkAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.red.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.redAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.red.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.redAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purple.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purpleAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.purple.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.purpleAccent.png) /// /// ## Sample code /// @@ -496,14 +496,14 @@ class Colors { /// The pink accent color swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pink.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pinkAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pink.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pinkAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.red.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.redAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.red.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.redAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purple.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purpleAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.purple.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.purpleAccent.png) /// /// ## Sample code /// @@ -533,14 +533,14 @@ class Colors { /// The purple primary color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purple.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purpleAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.purple.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.purpleAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurple.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurpleAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepPurple.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepPurpleAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pink.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pinkAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pink.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pinkAccent.png) /// /// ## Sample code /// @@ -576,14 +576,14 @@ class Colors { /// The purple accent color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purple.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purpleAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.purple.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.purpleAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurple.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurpleAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepPurple.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepPurpleAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pink.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.pinkAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pink.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pinkAccent.png) /// /// ## Sample code /// @@ -613,14 +613,14 @@ class Colors { /// The deep purple primary color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurple.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurpleAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepPurple.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepPurpleAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purple.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purpleAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.purple.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.purpleAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigo.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigoAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.indigo.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.indigoAccent.png) /// /// ## Sample code /// @@ -656,14 +656,14 @@ class Colors { /// The deep purple accent color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurple.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurpleAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepPurple.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepPurpleAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purple.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.purpleAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.purple.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.purpleAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigo.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigoAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.indigo.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.indigoAccent.png) /// /// ## Sample code /// @@ -693,14 +693,14 @@ class Colors { /// The indigo primary color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigo.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigoAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.indigo.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.indigoAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blue.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blueAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blue.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blueAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurple.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurpleAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepPurple.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepPurpleAccent.png) /// /// ## Sample code /// @@ -736,14 +736,14 @@ class Colors { /// The indigo accent color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigo.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigoAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.indigo.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.indigoAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blue.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blueAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blue.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blueAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurple.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepPurpleAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepPurple.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepPurpleAccent.png) /// /// ## Sample code /// @@ -773,16 +773,16 @@ class Colors { /// The blue primary color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blue.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blueAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blue.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blueAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigo.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigoAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.indigo.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.indigoAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlue.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlueAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightBlue.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightBlueAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blueGrey.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blueGrey.png) /// /// ## Sample code /// @@ -818,14 +818,14 @@ class Colors { /// The blue accent color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blue.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blueAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blue.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blueAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigo.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.indigoAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.indigo.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.indigoAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlue.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlueAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightBlue.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightBlueAccent.png) /// /// ## Sample code /// @@ -855,14 +855,14 @@ class Colors { /// The light blue primary color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlue.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlueAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightBlue.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightBlueAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blue.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blueAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blue.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blueAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyan.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyanAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyan.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyanAccent.png) /// /// ## Sample code /// @@ -898,14 +898,14 @@ class Colors { /// The light blue accent swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlue.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlueAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightBlue.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightBlueAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blue.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blueAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blue.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blueAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyan.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyanAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyan.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyanAccent.png) /// /// ## Sample code /// @@ -935,16 +935,16 @@ class Colors { /// The cyan primary color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyan.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyanAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyan.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyanAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlue.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlueAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightBlue.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightBlueAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.teal.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.tealAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.teal.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.tealAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blueGrey.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blueGrey.png) /// /// ## Sample code /// @@ -980,14 +980,14 @@ class Colors { /// The cyan accent color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyan.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyanAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyan.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyanAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlue.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightBlueAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightBlue.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightBlueAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.teal.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.tealAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.teal.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.tealAccent.png) /// /// ## Sample code /// @@ -1017,14 +1017,14 @@ class Colors { /// The teal primary color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.teal.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.tealAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.teal.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.tealAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.green.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.greenAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.green.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.greenAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyan.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyanAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyan.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyanAccent.png) /// /// ## Sample code /// @@ -1060,14 +1060,14 @@ class Colors { /// The teal accent color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.teal.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.tealAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.teal.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.tealAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.green.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.greenAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.green.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.greenAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyan.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyanAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyan.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyanAccent.png) /// /// ## Sample code /// @@ -1097,17 +1097,17 @@ class Colors { /// The green primary color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.green.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.greenAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.green.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.greenAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.teal.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.tealAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.teal.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.tealAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreen.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreenAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightGreen.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightGreenAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lime.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.limeAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lime.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.limeAccent.png) /// /// ## Sample code /// @@ -1143,17 +1143,17 @@ class Colors { /// The green accent color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.green.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.greenAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.green.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.greenAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.teal.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.tealAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.teal.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.tealAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreen.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreenAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightGreen.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightGreenAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lime.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.limeAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lime.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.limeAccent.png) /// /// ## Sample code /// @@ -1183,14 +1183,14 @@ class Colors { /// The light green primary color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreen.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreenAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightGreen.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightGreenAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.green.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.greenAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.green.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.greenAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lime.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.limeAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lime.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.limeAccent.png) /// /// ## Sample code /// @@ -1226,14 +1226,14 @@ class Colors { /// The light green accent color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreen.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreenAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightGreen.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightGreenAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.green.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.greenAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.green.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.greenAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lime.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.limeAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lime.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.limeAccent.png) /// /// ## Sample code /// @@ -1263,14 +1263,14 @@ class Colors { /// The lime primary color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lime.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.limeAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lime.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.limeAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreen.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreenAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightGreen.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightGreenAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellow.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellowAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.yellow.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.yellowAccent.png) /// /// ## Sample code /// @@ -1306,14 +1306,14 @@ class Colors { /// The lime accent primary color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lime.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.limeAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lime.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.limeAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreen.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lightGreenAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightGreen.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightGreenAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellow.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellowAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.yellow.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.yellowAccent.png) /// /// ## Sample code /// @@ -1343,14 +1343,14 @@ class Colors { /// The yellow primary color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellow.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellowAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.yellow.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.yellowAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lime.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.limeAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lime.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.limeAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amber.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amberAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.amber.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.amberAccent.png) /// /// ## Sample code /// @@ -1386,14 +1386,14 @@ class Colors { /// The yellow accent color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellow.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellowAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.yellow.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.yellowAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.lime.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.limeAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lime.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.limeAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amber.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amberAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.amber.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.amberAccent.png) /// /// ## Sample code /// @@ -1423,14 +1423,14 @@ class Colors { /// The amber primary color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amber.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amberAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.amber.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.amberAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellow.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellowAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.yellow.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.yellowAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orange.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orangeAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.orange.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.orangeAccent.png) /// /// ## Sample code /// @@ -1466,14 +1466,14 @@ class Colors { /// The amber accent color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amber.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amberAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.amber.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.amberAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellow.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.yellowAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.yellow.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.yellowAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orange.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orangeAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.orange.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.orangeAccent.png) /// /// ## Sample code /// @@ -1503,16 +1503,16 @@ class Colors { /// The orange primary color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orange.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orangeAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.orange.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.orangeAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amber.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amberAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.amber.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.amberAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrange.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrangeAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepOrange.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepOrangeAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.brown.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.brown.png) /// /// ## Sample code /// @@ -1548,14 +1548,14 @@ class Colors { /// The orange accent color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orange.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orangeAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.orange.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.orangeAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amber.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.amberAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.amber.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.amberAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrange.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrangeAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepOrange.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepOrangeAccent.png) /// /// ## Sample code /// @@ -1585,16 +1585,16 @@ class Colors { /// The deep orange primary color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrange.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrangeAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepOrange.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepOrangeAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orange.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orangeAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.orange.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.orangeAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.red.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.redAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.red.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.redAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.brown.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.brown.png) /// /// ## Sample code /// @@ -1630,14 +1630,14 @@ class Colors { /// The deep orange accent color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrange.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.deepOrangeAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepOrange.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepOrangeAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orange.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orangeAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.orange.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.orangeAccent.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.red.png) - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.redAccent.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.red.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.redAccent.png) /// /// ## Sample code /// @@ -1667,11 +1667,11 @@ class Colors { /// The brown primary color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.brown.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.brown.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.orange.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.orange.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blueGrey.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blueGrey.png) /// /// This swatch has no corresponding accent color and swatch. /// @@ -1708,11 +1708,11 @@ class Colors { /// The grey primary color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.grey.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.grey.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blueGrey.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blueGrey.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.brown.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.brown.png) /// /// This swatch has no corresponding accent swatch. /// @@ -1758,13 +1758,13 @@ class Colors { /// The blue-grey primary color and swatch. /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blueGrey.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blueGrey.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.grey.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.grey.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.cyan.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyan.png) /// - /// ![](https://flutter.github.io/assets-for-api-docs/material/Colors.blue.png) + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blue.png) /// /// This swatch has no corresponding accent swatch. /// From db7289f45724807e1e3c74e3fe27c4004b85c940 Mon Sep 17 00:00:00 2001 From: Alexandre Ardhuin Date: Mon, 16 Jul 2018 21:43:48 +0200 Subject: [PATCH 29/66] enable lint unnecessary_const (#19342) --- packages/flutter/lib/src/material/colors.dart | 684 +++++++++--------- 1 file changed, 342 insertions(+), 342 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 0c2666838f2b..3c71007b6791 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -192,7 +192,7 @@ class Colors { Colors._(); /// Completely invisible. - static const Color transparent = const Color(0x00000000); + static const Color transparent = Color(0x00000000); /// Completely opaque black. /// @@ -204,7 +204,7 @@ class Colors { /// are variants on this color but with different opacities. /// * [white], a solid white color. /// * [transparent], a fully-transparent color. - static const Color black = const Color(0xFF000000); + static const Color black = Color(0xFF000000); /// Black with 87% opacity. /// @@ -219,7 +219,7 @@ class Colors { /// rather than hard-coding colors in your build methods. /// * [black], [black54], [black45], [black38], [black26], [black12], which /// are variants on this color but with different opacities. - static const Color black87 = const Color(0xDD000000); + static const Color black87 = Color(0xDD000000); /// Black with 54% opacity. /// @@ -235,7 +235,7 @@ class Colors { /// rather than hard-coding colors in your build methods. /// * [black], [black87], [black45], [black38], [black26], [black12], which /// are variants on this color but with different opacities. - static const Color black54 = const Color(0x8A000000); + static const Color black54 = Color(0x8A000000); /// Black with 45% opacity. /// @@ -247,7 +247,7 @@ class Colors { /// /// * [black], [black87], [black54], [black38], [black26], [black12], which /// are variants on this color but with different opacities. - static const Color black45 = const Color(0x73000000); + static const Color black45 = Color(0x73000000); /// Black with 38% opacity. /// @@ -259,7 +259,7 @@ class Colors { /// /// * [black], [black87], [black54], [black45], [black26], [black12], which /// are variants on this color but with different opacities. - static const Color black38 = const Color(0x61000000); + static const Color black38 = Color(0x61000000); /// Black with 26% opacity. /// @@ -274,7 +274,7 @@ class Colors { /// rather than hard-coding colors in your build methods. /// * [black], [black87], [black54], [black45], [black38], [black12], which /// are variants on this color but with different opacities. - static const Color black26 = const Color(0x42000000); + static const Color black26 = Color(0x42000000); /// Black with 12% opacity. /// @@ -286,7 +286,7 @@ class Colors { /// /// * [black], [black87], [black54], [black45], [black38], [black26], which /// are variants on this color but with different opacities. - static const Color black12 = const Color(0x1F000000); + static const Color black12 = Color(0x1F000000); /// Completely opaque white. /// @@ -304,7 +304,7 @@ class Colors { /// but with different opacities. /// * [black], a solid black color. /// * [transparent], a fully-transparent color. - static const Color white = const Color(0xFFFFFFFF); + static const Color white = Color(0xFFFFFFFF); /// White with 70% opacity. /// @@ -319,7 +319,7 @@ class Colors { /// rather than hard-coding colors in your build methods. /// * [white, white30, white12, white10], which are variants on this color /// but with different opacities. - static const Color white70 = const Color(0xB3FFFFFF); + static const Color white70 = Color(0xB3FFFFFF); /// White with 32% opacity. /// @@ -334,7 +334,7 @@ class Colors { /// rather than hard-coding colors in your build methods. /// * [white, white70, white12, white10], which are variants on this color /// but with different opacities. - static const Color white30 = const Color(0x4DFFFFFF); + static const Color white30 = Color(0x4DFFFFFF); /// White with 24% opacity. /// @@ -346,7 +346,7 @@ class Colors { /// /// * [white, white70, white30, white10], which are variants on this color /// but with different opacities. - static const Color white24 = const Color(0x3DFFFFFF); + static const Color white24 = Color(0x3DFFFFFF); /// White with 12% opacity. /// @@ -358,7 +358,7 @@ class Colors { /// /// * [white, white70, white30, white10], which are variants on this color /// but with different opacities. - static const Color white12 = const Color(0x1FFFFFFF); + static const Color white12 = Color(0x1FFFFFFF); /// White with 10% opacity. /// @@ -369,7 +369,7 @@ class Colors { /// * [white, white70, white30, white12], which are variants on this color /// but with different opacities. /// * [transparent], a fully-transparent color, not far from this one. - static const Color white10 = const Color(0x1AFFFFFF); + static const Color white10 = Color(0x1AFFFFFF); /// The red primary color and swatch. /// @@ -397,19 +397,19 @@ class Colors { /// * [deepOrange] and [pink], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor red = const MaterialColor( + static const MaterialColor red = MaterialColor( _redPrimaryValue, - const { - 50: const Color(0xFFFFEBEE), - 100: const Color(0xFFFFCDD2), - 200: const Color(0xFFEF9A9A), - 300: const Color(0xFFE57373), - 400: const Color(0xFFEF5350), - 500: const Color(_redPrimaryValue), - 600: const Color(0xFFE53935), - 700: const Color(0xFFD32F2F), - 800: const Color(0xFFC62828), - 900: const Color(0xFFB71C1C), + { + 50: Color(0xFFFFEBEE), + 100: Color(0xFFFFCDD2), + 200: Color(0xFFEF9A9A), + 300: Color(0xFFE57373), + 400: Color(0xFFEF5350), + 500: Color(_redPrimaryValue), + 600: Color(0xFFE53935), + 700: Color(0xFFD32F2F), + 800: Color(0xFFC62828), + 900: Color(0xFFB71C1C), }, ); static const int _redPrimaryValue = 0xFFF44336; @@ -440,13 +440,13 @@ class Colors { /// * [deepOrangeAccent] and [pinkAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor redAccent = const MaterialAccentColor( + static const MaterialAccentColor redAccent = MaterialAccentColor( _redAccentValue, - const { - 100: const Color(0xFFFF8A80), - 200: const Color(_redAccentValue), - 400: const Color(0xFFFF1744), - 700: const Color(0xFFD50000), + { + 100: Color(0xFFFF8A80), + 200: Color(_redAccentValue), + 400: Color(0xFFFF1744), + 700: Color(0xFFD50000), }, ); static const int _redAccentValue = 0xFFFF5252; @@ -477,19 +477,19 @@ class Colors { /// * [red] and [purple], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor pink = const MaterialColor( + static const MaterialColor pink = MaterialColor( _pinkPrimaryValue, - const { - 50: const Color(0xFFFCE4EC), - 100: const Color(0xFFF8BBD0), - 200: const Color(0xFFF48FB1), - 300: const Color(0xFFF06292), - 400: const Color(0xFFEC407A), - 500: const Color(_pinkPrimaryValue), - 600: const Color(0xFFD81B60), - 700: const Color(0xFFC2185B), - 800: const Color(0xFFAD1457), - 900: const Color(0xFF880E4F), + { + 50: Color(0xFFFCE4EC), + 100: Color(0xFFF8BBD0), + 200: Color(0xFFF48FB1), + 300: Color(0xFFF06292), + 400: Color(0xFFEC407A), + 500: Color(_pinkPrimaryValue), + 600: Color(0xFFD81B60), + 700: Color(0xFFC2185B), + 800: Color(0xFFAD1457), + 900: Color(0xFF880E4F), }, ); static const int _pinkPrimaryValue = 0xFFE91E63; @@ -520,13 +520,13 @@ class Colors { /// * [redAccent] and [purpleAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor pinkAccent = const MaterialAccentColor( + static const MaterialAccentColor pinkAccent = MaterialAccentColor( _pinkAccentPrimaryValue, - const { - 100: const Color(0xFFFF80AB), - 200: const Color(_pinkAccentPrimaryValue), - 400: const Color(0xFFF50057), - 700: const Color(0xFFC51162), + { + 100: Color(0xFFFF80AB), + 200: Color(_pinkAccentPrimaryValue), + 400: Color(0xFFF50057), + 700: Color(0xFFC51162), }, ); static const int _pinkAccentPrimaryValue = 0xFFFF4081; @@ -557,19 +557,19 @@ class Colors { /// * [deepPurple] and [pink], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor purple = const MaterialColor( + static const MaterialColor purple = MaterialColor( _purplePrimaryValue, - const { - 50: const Color(0xFFF3E5F5), - 100: const Color(0xFFE1BEE7), - 200: const Color(0xFFCE93D8), - 300: const Color(0xFFBA68C8), - 400: const Color(0xFFAB47BC), - 500: const Color(_purplePrimaryValue), - 600: const Color(0xFF8E24AA), - 700: const Color(0xFF7B1FA2), - 800: const Color(0xFF6A1B9A), - 900: const Color(0xFF4A148C), + { + 50: Color(0xFFF3E5F5), + 100: Color(0xFFE1BEE7), + 200: Color(0xFFCE93D8), + 300: Color(0xFFBA68C8), + 400: Color(0xFFAB47BC), + 500: Color(_purplePrimaryValue), + 600: Color(0xFF8E24AA), + 700: Color(0xFF7B1FA2), + 800: Color(0xFF6A1B9A), + 900: Color(0xFF4A148C), }, ); static const int _purplePrimaryValue = 0xFF9C27B0; @@ -600,13 +600,13 @@ class Colors { /// * [deepPurpleAccent] and [pinkAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor purpleAccent = const MaterialAccentColor( + static const MaterialAccentColor purpleAccent = MaterialAccentColor( _purpleAccentPrimaryValue, - const { - 100: const Color(0xFFEA80FC), - 200: const Color(_purpleAccentPrimaryValue), - 400: const Color(0xFFD500F9), - 700: const Color(0xFFAA00FF), + { + 100: Color(0xFFEA80FC), + 200: Color(_purpleAccentPrimaryValue), + 400: Color(0xFFD500F9), + 700: Color(0xFFAA00FF), }, ); static const int _purpleAccentPrimaryValue = 0xFFE040FB; @@ -637,19 +637,19 @@ class Colors { /// * [purple] and [indigo], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor deepPurple = const MaterialColor( + static const MaterialColor deepPurple = MaterialColor( _deepPurplePrimaryValue, - const { - 50: const Color(0xFFEDE7F6), - 100: const Color(0xFFD1C4E9), - 200: const Color(0xFFB39DDB), - 300: const Color(0xFF9575CD), - 400: const Color(0xFF7E57C2), - 500: const Color(_deepPurplePrimaryValue), - 600: const Color(0xFF5E35B1), - 700: const Color(0xFF512DA8), - 800: const Color(0xFF4527A0), - 900: const Color(0xFF311B92), + { + 50: Color(0xFFEDE7F6), + 100: Color(0xFFD1C4E9), + 200: Color(0xFFB39DDB), + 300: Color(0xFF9575CD), + 400: Color(0xFF7E57C2), + 500: Color(_deepPurplePrimaryValue), + 600: Color(0xFF5E35B1), + 700: Color(0xFF512DA8), + 800: Color(0xFF4527A0), + 900: Color(0xFF311B92), }, ); static const int _deepPurplePrimaryValue = 0xFF673AB7; @@ -680,13 +680,13 @@ class Colors { /// * [purpleAccent] and [indigoAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor deepPurpleAccent = const MaterialAccentColor( + static const MaterialAccentColor deepPurpleAccent = MaterialAccentColor( _deepPurpleAccentPrimaryValue, - const { - 100: const Color(0xFFB388FF), - 200: const Color(_deepPurpleAccentPrimaryValue), - 400: const Color(0xFF651FFF), - 700: const Color(0xFF6200EA), + { + 100: Color(0xFFB388FF), + 200: Color(_deepPurpleAccentPrimaryValue), + 400: Color(0xFF651FFF), + 700: Color(0xFF6200EA), }, ); static const int _deepPurpleAccentPrimaryValue = 0xFF7C4DFF; @@ -717,19 +717,19 @@ class Colors { /// * [blue] and [deepPurple], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor indigo = const MaterialColor( + static const MaterialColor indigo = MaterialColor( _indigoPrimaryValue, - const { - 50: const Color(0xFFE8EAF6), - 100: const Color(0xFFC5CAE9), - 200: const Color(0xFF9FA8DA), - 300: const Color(0xFF7986CB), - 400: const Color(0xFF5C6BC0), - 500: const Color(_indigoPrimaryValue), - 600: const Color(0xFF3949AB), - 700: const Color(0xFF303F9F), - 800: const Color(0xFF283593), - 900: const Color(0xFF1A237E), + { + 50: Color(0xFFE8EAF6), + 100: Color(0xFFC5CAE9), + 200: Color(0xFF9FA8DA), + 300: Color(0xFF7986CB), + 400: Color(0xFF5C6BC0), + 500: Color(_indigoPrimaryValue), + 600: Color(0xFF3949AB), + 700: Color(0xFF303F9F), + 800: Color(0xFF283593), + 900: Color(0xFF1A237E), }, ); static const int _indigoPrimaryValue = 0xFF3F51B5; @@ -760,13 +760,13 @@ class Colors { /// * [blueAccent] and [deepPurpleAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor indigoAccent = const MaterialAccentColor( + static const MaterialAccentColor indigoAccent = MaterialAccentColor( _indigoAccentPrimaryValue, - const { - 100: const Color(0xFF8C9EFF), - 200: const Color(_indigoAccentPrimaryValue), - 400: const Color(0xFF3D5AFE), - 700: const Color(0xFF304FFE), + { + 100: Color(0xFF8C9EFF), + 200: Color(_indigoAccentPrimaryValue), + 400: Color(0xFF3D5AFE), + 700: Color(0xFF304FFE), }, ); static const int _indigoAccentPrimaryValue = 0xFF536DFE; @@ -799,19 +799,19 @@ class Colors { /// * [indigo], [lightBlue], and [blueGrey], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor blue = const MaterialColor( + static const MaterialColor blue = MaterialColor( _bluePrimaryValue, - const { - 50: const Color(0xFFE3F2FD), - 100: const Color(0xFFBBDEFB), - 200: const Color(0xFF90CAF9), - 300: const Color(0xFF64B5F6), - 400: const Color(0xFF42A5F5), - 500: const Color(_bluePrimaryValue), - 600: const Color(0xFF1E88E5), - 700: const Color(0xFF1976D2), - 800: const Color(0xFF1565C0), - 900: const Color(0xFF0D47A1), + { + 50: Color(0xFFE3F2FD), + 100: Color(0xFFBBDEFB), + 200: Color(0xFF90CAF9), + 300: Color(0xFF64B5F6), + 400: Color(0xFF42A5F5), + 500: Color(_bluePrimaryValue), + 600: Color(0xFF1E88E5), + 700: Color(0xFF1976D2), + 800: Color(0xFF1565C0), + 900: Color(0xFF0D47A1), }, ); static const int _bluePrimaryValue = 0xFF2196F3; @@ -842,13 +842,13 @@ class Colors { /// * [indigoAccent] and [lightBlueAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor blueAccent = const MaterialAccentColor( + static const MaterialAccentColor blueAccent = MaterialAccentColor( _blueAccentPrimaryValue, - const { - 100: const Color(0xFF82B1FF), - 200: const Color(_blueAccentPrimaryValue), - 400: const Color(0xFF2979FF), - 700: const Color(0xFF2962FF), + { + 100: Color(0xFF82B1FF), + 200: Color(_blueAccentPrimaryValue), + 400: Color(0xFF2979FF), + 700: Color(0xFF2962FF), }, ); static const int _blueAccentPrimaryValue = 0xFF448AFF; @@ -879,19 +879,19 @@ class Colors { /// * [blue] and [cyan], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor lightBlue = const MaterialColor( + static const MaterialColor lightBlue = MaterialColor( _lightBluePrimaryValue, - const { - 50: const Color(0xFFE1F5FE), - 100: const Color(0xFFB3E5FC), - 200: const Color(0xFF81D4FA), - 300: const Color(0xFF4FC3F7), - 400: const Color(0xFF29B6F6), - 500: const Color(_lightBluePrimaryValue), - 600: const Color(0xFF039BE5), - 700: const Color(0xFF0288D1), - 800: const Color(0xFF0277BD), - 900: const Color(0xFF01579B), + { + 50: Color(0xFFE1F5FE), + 100: Color(0xFFB3E5FC), + 200: Color(0xFF81D4FA), + 300: Color(0xFF4FC3F7), + 400: Color(0xFF29B6F6), + 500: Color(_lightBluePrimaryValue), + 600: Color(0xFF039BE5), + 700: Color(0xFF0288D1), + 800: Color(0xFF0277BD), + 900: Color(0xFF01579B), }, ); static const int _lightBluePrimaryValue = 0xFF03A9F4; @@ -922,13 +922,13 @@ class Colors { /// * [blueAccent] and [cyanAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor lightBlueAccent = const MaterialAccentColor( + static const MaterialAccentColor lightBlueAccent = MaterialAccentColor( _lightBlueAccentPrimaryValue, - const { - 100: const Color(0xFF80D8FF), - 200: const Color(_lightBlueAccentPrimaryValue), - 400: const Color(0xFF00B0FF), - 700: const Color(0xFF0091EA), + { + 100: Color(0xFF80D8FF), + 200: Color(_lightBlueAccentPrimaryValue), + 400: Color(0xFF00B0FF), + 700: Color(0xFF0091EA), }, ); static const int _lightBlueAccentPrimaryValue = 0xFF40C4FF; @@ -961,19 +961,19 @@ class Colors { /// * [lightBlue], [teal], and [blueGrey], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor cyan = const MaterialColor( + static const MaterialColor cyan = MaterialColor( _cyanPrimaryValue, - const { - 50: const Color(0xFFE0F7FA), - 100: const Color(0xFFB2EBF2), - 200: const Color(0xFF80DEEA), - 300: const Color(0xFF4DD0E1), - 400: const Color(0xFF26C6DA), - 500: const Color(_cyanPrimaryValue), - 600: const Color(0xFF00ACC1), - 700: const Color(0xFF0097A7), - 800: const Color(0xFF00838F), - 900: const Color(0xFF006064), + { + 50: Color(0xFFE0F7FA), + 100: Color(0xFFB2EBF2), + 200: Color(0xFF80DEEA), + 300: Color(0xFF4DD0E1), + 400: Color(0xFF26C6DA), + 500: Color(_cyanPrimaryValue), + 600: Color(0xFF00ACC1), + 700: Color(0xFF0097A7), + 800: Color(0xFF00838F), + 900: Color(0xFF006064), }, ); static const int _cyanPrimaryValue = 0xFF00BCD4; @@ -1004,13 +1004,13 @@ class Colors { /// * [lightBlueAccent] and [tealAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor cyanAccent = const MaterialAccentColor( + static const MaterialAccentColor cyanAccent = MaterialAccentColor( _cyanAccentPrimaryValue, - const { - 100: const Color(0xFF84FFFF), - 200: const Color(_cyanAccentPrimaryValue), - 400: const Color(0xFF00E5FF), - 700: const Color(0xFF00B8D4), + { + 100: Color(0xFF84FFFF), + 200: Color(_cyanAccentPrimaryValue), + 400: Color(0xFF00E5FF), + 700: Color(0xFF00B8D4), }, ); static const int _cyanAccentPrimaryValue = 0xFF18FFFF; @@ -1041,19 +1041,19 @@ class Colors { /// * [green] and [cyan], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor teal = const MaterialColor( + static const MaterialColor teal = MaterialColor( _tealPrimaryValue, - const { - 50: const Color(0xFFE0F2F1), - 100: const Color(0xFFB2DFDB), - 200: const Color(0xFF80CBC4), - 300: const Color(0xFF4DB6AC), - 400: const Color(0xFF26A69A), - 500: const Color(_tealPrimaryValue), - 600: const Color(0xFF00897B), - 700: const Color(0xFF00796B), - 800: const Color(0xFF00695C), - 900: const Color(0xFF004D40), + { + 50: Color(0xFFE0F2F1), + 100: Color(0xFFB2DFDB), + 200: Color(0xFF80CBC4), + 300: Color(0xFF4DB6AC), + 400: Color(0xFF26A69A), + 500: Color(_tealPrimaryValue), + 600: Color(0xFF00897B), + 700: Color(0xFF00796B), + 800: Color(0xFF00695C), + 900: Color(0xFF004D40), }, ); static const int _tealPrimaryValue = 0xFF009688; @@ -1084,13 +1084,13 @@ class Colors { /// * [greenAccent] and [cyanAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor tealAccent = const MaterialAccentColor( + static const MaterialAccentColor tealAccent = MaterialAccentColor( _tealAccentPrimaryValue, - const { - 100: const Color(0xFFA7FFEB), - 200: const Color(_tealAccentPrimaryValue), - 400: const Color(0xFF1DE9B6), - 700: const Color(0xFF00BFA5), + { + 100: Color(0xFFA7FFEB), + 200: Color(_tealAccentPrimaryValue), + 400: Color(0xFF1DE9B6), + 700: Color(0xFF00BFA5), }, ); static const int _tealAccentPrimaryValue = 0xFF64FFDA; @@ -1124,19 +1124,19 @@ class Colors { /// * [teal], [lightGreen], and [lime], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor green = const MaterialColor( + static const MaterialColor green = MaterialColor( _greenPrimaryValue, - const { - 50: const Color(0xFFE8F5E9), - 100: const Color(0xFFC8E6C9), - 200: const Color(0xFFA5D6A7), - 300: const Color(0xFF81C784), - 400: const Color(0xFF66BB6A), - 500: const Color(_greenPrimaryValue), - 600: const Color(0xFF43A047), - 700: const Color(0xFF388E3C), - 800: const Color(0xFF2E7D32), - 900: const Color(0xFF1B5E20), + { + 50: Color(0xFFE8F5E9), + 100: Color(0xFFC8E6C9), + 200: Color(0xFFA5D6A7), + 300: Color(0xFF81C784), + 400: Color(0xFF66BB6A), + 500: Color(_greenPrimaryValue), + 600: Color(0xFF43A047), + 700: Color(0xFF388E3C), + 800: Color(0xFF2E7D32), + 900: Color(0xFF1B5E20), }, ); static const int _greenPrimaryValue = 0xFF4CAF50; @@ -1170,13 +1170,13 @@ class Colors { /// * [tealAccent], [lightGreenAccent], and [limeAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor greenAccent = const MaterialAccentColor( + static const MaterialAccentColor greenAccent = MaterialAccentColor( _greenAccentPrimaryValue, - const { - 100: const Color(0xFFB9F6CA), - 200: const Color(_greenAccentPrimaryValue), - 400: const Color(0xFF00E676), - 700: const Color(0xFF00C853), + { + 100: Color(0xFFB9F6CA), + 200: Color(_greenAccentPrimaryValue), + 400: Color(0xFF00E676), + 700: Color(0xFF00C853), }, ); static const int _greenAccentPrimaryValue = 0xFF69F0AE; @@ -1207,19 +1207,19 @@ class Colors { /// * [green] and [lime], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor lightGreen = const MaterialColor( + static const MaterialColor lightGreen = MaterialColor( _lightGreenPrimaryValue, - const { - 50: const Color(0xFFF1F8E9), - 100: const Color(0xFFDCEDC8), - 200: const Color(0xFFC5E1A5), - 300: const Color(0xFFAED581), - 400: const Color(0xFF9CCC65), - 500: const Color(_lightGreenPrimaryValue), - 600: const Color(0xFF7CB342), - 700: const Color(0xFF689F38), - 800: const Color(0xFF558B2F), - 900: const Color(0xFF33691E), + { + 50: Color(0xFFF1F8E9), + 100: Color(0xFFDCEDC8), + 200: Color(0xFFC5E1A5), + 300: Color(0xFFAED581), + 400: Color(0xFF9CCC65), + 500: Color(_lightGreenPrimaryValue), + 600: Color(0xFF7CB342), + 700: Color(0xFF689F38), + 800: Color(0xFF558B2F), + 900: Color(0xFF33691E), }, ); static const int _lightGreenPrimaryValue = 0xFF8BC34A; @@ -1250,13 +1250,13 @@ class Colors { /// * [greenAccent] and [limeAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor lightGreenAccent = const MaterialAccentColor( + static const MaterialAccentColor lightGreenAccent = MaterialAccentColor( _lightGreenAccentPrimaryValue, - const { - 100: const Color(0xFFCCFF90), - 200: const Color(_lightGreenAccentPrimaryValue), - 400: const Color(0xFF76FF03), - 700: const Color(0xFF64DD17), + { + 100: Color(0xFFCCFF90), + 200: Color(_lightGreenAccentPrimaryValue), + 400: Color(0xFF76FF03), + 700: Color(0xFF64DD17), }, ); static const int _lightGreenAccentPrimaryValue = 0xFFB2FF59; @@ -1287,19 +1287,19 @@ class Colors { /// * [lightGreen] and [yellow], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor lime = const MaterialColor( + static const MaterialColor lime = MaterialColor( _limePrimaryValue, - const { - 50: const Color(0xFFF9FBE7), - 100: const Color(0xFFF0F4C3), - 200: const Color(0xFFE6EE9C), - 300: const Color(0xFFDCE775), - 400: const Color(0xFFD4E157), - 500: const Color(_limePrimaryValue), - 600: const Color(0xFFC0CA33), - 700: const Color(0xFFAFB42B), - 800: const Color(0xFF9E9D24), - 900: const Color(0xFF827717), + { + 50: Color(0xFFF9FBE7), + 100: Color(0xFFF0F4C3), + 200: Color(0xFFE6EE9C), + 300: Color(0xFFDCE775), + 400: Color(0xFFD4E157), + 500: Color(_limePrimaryValue), + 600: Color(0xFFC0CA33), + 700: Color(0xFFAFB42B), + 800: Color(0xFF9E9D24), + 900: Color(0xFF827717), }, ); static const int _limePrimaryValue = 0xFFCDDC39; @@ -1330,13 +1330,13 @@ class Colors { /// * [lightGreenAccent] and [yellowAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor limeAccent = const MaterialAccentColor( + static const MaterialAccentColor limeAccent = MaterialAccentColor( _limeAccentPrimaryValue, - const { - 100: const Color(0xFFF4FF81), - 200: const Color(_limeAccentPrimaryValue), - 400: const Color(0xFFC6FF00), - 700: const Color(0xFFAEEA00), + { + 100: Color(0xFFF4FF81), + 200: Color(_limeAccentPrimaryValue), + 400: Color(0xFFC6FF00), + 700: Color(0xFFAEEA00), }, ); static const int _limeAccentPrimaryValue = 0xFFEEFF41; @@ -1367,19 +1367,19 @@ class Colors { /// * [lime] and [amber], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor yellow = const MaterialColor( + static const MaterialColor yellow = MaterialColor( _yellowPrimaryValue, - const { - 50: const Color(0xFFFFFDE7), - 100: const Color(0xFFFFF9C4), - 200: const Color(0xFFFFF59D), - 300: const Color(0xFFFFF176), - 400: const Color(0xFFFFEE58), - 500: const Color(_yellowPrimaryValue), - 600: const Color(0xFFFDD835), - 700: const Color(0xFFFBC02D), - 800: const Color(0xFFF9A825), - 900: const Color(0xFFF57F17), + { + 50: Color(0xFFFFFDE7), + 100: Color(0xFFFFF9C4), + 200: Color(0xFFFFF59D), + 300: Color(0xFFFFF176), + 400: Color(0xFFFFEE58), + 500: Color(_yellowPrimaryValue), + 600: Color(0xFFFDD835), + 700: Color(0xFFFBC02D), + 800: Color(0xFFF9A825), + 900: Color(0xFFF57F17), }, ); static const int _yellowPrimaryValue = 0xFFFFEB3B; @@ -1410,13 +1410,13 @@ class Colors { /// * [limeAccent] and [amberAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor yellowAccent = const MaterialAccentColor( + static const MaterialAccentColor yellowAccent = MaterialAccentColor( _yellowAccentPrimaryValue, - const { - 100: const Color(0xFFFFFF8D), - 200: const Color(_yellowAccentPrimaryValue), - 400: const Color(0xFFFFEA00), - 700: const Color(0xFFFFD600), + { + 100: Color(0xFFFFFF8D), + 200: Color(_yellowAccentPrimaryValue), + 400: Color(0xFFFFEA00), + 700: Color(0xFFFFD600), }, ); static const int _yellowAccentPrimaryValue = 0xFFFFFF00; @@ -1447,19 +1447,19 @@ class Colors { /// * [yellow] and [orange], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor amber = const MaterialColor( + static const MaterialColor amber = MaterialColor( _amberPrimaryValue, - const { - 50: const Color(0xFFFFF8E1), - 100: const Color(0xFFFFECB3), - 200: const Color(0xFFFFE082), - 300: const Color(0xFFFFD54F), - 400: const Color(0xFFFFCA28), - 500: const Color(_amberPrimaryValue), - 600: const Color(0xFFFFB300), - 700: const Color(0xFFFFA000), - 800: const Color(0xFFFF8F00), - 900: const Color(0xFFFF6F00), + { + 50: Color(0xFFFFF8E1), + 100: Color(0xFFFFECB3), + 200: Color(0xFFFFE082), + 300: Color(0xFFFFD54F), + 400: Color(0xFFFFCA28), + 500: Color(_amberPrimaryValue), + 600: Color(0xFFFFB300), + 700: Color(0xFFFFA000), + 800: Color(0xFFFF8F00), + 900: Color(0xFFFF6F00), }, ); static const int _amberPrimaryValue = 0xFFFFC107; @@ -1490,13 +1490,13 @@ class Colors { /// * [yellowAccent] and [orangeAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor amberAccent = const MaterialAccentColor( + static const MaterialAccentColor amberAccent = MaterialAccentColor( _amberAccentPrimaryValue, - const { - 100: const Color(0xFFFFE57F), - 200: const Color(_amberAccentPrimaryValue), - 400: const Color(0xFFFFC400), - 700: const Color(0xFFFFAB00), + { + 100: Color(0xFFFFE57F), + 200: Color(_amberAccentPrimaryValue), + 400: Color(0xFFFFC400), + 700: Color(0xFFFFAB00), }, ); static const int _amberAccentPrimaryValue = 0xFFFFD740; @@ -1529,19 +1529,19 @@ class Colors { /// * [amber], [deepOrange], and [brown], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor orange = const MaterialColor( + static const MaterialColor orange = MaterialColor( _orangePrimaryValue, - const { - 50: const Color(0xFFFFF3E0), - 100: const Color(0xFFFFE0B2), - 200: const Color(0xFFFFCC80), - 300: const Color(0xFFFFB74D), - 400: const Color(0xFFFFA726), - 500: const Color(_orangePrimaryValue), - 600: const Color(0xFFFB8C00), - 700: const Color(0xFFF57C00), - 800: const Color(0xFFEF6C00), - 900: const Color(0xFFE65100), + { + 50: Color(0xFFFFF3E0), + 100: Color(0xFFFFE0B2), + 200: Color(0xFFFFCC80), + 300: Color(0xFFFFB74D), + 400: Color(0xFFFFA726), + 500: Color(_orangePrimaryValue), + 600: Color(0xFFFB8C00), + 700: Color(0xFFF57C00), + 800: Color(0xFFEF6C00), + 900: Color(0xFFE65100), }, ); static const int _orangePrimaryValue = 0xFFFF9800; @@ -1572,13 +1572,13 @@ class Colors { /// * [amberAccent] and [deepOrangeAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor orangeAccent = const MaterialAccentColor( + static const MaterialAccentColor orangeAccent = MaterialAccentColor( _orangeAccentPrimaryValue, - const { - 100: const Color(0xFFFFD180), - 200: const Color(_orangeAccentPrimaryValue), - 400: const Color(0xFFFF9100), - 700: const Color(0xFFFF6D00), + { + 100: Color(0xFFFFD180), + 200: Color(_orangeAccentPrimaryValue), + 400: Color(0xFFFF9100), + 700: Color(0xFFFF6D00), }, ); static const int _orangeAccentPrimaryValue = 0xFFFFAB40; @@ -1611,19 +1611,19 @@ class Colors { /// * [orange], [red], and [brown], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor deepOrange = const MaterialColor( + static const MaterialColor deepOrange = MaterialColor( _deepOrangePrimaryValue, - const { - 50: const Color(0xFFFBE9E7), - 100: const Color(0xFFFFCCBC), - 200: const Color(0xFFFFAB91), - 300: const Color(0xFFFF8A65), - 400: const Color(0xFFFF7043), - 500: const Color(_deepOrangePrimaryValue), - 600: const Color(0xFFF4511E), - 700: const Color(0xFFE64A19), - 800: const Color(0xFFD84315), - 900: const Color(0xFFBF360C), + { + 50: Color(0xFFFBE9E7), + 100: Color(0xFFFFCCBC), + 200: Color(0xFFFFAB91), + 300: Color(0xFFFF8A65), + 400: Color(0xFFFF7043), + 500: Color(_deepOrangePrimaryValue), + 600: Color(0xFFF4511E), + 700: Color(0xFFE64A19), + 800: Color(0xFFD84315), + 900: Color(0xFFBF360C), }, ); static const int _deepOrangePrimaryValue = 0xFFFF5722; @@ -1654,13 +1654,13 @@ class Colors { /// * [orangeAccent] [redAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor deepOrangeAccent = const MaterialAccentColor( + static const MaterialAccentColor deepOrangeAccent = MaterialAccentColor( _deepOrangeAccentPrimaryValue, - const { - 100: const Color(0xFFFF9E80), - 200: const Color(_deepOrangeAccentPrimaryValue), - 400: const Color(0xFFFF3D00), - 700: const Color(0xFFDD2C00), + { + 100: Color(0xFFFF9E80), + 200: Color(_deepOrangeAccentPrimaryValue), + 400: Color(0xFFFF3D00), + 700: Color(0xFFDD2C00), }, ); static const int _deepOrangeAccentPrimaryValue = 0xFFFF6E40; @@ -1689,19 +1689,19 @@ class Colors { /// * [orange] and [blueGrey], vaguely similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor brown = const MaterialColor( + static const MaterialColor brown = MaterialColor( _brownPrimaryValue, - const { - 50: const Color(0xFFEFEBE9), - 100: const Color(0xFFD7CCC8), - 200: const Color(0xFFBCAAA4), - 300: const Color(0xFFA1887F), - 400: const Color(0xFF8D6E63), - 500: const Color(_brownPrimaryValue), - 600: const Color(0xFF6D4C41), - 700: const Color(0xFF5D4037), - 800: const Color(0xFF4E342E), - 900: const Color(0xFF3E2723), + { + 50: Color(0xFFEFEBE9), + 100: Color(0xFFD7CCC8), + 200: Color(0xFFBCAAA4), + 300: Color(0xFFA1887F), + 400: Color(0xFF8D6E63), + 500: Color(_brownPrimaryValue), + 600: Color(0xFF6D4C41), + 700: Color(0xFF5D4037), + 800: Color(0xFF4E342E), + 900: Color(0xFF3E2723), }, ); static const int _brownPrimaryValue = 0xFF795548; @@ -1737,21 +1737,21 @@ class Colors { /// provide a different approach to showing shades of grey. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor grey = const MaterialColor( + static const MaterialColor grey = MaterialColor( _greyPrimaryValue, - const { - 50: const Color(0xFFFAFAFA), - 100: const Color(0xFFF5F5F5), - 200: const Color(0xFFEEEEEE), - 300: const Color(0xFFE0E0E0), - 350: const Color(0xFFD6D6D6), // only for raised button while pressed in light theme - 400: const Color(0xFFBDBDBD), - 500: const Color(_greyPrimaryValue), - 600: const Color(0xFF757575), - 700: const Color(0xFF616161), - 800: const Color(0xFF424242), - 850: const Color(0xFF303030), // only for background color in dark theme - 900: const Color(0xFF212121), + { + 50: Color(0xFFFAFAFA), + 100: Color(0xFFF5F5F5), + 200: Color(0xFFEEEEEE), + 300: Color(0xFFE0E0E0), + 350: Color(0xFFD6D6D6), // only for raised button while pressed in light theme + 400: Color(0xFFBDBDBD), + 500: Color(_greyPrimaryValue), + 600: Color(0xFF757575), + 700: Color(0xFF616161), + 800: Color(0xFF424242), + 850: Color(0xFF303030), // only for background color in dark theme + 900: Color(0xFF212121), }, ); static const int _greyPrimaryValue = 0xFF9E9E9E; @@ -1782,25 +1782,25 @@ class Colors { /// * [grey], [cyan], and [blue], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor blueGrey = const MaterialColor( + static const MaterialColor blueGrey = MaterialColor( _blueGreyPrimaryValue, - const { - 50: const Color(0xFFECEFF1), - 100: const Color(0xFFCFD8DC), - 200: const Color(0xFFB0BEC5), - 300: const Color(0xFF90A4AE), - 400: const Color(0xFF78909C), - 500: const Color(_blueGreyPrimaryValue), - 600: const Color(0xFF546E7A), - 700: const Color(0xFF455A64), - 800: const Color(0xFF37474F), - 900: const Color(0xFF263238), + { + 50: Color(0xFFECEFF1), + 100: Color(0xFFCFD8DC), + 200: Color(0xFFB0BEC5), + 300: Color(0xFF90A4AE), + 400: Color(0xFF78909C), + 500: Color(_blueGreyPrimaryValue), + 600: Color(0xFF546E7A), + 700: Color(0xFF455A64), + 800: Color(0xFF37474F), + 900: Color(0xFF263238), }, ); static const int _blueGreyPrimaryValue = 0xFF607D8B; /// The material design primary color swatches, excluding grey. - static const List primaries = const [ + static const List primaries = [ red, pink, purple, @@ -1825,7 +1825,7 @@ class Colors { ]; /// The material design accent color swatches. - static const List accents = const [ + static const List accents = [ redAccent, pinkAccent, purpleAccent, From 7ce1edf3b38209b5b4cb7fd23923a8e47606b83d Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Mon, 16 Jul 2018 13:30:27 -0700 Subject: [PATCH 30/66] Revert "enable lint unnecessary_const (#19342)" (#19423) This reverts commit db7289f45724807e1e3c74e3fe27c4004b85c940. --- packages/flutter/lib/src/material/colors.dart | 684 +++++++++--------- 1 file changed, 342 insertions(+), 342 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 3c71007b6791..0c2666838f2b 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -192,7 +192,7 @@ class Colors { Colors._(); /// Completely invisible. - static const Color transparent = Color(0x00000000); + static const Color transparent = const Color(0x00000000); /// Completely opaque black. /// @@ -204,7 +204,7 @@ class Colors { /// are variants on this color but with different opacities. /// * [white], a solid white color. /// * [transparent], a fully-transparent color. - static const Color black = Color(0xFF000000); + static const Color black = const Color(0xFF000000); /// Black with 87% opacity. /// @@ -219,7 +219,7 @@ class Colors { /// rather than hard-coding colors in your build methods. /// * [black], [black54], [black45], [black38], [black26], [black12], which /// are variants on this color but with different opacities. - static const Color black87 = Color(0xDD000000); + static const Color black87 = const Color(0xDD000000); /// Black with 54% opacity. /// @@ -235,7 +235,7 @@ class Colors { /// rather than hard-coding colors in your build methods. /// * [black], [black87], [black45], [black38], [black26], [black12], which /// are variants on this color but with different opacities. - static const Color black54 = Color(0x8A000000); + static const Color black54 = const Color(0x8A000000); /// Black with 45% opacity. /// @@ -247,7 +247,7 @@ class Colors { /// /// * [black], [black87], [black54], [black38], [black26], [black12], which /// are variants on this color but with different opacities. - static const Color black45 = Color(0x73000000); + static const Color black45 = const Color(0x73000000); /// Black with 38% opacity. /// @@ -259,7 +259,7 @@ class Colors { /// /// * [black], [black87], [black54], [black45], [black26], [black12], which /// are variants on this color but with different opacities. - static const Color black38 = Color(0x61000000); + static const Color black38 = const Color(0x61000000); /// Black with 26% opacity. /// @@ -274,7 +274,7 @@ class Colors { /// rather than hard-coding colors in your build methods. /// * [black], [black87], [black54], [black45], [black38], [black12], which /// are variants on this color but with different opacities. - static const Color black26 = Color(0x42000000); + static const Color black26 = const Color(0x42000000); /// Black with 12% opacity. /// @@ -286,7 +286,7 @@ class Colors { /// /// * [black], [black87], [black54], [black45], [black38], [black26], which /// are variants on this color but with different opacities. - static const Color black12 = Color(0x1F000000); + static const Color black12 = const Color(0x1F000000); /// Completely opaque white. /// @@ -304,7 +304,7 @@ class Colors { /// but with different opacities. /// * [black], a solid black color. /// * [transparent], a fully-transparent color. - static const Color white = Color(0xFFFFFFFF); + static const Color white = const Color(0xFFFFFFFF); /// White with 70% opacity. /// @@ -319,7 +319,7 @@ class Colors { /// rather than hard-coding colors in your build methods. /// * [white, white30, white12, white10], which are variants on this color /// but with different opacities. - static const Color white70 = Color(0xB3FFFFFF); + static const Color white70 = const Color(0xB3FFFFFF); /// White with 32% opacity. /// @@ -334,7 +334,7 @@ class Colors { /// rather than hard-coding colors in your build methods. /// * [white, white70, white12, white10], which are variants on this color /// but with different opacities. - static const Color white30 = Color(0x4DFFFFFF); + static const Color white30 = const Color(0x4DFFFFFF); /// White with 24% opacity. /// @@ -346,7 +346,7 @@ class Colors { /// /// * [white, white70, white30, white10], which are variants on this color /// but with different opacities. - static const Color white24 = Color(0x3DFFFFFF); + static const Color white24 = const Color(0x3DFFFFFF); /// White with 12% opacity. /// @@ -358,7 +358,7 @@ class Colors { /// /// * [white, white70, white30, white10], which are variants on this color /// but with different opacities. - static const Color white12 = Color(0x1FFFFFFF); + static const Color white12 = const Color(0x1FFFFFFF); /// White with 10% opacity. /// @@ -369,7 +369,7 @@ class Colors { /// * [white, white70, white30, white12], which are variants on this color /// but with different opacities. /// * [transparent], a fully-transparent color, not far from this one. - static const Color white10 = Color(0x1AFFFFFF); + static const Color white10 = const Color(0x1AFFFFFF); /// The red primary color and swatch. /// @@ -397,19 +397,19 @@ class Colors { /// * [deepOrange] and [pink], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor red = MaterialColor( + static const MaterialColor red = const MaterialColor( _redPrimaryValue, - { - 50: Color(0xFFFFEBEE), - 100: Color(0xFFFFCDD2), - 200: Color(0xFFEF9A9A), - 300: Color(0xFFE57373), - 400: Color(0xFFEF5350), - 500: Color(_redPrimaryValue), - 600: Color(0xFFE53935), - 700: Color(0xFFD32F2F), - 800: Color(0xFFC62828), - 900: Color(0xFFB71C1C), + const { + 50: const Color(0xFFFFEBEE), + 100: const Color(0xFFFFCDD2), + 200: const Color(0xFFEF9A9A), + 300: const Color(0xFFE57373), + 400: const Color(0xFFEF5350), + 500: const Color(_redPrimaryValue), + 600: const Color(0xFFE53935), + 700: const Color(0xFFD32F2F), + 800: const Color(0xFFC62828), + 900: const Color(0xFFB71C1C), }, ); static const int _redPrimaryValue = 0xFFF44336; @@ -440,13 +440,13 @@ class Colors { /// * [deepOrangeAccent] and [pinkAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor redAccent = MaterialAccentColor( + static const MaterialAccentColor redAccent = const MaterialAccentColor( _redAccentValue, - { - 100: Color(0xFFFF8A80), - 200: Color(_redAccentValue), - 400: Color(0xFFFF1744), - 700: Color(0xFFD50000), + const { + 100: const Color(0xFFFF8A80), + 200: const Color(_redAccentValue), + 400: const Color(0xFFFF1744), + 700: const Color(0xFFD50000), }, ); static const int _redAccentValue = 0xFFFF5252; @@ -477,19 +477,19 @@ class Colors { /// * [red] and [purple], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor pink = MaterialColor( + static const MaterialColor pink = const MaterialColor( _pinkPrimaryValue, - { - 50: Color(0xFFFCE4EC), - 100: Color(0xFFF8BBD0), - 200: Color(0xFFF48FB1), - 300: Color(0xFFF06292), - 400: Color(0xFFEC407A), - 500: Color(_pinkPrimaryValue), - 600: Color(0xFFD81B60), - 700: Color(0xFFC2185B), - 800: Color(0xFFAD1457), - 900: Color(0xFF880E4F), + const { + 50: const Color(0xFFFCE4EC), + 100: const Color(0xFFF8BBD0), + 200: const Color(0xFFF48FB1), + 300: const Color(0xFFF06292), + 400: const Color(0xFFEC407A), + 500: const Color(_pinkPrimaryValue), + 600: const Color(0xFFD81B60), + 700: const Color(0xFFC2185B), + 800: const Color(0xFFAD1457), + 900: const Color(0xFF880E4F), }, ); static const int _pinkPrimaryValue = 0xFFE91E63; @@ -520,13 +520,13 @@ class Colors { /// * [redAccent] and [purpleAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor pinkAccent = MaterialAccentColor( + static const MaterialAccentColor pinkAccent = const MaterialAccentColor( _pinkAccentPrimaryValue, - { - 100: Color(0xFFFF80AB), - 200: Color(_pinkAccentPrimaryValue), - 400: Color(0xFFF50057), - 700: Color(0xFFC51162), + const { + 100: const Color(0xFFFF80AB), + 200: const Color(_pinkAccentPrimaryValue), + 400: const Color(0xFFF50057), + 700: const Color(0xFFC51162), }, ); static const int _pinkAccentPrimaryValue = 0xFFFF4081; @@ -557,19 +557,19 @@ class Colors { /// * [deepPurple] and [pink], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor purple = MaterialColor( + static const MaterialColor purple = const MaterialColor( _purplePrimaryValue, - { - 50: Color(0xFFF3E5F5), - 100: Color(0xFFE1BEE7), - 200: Color(0xFFCE93D8), - 300: Color(0xFFBA68C8), - 400: Color(0xFFAB47BC), - 500: Color(_purplePrimaryValue), - 600: Color(0xFF8E24AA), - 700: Color(0xFF7B1FA2), - 800: Color(0xFF6A1B9A), - 900: Color(0xFF4A148C), + const { + 50: const Color(0xFFF3E5F5), + 100: const Color(0xFFE1BEE7), + 200: const Color(0xFFCE93D8), + 300: const Color(0xFFBA68C8), + 400: const Color(0xFFAB47BC), + 500: const Color(_purplePrimaryValue), + 600: const Color(0xFF8E24AA), + 700: const Color(0xFF7B1FA2), + 800: const Color(0xFF6A1B9A), + 900: const Color(0xFF4A148C), }, ); static const int _purplePrimaryValue = 0xFF9C27B0; @@ -600,13 +600,13 @@ class Colors { /// * [deepPurpleAccent] and [pinkAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor purpleAccent = MaterialAccentColor( + static const MaterialAccentColor purpleAccent = const MaterialAccentColor( _purpleAccentPrimaryValue, - { - 100: Color(0xFFEA80FC), - 200: Color(_purpleAccentPrimaryValue), - 400: Color(0xFFD500F9), - 700: Color(0xFFAA00FF), + const { + 100: const Color(0xFFEA80FC), + 200: const Color(_purpleAccentPrimaryValue), + 400: const Color(0xFFD500F9), + 700: const Color(0xFFAA00FF), }, ); static const int _purpleAccentPrimaryValue = 0xFFE040FB; @@ -637,19 +637,19 @@ class Colors { /// * [purple] and [indigo], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor deepPurple = MaterialColor( + static const MaterialColor deepPurple = const MaterialColor( _deepPurplePrimaryValue, - { - 50: Color(0xFFEDE7F6), - 100: Color(0xFFD1C4E9), - 200: Color(0xFFB39DDB), - 300: Color(0xFF9575CD), - 400: Color(0xFF7E57C2), - 500: Color(_deepPurplePrimaryValue), - 600: Color(0xFF5E35B1), - 700: Color(0xFF512DA8), - 800: Color(0xFF4527A0), - 900: Color(0xFF311B92), + const { + 50: const Color(0xFFEDE7F6), + 100: const Color(0xFFD1C4E9), + 200: const Color(0xFFB39DDB), + 300: const Color(0xFF9575CD), + 400: const Color(0xFF7E57C2), + 500: const Color(_deepPurplePrimaryValue), + 600: const Color(0xFF5E35B1), + 700: const Color(0xFF512DA8), + 800: const Color(0xFF4527A0), + 900: const Color(0xFF311B92), }, ); static const int _deepPurplePrimaryValue = 0xFF673AB7; @@ -680,13 +680,13 @@ class Colors { /// * [purpleAccent] and [indigoAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor deepPurpleAccent = MaterialAccentColor( + static const MaterialAccentColor deepPurpleAccent = const MaterialAccentColor( _deepPurpleAccentPrimaryValue, - { - 100: Color(0xFFB388FF), - 200: Color(_deepPurpleAccentPrimaryValue), - 400: Color(0xFF651FFF), - 700: Color(0xFF6200EA), + const { + 100: const Color(0xFFB388FF), + 200: const Color(_deepPurpleAccentPrimaryValue), + 400: const Color(0xFF651FFF), + 700: const Color(0xFF6200EA), }, ); static const int _deepPurpleAccentPrimaryValue = 0xFF7C4DFF; @@ -717,19 +717,19 @@ class Colors { /// * [blue] and [deepPurple], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor indigo = MaterialColor( + static const MaterialColor indigo = const MaterialColor( _indigoPrimaryValue, - { - 50: Color(0xFFE8EAF6), - 100: Color(0xFFC5CAE9), - 200: Color(0xFF9FA8DA), - 300: Color(0xFF7986CB), - 400: Color(0xFF5C6BC0), - 500: Color(_indigoPrimaryValue), - 600: Color(0xFF3949AB), - 700: Color(0xFF303F9F), - 800: Color(0xFF283593), - 900: Color(0xFF1A237E), + const { + 50: const Color(0xFFE8EAF6), + 100: const Color(0xFFC5CAE9), + 200: const Color(0xFF9FA8DA), + 300: const Color(0xFF7986CB), + 400: const Color(0xFF5C6BC0), + 500: const Color(_indigoPrimaryValue), + 600: const Color(0xFF3949AB), + 700: const Color(0xFF303F9F), + 800: const Color(0xFF283593), + 900: const Color(0xFF1A237E), }, ); static const int _indigoPrimaryValue = 0xFF3F51B5; @@ -760,13 +760,13 @@ class Colors { /// * [blueAccent] and [deepPurpleAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor indigoAccent = MaterialAccentColor( + static const MaterialAccentColor indigoAccent = const MaterialAccentColor( _indigoAccentPrimaryValue, - { - 100: Color(0xFF8C9EFF), - 200: Color(_indigoAccentPrimaryValue), - 400: Color(0xFF3D5AFE), - 700: Color(0xFF304FFE), + const { + 100: const Color(0xFF8C9EFF), + 200: const Color(_indigoAccentPrimaryValue), + 400: const Color(0xFF3D5AFE), + 700: const Color(0xFF304FFE), }, ); static const int _indigoAccentPrimaryValue = 0xFF536DFE; @@ -799,19 +799,19 @@ class Colors { /// * [indigo], [lightBlue], and [blueGrey], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor blue = MaterialColor( + static const MaterialColor blue = const MaterialColor( _bluePrimaryValue, - { - 50: Color(0xFFE3F2FD), - 100: Color(0xFFBBDEFB), - 200: Color(0xFF90CAF9), - 300: Color(0xFF64B5F6), - 400: Color(0xFF42A5F5), - 500: Color(_bluePrimaryValue), - 600: Color(0xFF1E88E5), - 700: Color(0xFF1976D2), - 800: Color(0xFF1565C0), - 900: Color(0xFF0D47A1), + const { + 50: const Color(0xFFE3F2FD), + 100: const Color(0xFFBBDEFB), + 200: const Color(0xFF90CAF9), + 300: const Color(0xFF64B5F6), + 400: const Color(0xFF42A5F5), + 500: const Color(_bluePrimaryValue), + 600: const Color(0xFF1E88E5), + 700: const Color(0xFF1976D2), + 800: const Color(0xFF1565C0), + 900: const Color(0xFF0D47A1), }, ); static const int _bluePrimaryValue = 0xFF2196F3; @@ -842,13 +842,13 @@ class Colors { /// * [indigoAccent] and [lightBlueAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor blueAccent = MaterialAccentColor( + static const MaterialAccentColor blueAccent = const MaterialAccentColor( _blueAccentPrimaryValue, - { - 100: Color(0xFF82B1FF), - 200: Color(_blueAccentPrimaryValue), - 400: Color(0xFF2979FF), - 700: Color(0xFF2962FF), + const { + 100: const Color(0xFF82B1FF), + 200: const Color(_blueAccentPrimaryValue), + 400: const Color(0xFF2979FF), + 700: const Color(0xFF2962FF), }, ); static const int _blueAccentPrimaryValue = 0xFF448AFF; @@ -879,19 +879,19 @@ class Colors { /// * [blue] and [cyan], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor lightBlue = MaterialColor( + static const MaterialColor lightBlue = const MaterialColor( _lightBluePrimaryValue, - { - 50: Color(0xFFE1F5FE), - 100: Color(0xFFB3E5FC), - 200: Color(0xFF81D4FA), - 300: Color(0xFF4FC3F7), - 400: Color(0xFF29B6F6), - 500: Color(_lightBluePrimaryValue), - 600: Color(0xFF039BE5), - 700: Color(0xFF0288D1), - 800: Color(0xFF0277BD), - 900: Color(0xFF01579B), + const { + 50: const Color(0xFFE1F5FE), + 100: const Color(0xFFB3E5FC), + 200: const Color(0xFF81D4FA), + 300: const Color(0xFF4FC3F7), + 400: const Color(0xFF29B6F6), + 500: const Color(_lightBluePrimaryValue), + 600: const Color(0xFF039BE5), + 700: const Color(0xFF0288D1), + 800: const Color(0xFF0277BD), + 900: const Color(0xFF01579B), }, ); static const int _lightBluePrimaryValue = 0xFF03A9F4; @@ -922,13 +922,13 @@ class Colors { /// * [blueAccent] and [cyanAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor lightBlueAccent = MaterialAccentColor( + static const MaterialAccentColor lightBlueAccent = const MaterialAccentColor( _lightBlueAccentPrimaryValue, - { - 100: Color(0xFF80D8FF), - 200: Color(_lightBlueAccentPrimaryValue), - 400: Color(0xFF00B0FF), - 700: Color(0xFF0091EA), + const { + 100: const Color(0xFF80D8FF), + 200: const Color(_lightBlueAccentPrimaryValue), + 400: const Color(0xFF00B0FF), + 700: const Color(0xFF0091EA), }, ); static const int _lightBlueAccentPrimaryValue = 0xFF40C4FF; @@ -961,19 +961,19 @@ class Colors { /// * [lightBlue], [teal], and [blueGrey], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor cyan = MaterialColor( + static const MaterialColor cyan = const MaterialColor( _cyanPrimaryValue, - { - 50: Color(0xFFE0F7FA), - 100: Color(0xFFB2EBF2), - 200: Color(0xFF80DEEA), - 300: Color(0xFF4DD0E1), - 400: Color(0xFF26C6DA), - 500: Color(_cyanPrimaryValue), - 600: Color(0xFF00ACC1), - 700: Color(0xFF0097A7), - 800: Color(0xFF00838F), - 900: Color(0xFF006064), + const { + 50: const Color(0xFFE0F7FA), + 100: const Color(0xFFB2EBF2), + 200: const Color(0xFF80DEEA), + 300: const Color(0xFF4DD0E1), + 400: const Color(0xFF26C6DA), + 500: const Color(_cyanPrimaryValue), + 600: const Color(0xFF00ACC1), + 700: const Color(0xFF0097A7), + 800: const Color(0xFF00838F), + 900: const Color(0xFF006064), }, ); static const int _cyanPrimaryValue = 0xFF00BCD4; @@ -1004,13 +1004,13 @@ class Colors { /// * [lightBlueAccent] and [tealAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor cyanAccent = MaterialAccentColor( + static const MaterialAccentColor cyanAccent = const MaterialAccentColor( _cyanAccentPrimaryValue, - { - 100: Color(0xFF84FFFF), - 200: Color(_cyanAccentPrimaryValue), - 400: Color(0xFF00E5FF), - 700: Color(0xFF00B8D4), + const { + 100: const Color(0xFF84FFFF), + 200: const Color(_cyanAccentPrimaryValue), + 400: const Color(0xFF00E5FF), + 700: const Color(0xFF00B8D4), }, ); static const int _cyanAccentPrimaryValue = 0xFF18FFFF; @@ -1041,19 +1041,19 @@ class Colors { /// * [green] and [cyan], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor teal = MaterialColor( + static const MaterialColor teal = const MaterialColor( _tealPrimaryValue, - { - 50: Color(0xFFE0F2F1), - 100: Color(0xFFB2DFDB), - 200: Color(0xFF80CBC4), - 300: Color(0xFF4DB6AC), - 400: Color(0xFF26A69A), - 500: Color(_tealPrimaryValue), - 600: Color(0xFF00897B), - 700: Color(0xFF00796B), - 800: Color(0xFF00695C), - 900: Color(0xFF004D40), + const { + 50: const Color(0xFFE0F2F1), + 100: const Color(0xFFB2DFDB), + 200: const Color(0xFF80CBC4), + 300: const Color(0xFF4DB6AC), + 400: const Color(0xFF26A69A), + 500: const Color(_tealPrimaryValue), + 600: const Color(0xFF00897B), + 700: const Color(0xFF00796B), + 800: const Color(0xFF00695C), + 900: const Color(0xFF004D40), }, ); static const int _tealPrimaryValue = 0xFF009688; @@ -1084,13 +1084,13 @@ class Colors { /// * [greenAccent] and [cyanAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor tealAccent = MaterialAccentColor( + static const MaterialAccentColor tealAccent = const MaterialAccentColor( _tealAccentPrimaryValue, - { - 100: Color(0xFFA7FFEB), - 200: Color(_tealAccentPrimaryValue), - 400: Color(0xFF1DE9B6), - 700: Color(0xFF00BFA5), + const { + 100: const Color(0xFFA7FFEB), + 200: const Color(_tealAccentPrimaryValue), + 400: const Color(0xFF1DE9B6), + 700: const Color(0xFF00BFA5), }, ); static const int _tealAccentPrimaryValue = 0xFF64FFDA; @@ -1124,19 +1124,19 @@ class Colors { /// * [teal], [lightGreen], and [lime], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor green = MaterialColor( + static const MaterialColor green = const MaterialColor( _greenPrimaryValue, - { - 50: Color(0xFFE8F5E9), - 100: Color(0xFFC8E6C9), - 200: Color(0xFFA5D6A7), - 300: Color(0xFF81C784), - 400: Color(0xFF66BB6A), - 500: Color(_greenPrimaryValue), - 600: Color(0xFF43A047), - 700: Color(0xFF388E3C), - 800: Color(0xFF2E7D32), - 900: Color(0xFF1B5E20), + const { + 50: const Color(0xFFE8F5E9), + 100: const Color(0xFFC8E6C9), + 200: const Color(0xFFA5D6A7), + 300: const Color(0xFF81C784), + 400: const Color(0xFF66BB6A), + 500: const Color(_greenPrimaryValue), + 600: const Color(0xFF43A047), + 700: const Color(0xFF388E3C), + 800: const Color(0xFF2E7D32), + 900: const Color(0xFF1B5E20), }, ); static const int _greenPrimaryValue = 0xFF4CAF50; @@ -1170,13 +1170,13 @@ class Colors { /// * [tealAccent], [lightGreenAccent], and [limeAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor greenAccent = MaterialAccentColor( + static const MaterialAccentColor greenAccent = const MaterialAccentColor( _greenAccentPrimaryValue, - { - 100: Color(0xFFB9F6CA), - 200: Color(_greenAccentPrimaryValue), - 400: Color(0xFF00E676), - 700: Color(0xFF00C853), + const { + 100: const Color(0xFFB9F6CA), + 200: const Color(_greenAccentPrimaryValue), + 400: const Color(0xFF00E676), + 700: const Color(0xFF00C853), }, ); static const int _greenAccentPrimaryValue = 0xFF69F0AE; @@ -1207,19 +1207,19 @@ class Colors { /// * [green] and [lime], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor lightGreen = MaterialColor( + static const MaterialColor lightGreen = const MaterialColor( _lightGreenPrimaryValue, - { - 50: Color(0xFFF1F8E9), - 100: Color(0xFFDCEDC8), - 200: Color(0xFFC5E1A5), - 300: Color(0xFFAED581), - 400: Color(0xFF9CCC65), - 500: Color(_lightGreenPrimaryValue), - 600: Color(0xFF7CB342), - 700: Color(0xFF689F38), - 800: Color(0xFF558B2F), - 900: Color(0xFF33691E), + const { + 50: const Color(0xFFF1F8E9), + 100: const Color(0xFFDCEDC8), + 200: const Color(0xFFC5E1A5), + 300: const Color(0xFFAED581), + 400: const Color(0xFF9CCC65), + 500: const Color(_lightGreenPrimaryValue), + 600: const Color(0xFF7CB342), + 700: const Color(0xFF689F38), + 800: const Color(0xFF558B2F), + 900: const Color(0xFF33691E), }, ); static const int _lightGreenPrimaryValue = 0xFF8BC34A; @@ -1250,13 +1250,13 @@ class Colors { /// * [greenAccent] and [limeAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor lightGreenAccent = MaterialAccentColor( + static const MaterialAccentColor lightGreenAccent = const MaterialAccentColor( _lightGreenAccentPrimaryValue, - { - 100: Color(0xFFCCFF90), - 200: Color(_lightGreenAccentPrimaryValue), - 400: Color(0xFF76FF03), - 700: Color(0xFF64DD17), + const { + 100: const Color(0xFFCCFF90), + 200: const Color(_lightGreenAccentPrimaryValue), + 400: const Color(0xFF76FF03), + 700: const Color(0xFF64DD17), }, ); static const int _lightGreenAccentPrimaryValue = 0xFFB2FF59; @@ -1287,19 +1287,19 @@ class Colors { /// * [lightGreen] and [yellow], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor lime = MaterialColor( + static const MaterialColor lime = const MaterialColor( _limePrimaryValue, - { - 50: Color(0xFFF9FBE7), - 100: Color(0xFFF0F4C3), - 200: Color(0xFFE6EE9C), - 300: Color(0xFFDCE775), - 400: Color(0xFFD4E157), - 500: Color(_limePrimaryValue), - 600: Color(0xFFC0CA33), - 700: Color(0xFFAFB42B), - 800: Color(0xFF9E9D24), - 900: Color(0xFF827717), + const { + 50: const Color(0xFFF9FBE7), + 100: const Color(0xFFF0F4C3), + 200: const Color(0xFFE6EE9C), + 300: const Color(0xFFDCE775), + 400: const Color(0xFFD4E157), + 500: const Color(_limePrimaryValue), + 600: const Color(0xFFC0CA33), + 700: const Color(0xFFAFB42B), + 800: const Color(0xFF9E9D24), + 900: const Color(0xFF827717), }, ); static const int _limePrimaryValue = 0xFFCDDC39; @@ -1330,13 +1330,13 @@ class Colors { /// * [lightGreenAccent] and [yellowAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor limeAccent = MaterialAccentColor( + static const MaterialAccentColor limeAccent = const MaterialAccentColor( _limeAccentPrimaryValue, - { - 100: Color(0xFFF4FF81), - 200: Color(_limeAccentPrimaryValue), - 400: Color(0xFFC6FF00), - 700: Color(0xFFAEEA00), + const { + 100: const Color(0xFFF4FF81), + 200: const Color(_limeAccentPrimaryValue), + 400: const Color(0xFFC6FF00), + 700: const Color(0xFFAEEA00), }, ); static const int _limeAccentPrimaryValue = 0xFFEEFF41; @@ -1367,19 +1367,19 @@ class Colors { /// * [lime] and [amber], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor yellow = MaterialColor( + static const MaterialColor yellow = const MaterialColor( _yellowPrimaryValue, - { - 50: Color(0xFFFFFDE7), - 100: Color(0xFFFFF9C4), - 200: Color(0xFFFFF59D), - 300: Color(0xFFFFF176), - 400: Color(0xFFFFEE58), - 500: Color(_yellowPrimaryValue), - 600: Color(0xFFFDD835), - 700: Color(0xFFFBC02D), - 800: Color(0xFFF9A825), - 900: Color(0xFFF57F17), + const { + 50: const Color(0xFFFFFDE7), + 100: const Color(0xFFFFF9C4), + 200: const Color(0xFFFFF59D), + 300: const Color(0xFFFFF176), + 400: const Color(0xFFFFEE58), + 500: const Color(_yellowPrimaryValue), + 600: const Color(0xFFFDD835), + 700: const Color(0xFFFBC02D), + 800: const Color(0xFFF9A825), + 900: const Color(0xFFF57F17), }, ); static const int _yellowPrimaryValue = 0xFFFFEB3B; @@ -1410,13 +1410,13 @@ class Colors { /// * [limeAccent] and [amberAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor yellowAccent = MaterialAccentColor( + static const MaterialAccentColor yellowAccent = const MaterialAccentColor( _yellowAccentPrimaryValue, - { - 100: Color(0xFFFFFF8D), - 200: Color(_yellowAccentPrimaryValue), - 400: Color(0xFFFFEA00), - 700: Color(0xFFFFD600), + const { + 100: const Color(0xFFFFFF8D), + 200: const Color(_yellowAccentPrimaryValue), + 400: const Color(0xFFFFEA00), + 700: const Color(0xFFFFD600), }, ); static const int _yellowAccentPrimaryValue = 0xFFFFFF00; @@ -1447,19 +1447,19 @@ class Colors { /// * [yellow] and [orange], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor amber = MaterialColor( + static const MaterialColor amber = const MaterialColor( _amberPrimaryValue, - { - 50: Color(0xFFFFF8E1), - 100: Color(0xFFFFECB3), - 200: Color(0xFFFFE082), - 300: Color(0xFFFFD54F), - 400: Color(0xFFFFCA28), - 500: Color(_amberPrimaryValue), - 600: Color(0xFFFFB300), - 700: Color(0xFFFFA000), - 800: Color(0xFFFF8F00), - 900: Color(0xFFFF6F00), + const { + 50: const Color(0xFFFFF8E1), + 100: const Color(0xFFFFECB3), + 200: const Color(0xFFFFE082), + 300: const Color(0xFFFFD54F), + 400: const Color(0xFFFFCA28), + 500: const Color(_amberPrimaryValue), + 600: const Color(0xFFFFB300), + 700: const Color(0xFFFFA000), + 800: const Color(0xFFFF8F00), + 900: const Color(0xFFFF6F00), }, ); static const int _amberPrimaryValue = 0xFFFFC107; @@ -1490,13 +1490,13 @@ class Colors { /// * [yellowAccent] and [orangeAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor amberAccent = MaterialAccentColor( + static const MaterialAccentColor amberAccent = const MaterialAccentColor( _amberAccentPrimaryValue, - { - 100: Color(0xFFFFE57F), - 200: Color(_amberAccentPrimaryValue), - 400: Color(0xFFFFC400), - 700: Color(0xFFFFAB00), + const { + 100: const Color(0xFFFFE57F), + 200: const Color(_amberAccentPrimaryValue), + 400: const Color(0xFFFFC400), + 700: const Color(0xFFFFAB00), }, ); static const int _amberAccentPrimaryValue = 0xFFFFD740; @@ -1529,19 +1529,19 @@ class Colors { /// * [amber], [deepOrange], and [brown], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor orange = MaterialColor( + static const MaterialColor orange = const MaterialColor( _orangePrimaryValue, - { - 50: Color(0xFFFFF3E0), - 100: Color(0xFFFFE0B2), - 200: Color(0xFFFFCC80), - 300: Color(0xFFFFB74D), - 400: Color(0xFFFFA726), - 500: Color(_orangePrimaryValue), - 600: Color(0xFFFB8C00), - 700: Color(0xFFF57C00), - 800: Color(0xFFEF6C00), - 900: Color(0xFFE65100), + const { + 50: const Color(0xFFFFF3E0), + 100: const Color(0xFFFFE0B2), + 200: const Color(0xFFFFCC80), + 300: const Color(0xFFFFB74D), + 400: const Color(0xFFFFA726), + 500: const Color(_orangePrimaryValue), + 600: const Color(0xFFFB8C00), + 700: const Color(0xFFF57C00), + 800: const Color(0xFFEF6C00), + 900: const Color(0xFFE65100), }, ); static const int _orangePrimaryValue = 0xFFFF9800; @@ -1572,13 +1572,13 @@ class Colors { /// * [amberAccent] and [deepOrangeAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor orangeAccent = MaterialAccentColor( + static const MaterialAccentColor orangeAccent = const MaterialAccentColor( _orangeAccentPrimaryValue, - { - 100: Color(0xFFFFD180), - 200: Color(_orangeAccentPrimaryValue), - 400: Color(0xFFFF9100), - 700: Color(0xFFFF6D00), + const { + 100: const Color(0xFFFFD180), + 200: const Color(_orangeAccentPrimaryValue), + 400: const Color(0xFFFF9100), + 700: const Color(0xFFFF6D00), }, ); static const int _orangeAccentPrimaryValue = 0xFFFFAB40; @@ -1611,19 +1611,19 @@ class Colors { /// * [orange], [red], and [brown], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor deepOrange = MaterialColor( + static const MaterialColor deepOrange = const MaterialColor( _deepOrangePrimaryValue, - { - 50: Color(0xFFFBE9E7), - 100: Color(0xFFFFCCBC), - 200: Color(0xFFFFAB91), - 300: Color(0xFFFF8A65), - 400: Color(0xFFFF7043), - 500: Color(_deepOrangePrimaryValue), - 600: Color(0xFFF4511E), - 700: Color(0xFFE64A19), - 800: Color(0xFFD84315), - 900: Color(0xFFBF360C), + const { + 50: const Color(0xFFFBE9E7), + 100: const Color(0xFFFFCCBC), + 200: const Color(0xFFFFAB91), + 300: const Color(0xFFFF8A65), + 400: const Color(0xFFFF7043), + 500: const Color(_deepOrangePrimaryValue), + 600: const Color(0xFFF4511E), + 700: const Color(0xFFE64A19), + 800: const Color(0xFFD84315), + 900: const Color(0xFFBF360C), }, ); static const int _deepOrangePrimaryValue = 0xFFFF5722; @@ -1654,13 +1654,13 @@ class Colors { /// * [orangeAccent] [redAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor deepOrangeAccent = MaterialAccentColor( + static const MaterialAccentColor deepOrangeAccent = const MaterialAccentColor( _deepOrangeAccentPrimaryValue, - { - 100: Color(0xFFFF9E80), - 200: Color(_deepOrangeAccentPrimaryValue), - 400: Color(0xFFFF3D00), - 700: Color(0xFFDD2C00), + const { + 100: const Color(0xFFFF9E80), + 200: const Color(_deepOrangeAccentPrimaryValue), + 400: const Color(0xFFFF3D00), + 700: const Color(0xFFDD2C00), }, ); static const int _deepOrangeAccentPrimaryValue = 0xFFFF6E40; @@ -1689,19 +1689,19 @@ class Colors { /// * [orange] and [blueGrey], vaguely similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor brown = MaterialColor( + static const MaterialColor brown = const MaterialColor( _brownPrimaryValue, - { - 50: Color(0xFFEFEBE9), - 100: Color(0xFFD7CCC8), - 200: Color(0xFFBCAAA4), - 300: Color(0xFFA1887F), - 400: Color(0xFF8D6E63), - 500: Color(_brownPrimaryValue), - 600: Color(0xFF6D4C41), - 700: Color(0xFF5D4037), - 800: Color(0xFF4E342E), - 900: Color(0xFF3E2723), + const { + 50: const Color(0xFFEFEBE9), + 100: const Color(0xFFD7CCC8), + 200: const Color(0xFFBCAAA4), + 300: const Color(0xFFA1887F), + 400: const Color(0xFF8D6E63), + 500: const Color(_brownPrimaryValue), + 600: const Color(0xFF6D4C41), + 700: const Color(0xFF5D4037), + 800: const Color(0xFF4E342E), + 900: const Color(0xFF3E2723), }, ); static const int _brownPrimaryValue = 0xFF795548; @@ -1737,21 +1737,21 @@ class Colors { /// provide a different approach to showing shades of grey. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor grey = MaterialColor( + static const MaterialColor grey = const MaterialColor( _greyPrimaryValue, - { - 50: Color(0xFFFAFAFA), - 100: Color(0xFFF5F5F5), - 200: Color(0xFFEEEEEE), - 300: Color(0xFFE0E0E0), - 350: Color(0xFFD6D6D6), // only for raised button while pressed in light theme - 400: Color(0xFFBDBDBD), - 500: Color(_greyPrimaryValue), - 600: Color(0xFF757575), - 700: Color(0xFF616161), - 800: Color(0xFF424242), - 850: Color(0xFF303030), // only for background color in dark theme - 900: Color(0xFF212121), + const { + 50: const Color(0xFFFAFAFA), + 100: const Color(0xFFF5F5F5), + 200: const Color(0xFFEEEEEE), + 300: const Color(0xFFE0E0E0), + 350: const Color(0xFFD6D6D6), // only for raised button while pressed in light theme + 400: const Color(0xFFBDBDBD), + 500: const Color(_greyPrimaryValue), + 600: const Color(0xFF757575), + 700: const Color(0xFF616161), + 800: const Color(0xFF424242), + 850: const Color(0xFF303030), // only for background color in dark theme + 900: const Color(0xFF212121), }, ); static const int _greyPrimaryValue = 0xFF9E9E9E; @@ -1782,25 +1782,25 @@ class Colors { /// * [grey], [cyan], and [blue], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor blueGrey = MaterialColor( + static const MaterialColor blueGrey = const MaterialColor( _blueGreyPrimaryValue, - { - 50: Color(0xFFECEFF1), - 100: Color(0xFFCFD8DC), - 200: Color(0xFFB0BEC5), - 300: Color(0xFF90A4AE), - 400: Color(0xFF78909C), - 500: Color(_blueGreyPrimaryValue), - 600: Color(0xFF546E7A), - 700: Color(0xFF455A64), - 800: Color(0xFF37474F), - 900: Color(0xFF263238), + const { + 50: const Color(0xFFECEFF1), + 100: const Color(0xFFCFD8DC), + 200: const Color(0xFFB0BEC5), + 300: const Color(0xFF90A4AE), + 400: const Color(0xFF78909C), + 500: const Color(_blueGreyPrimaryValue), + 600: const Color(0xFF546E7A), + 700: const Color(0xFF455A64), + 800: const Color(0xFF37474F), + 900: const Color(0xFF263238), }, ); static const int _blueGreyPrimaryValue = 0xFF607D8B; /// The material design primary color swatches, excluding grey. - static const List primaries = [ + static const List primaries = const [ red, pink, purple, @@ -1825,7 +1825,7 @@ class Colors { ]; /// The material design accent color swatches. - static const List accents = [ + static const List accents = const [ redAccent, pinkAccent, purpleAccent, From ba3b62929e36678e3bfa7a62156009dfd6dd9f2e Mon Sep 17 00:00:00 2001 From: Alexandre Ardhuin Date: Mon, 23 Jul 2018 08:31:48 +0200 Subject: [PATCH 31/66] re-enable lint unnecessary_const (#19592) * re-enable lint unnecessary_const * remove trailling whitespaces * remove unnecessary const (after merge) --- packages/flutter/lib/src/material/colors.dart | 684 +++++++++--------- 1 file changed, 342 insertions(+), 342 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 0c2666838f2b..3c71007b6791 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -192,7 +192,7 @@ class Colors { Colors._(); /// Completely invisible. - static const Color transparent = const Color(0x00000000); + static const Color transparent = Color(0x00000000); /// Completely opaque black. /// @@ -204,7 +204,7 @@ class Colors { /// are variants on this color but with different opacities. /// * [white], a solid white color. /// * [transparent], a fully-transparent color. - static const Color black = const Color(0xFF000000); + static const Color black = Color(0xFF000000); /// Black with 87% opacity. /// @@ -219,7 +219,7 @@ class Colors { /// rather than hard-coding colors in your build methods. /// * [black], [black54], [black45], [black38], [black26], [black12], which /// are variants on this color but with different opacities. - static const Color black87 = const Color(0xDD000000); + static const Color black87 = Color(0xDD000000); /// Black with 54% opacity. /// @@ -235,7 +235,7 @@ class Colors { /// rather than hard-coding colors in your build methods. /// * [black], [black87], [black45], [black38], [black26], [black12], which /// are variants on this color but with different opacities. - static const Color black54 = const Color(0x8A000000); + static const Color black54 = Color(0x8A000000); /// Black with 45% opacity. /// @@ -247,7 +247,7 @@ class Colors { /// /// * [black], [black87], [black54], [black38], [black26], [black12], which /// are variants on this color but with different opacities. - static const Color black45 = const Color(0x73000000); + static const Color black45 = Color(0x73000000); /// Black with 38% opacity. /// @@ -259,7 +259,7 @@ class Colors { /// /// * [black], [black87], [black54], [black45], [black26], [black12], which /// are variants on this color but with different opacities. - static const Color black38 = const Color(0x61000000); + static const Color black38 = Color(0x61000000); /// Black with 26% opacity. /// @@ -274,7 +274,7 @@ class Colors { /// rather than hard-coding colors in your build methods. /// * [black], [black87], [black54], [black45], [black38], [black12], which /// are variants on this color but with different opacities. - static const Color black26 = const Color(0x42000000); + static const Color black26 = Color(0x42000000); /// Black with 12% opacity. /// @@ -286,7 +286,7 @@ class Colors { /// /// * [black], [black87], [black54], [black45], [black38], [black26], which /// are variants on this color but with different opacities. - static const Color black12 = const Color(0x1F000000); + static const Color black12 = Color(0x1F000000); /// Completely opaque white. /// @@ -304,7 +304,7 @@ class Colors { /// but with different opacities. /// * [black], a solid black color. /// * [transparent], a fully-transparent color. - static const Color white = const Color(0xFFFFFFFF); + static const Color white = Color(0xFFFFFFFF); /// White with 70% opacity. /// @@ -319,7 +319,7 @@ class Colors { /// rather than hard-coding colors in your build methods. /// * [white, white30, white12, white10], which are variants on this color /// but with different opacities. - static const Color white70 = const Color(0xB3FFFFFF); + static const Color white70 = Color(0xB3FFFFFF); /// White with 32% opacity. /// @@ -334,7 +334,7 @@ class Colors { /// rather than hard-coding colors in your build methods. /// * [white, white70, white12, white10], which are variants on this color /// but with different opacities. - static const Color white30 = const Color(0x4DFFFFFF); + static const Color white30 = Color(0x4DFFFFFF); /// White with 24% opacity. /// @@ -346,7 +346,7 @@ class Colors { /// /// * [white, white70, white30, white10], which are variants on this color /// but with different opacities. - static const Color white24 = const Color(0x3DFFFFFF); + static const Color white24 = Color(0x3DFFFFFF); /// White with 12% opacity. /// @@ -358,7 +358,7 @@ class Colors { /// /// * [white, white70, white30, white10], which are variants on this color /// but with different opacities. - static const Color white12 = const Color(0x1FFFFFFF); + static const Color white12 = Color(0x1FFFFFFF); /// White with 10% opacity. /// @@ -369,7 +369,7 @@ class Colors { /// * [white, white70, white30, white12], which are variants on this color /// but with different opacities. /// * [transparent], a fully-transparent color, not far from this one. - static const Color white10 = const Color(0x1AFFFFFF); + static const Color white10 = Color(0x1AFFFFFF); /// The red primary color and swatch. /// @@ -397,19 +397,19 @@ class Colors { /// * [deepOrange] and [pink], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor red = const MaterialColor( + static const MaterialColor red = MaterialColor( _redPrimaryValue, - const { - 50: const Color(0xFFFFEBEE), - 100: const Color(0xFFFFCDD2), - 200: const Color(0xFFEF9A9A), - 300: const Color(0xFFE57373), - 400: const Color(0xFFEF5350), - 500: const Color(_redPrimaryValue), - 600: const Color(0xFFE53935), - 700: const Color(0xFFD32F2F), - 800: const Color(0xFFC62828), - 900: const Color(0xFFB71C1C), + { + 50: Color(0xFFFFEBEE), + 100: Color(0xFFFFCDD2), + 200: Color(0xFFEF9A9A), + 300: Color(0xFFE57373), + 400: Color(0xFFEF5350), + 500: Color(_redPrimaryValue), + 600: Color(0xFFE53935), + 700: Color(0xFFD32F2F), + 800: Color(0xFFC62828), + 900: Color(0xFFB71C1C), }, ); static const int _redPrimaryValue = 0xFFF44336; @@ -440,13 +440,13 @@ class Colors { /// * [deepOrangeAccent] and [pinkAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor redAccent = const MaterialAccentColor( + static const MaterialAccentColor redAccent = MaterialAccentColor( _redAccentValue, - const { - 100: const Color(0xFFFF8A80), - 200: const Color(_redAccentValue), - 400: const Color(0xFFFF1744), - 700: const Color(0xFFD50000), + { + 100: Color(0xFFFF8A80), + 200: Color(_redAccentValue), + 400: Color(0xFFFF1744), + 700: Color(0xFFD50000), }, ); static const int _redAccentValue = 0xFFFF5252; @@ -477,19 +477,19 @@ class Colors { /// * [red] and [purple], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor pink = const MaterialColor( + static const MaterialColor pink = MaterialColor( _pinkPrimaryValue, - const { - 50: const Color(0xFFFCE4EC), - 100: const Color(0xFFF8BBD0), - 200: const Color(0xFFF48FB1), - 300: const Color(0xFFF06292), - 400: const Color(0xFFEC407A), - 500: const Color(_pinkPrimaryValue), - 600: const Color(0xFFD81B60), - 700: const Color(0xFFC2185B), - 800: const Color(0xFFAD1457), - 900: const Color(0xFF880E4F), + { + 50: Color(0xFFFCE4EC), + 100: Color(0xFFF8BBD0), + 200: Color(0xFFF48FB1), + 300: Color(0xFFF06292), + 400: Color(0xFFEC407A), + 500: Color(_pinkPrimaryValue), + 600: Color(0xFFD81B60), + 700: Color(0xFFC2185B), + 800: Color(0xFFAD1457), + 900: Color(0xFF880E4F), }, ); static const int _pinkPrimaryValue = 0xFFE91E63; @@ -520,13 +520,13 @@ class Colors { /// * [redAccent] and [purpleAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor pinkAccent = const MaterialAccentColor( + static const MaterialAccentColor pinkAccent = MaterialAccentColor( _pinkAccentPrimaryValue, - const { - 100: const Color(0xFFFF80AB), - 200: const Color(_pinkAccentPrimaryValue), - 400: const Color(0xFFF50057), - 700: const Color(0xFFC51162), + { + 100: Color(0xFFFF80AB), + 200: Color(_pinkAccentPrimaryValue), + 400: Color(0xFFF50057), + 700: Color(0xFFC51162), }, ); static const int _pinkAccentPrimaryValue = 0xFFFF4081; @@ -557,19 +557,19 @@ class Colors { /// * [deepPurple] and [pink], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor purple = const MaterialColor( + static const MaterialColor purple = MaterialColor( _purplePrimaryValue, - const { - 50: const Color(0xFFF3E5F5), - 100: const Color(0xFFE1BEE7), - 200: const Color(0xFFCE93D8), - 300: const Color(0xFFBA68C8), - 400: const Color(0xFFAB47BC), - 500: const Color(_purplePrimaryValue), - 600: const Color(0xFF8E24AA), - 700: const Color(0xFF7B1FA2), - 800: const Color(0xFF6A1B9A), - 900: const Color(0xFF4A148C), + { + 50: Color(0xFFF3E5F5), + 100: Color(0xFFE1BEE7), + 200: Color(0xFFCE93D8), + 300: Color(0xFFBA68C8), + 400: Color(0xFFAB47BC), + 500: Color(_purplePrimaryValue), + 600: Color(0xFF8E24AA), + 700: Color(0xFF7B1FA2), + 800: Color(0xFF6A1B9A), + 900: Color(0xFF4A148C), }, ); static const int _purplePrimaryValue = 0xFF9C27B0; @@ -600,13 +600,13 @@ class Colors { /// * [deepPurpleAccent] and [pinkAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor purpleAccent = const MaterialAccentColor( + static const MaterialAccentColor purpleAccent = MaterialAccentColor( _purpleAccentPrimaryValue, - const { - 100: const Color(0xFFEA80FC), - 200: const Color(_purpleAccentPrimaryValue), - 400: const Color(0xFFD500F9), - 700: const Color(0xFFAA00FF), + { + 100: Color(0xFFEA80FC), + 200: Color(_purpleAccentPrimaryValue), + 400: Color(0xFFD500F9), + 700: Color(0xFFAA00FF), }, ); static const int _purpleAccentPrimaryValue = 0xFFE040FB; @@ -637,19 +637,19 @@ class Colors { /// * [purple] and [indigo], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor deepPurple = const MaterialColor( + static const MaterialColor deepPurple = MaterialColor( _deepPurplePrimaryValue, - const { - 50: const Color(0xFFEDE7F6), - 100: const Color(0xFFD1C4E9), - 200: const Color(0xFFB39DDB), - 300: const Color(0xFF9575CD), - 400: const Color(0xFF7E57C2), - 500: const Color(_deepPurplePrimaryValue), - 600: const Color(0xFF5E35B1), - 700: const Color(0xFF512DA8), - 800: const Color(0xFF4527A0), - 900: const Color(0xFF311B92), + { + 50: Color(0xFFEDE7F6), + 100: Color(0xFFD1C4E9), + 200: Color(0xFFB39DDB), + 300: Color(0xFF9575CD), + 400: Color(0xFF7E57C2), + 500: Color(_deepPurplePrimaryValue), + 600: Color(0xFF5E35B1), + 700: Color(0xFF512DA8), + 800: Color(0xFF4527A0), + 900: Color(0xFF311B92), }, ); static const int _deepPurplePrimaryValue = 0xFF673AB7; @@ -680,13 +680,13 @@ class Colors { /// * [purpleAccent] and [indigoAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor deepPurpleAccent = const MaterialAccentColor( + static const MaterialAccentColor deepPurpleAccent = MaterialAccentColor( _deepPurpleAccentPrimaryValue, - const { - 100: const Color(0xFFB388FF), - 200: const Color(_deepPurpleAccentPrimaryValue), - 400: const Color(0xFF651FFF), - 700: const Color(0xFF6200EA), + { + 100: Color(0xFFB388FF), + 200: Color(_deepPurpleAccentPrimaryValue), + 400: Color(0xFF651FFF), + 700: Color(0xFF6200EA), }, ); static const int _deepPurpleAccentPrimaryValue = 0xFF7C4DFF; @@ -717,19 +717,19 @@ class Colors { /// * [blue] and [deepPurple], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor indigo = const MaterialColor( + static const MaterialColor indigo = MaterialColor( _indigoPrimaryValue, - const { - 50: const Color(0xFFE8EAF6), - 100: const Color(0xFFC5CAE9), - 200: const Color(0xFF9FA8DA), - 300: const Color(0xFF7986CB), - 400: const Color(0xFF5C6BC0), - 500: const Color(_indigoPrimaryValue), - 600: const Color(0xFF3949AB), - 700: const Color(0xFF303F9F), - 800: const Color(0xFF283593), - 900: const Color(0xFF1A237E), + { + 50: Color(0xFFE8EAF6), + 100: Color(0xFFC5CAE9), + 200: Color(0xFF9FA8DA), + 300: Color(0xFF7986CB), + 400: Color(0xFF5C6BC0), + 500: Color(_indigoPrimaryValue), + 600: Color(0xFF3949AB), + 700: Color(0xFF303F9F), + 800: Color(0xFF283593), + 900: Color(0xFF1A237E), }, ); static const int _indigoPrimaryValue = 0xFF3F51B5; @@ -760,13 +760,13 @@ class Colors { /// * [blueAccent] and [deepPurpleAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor indigoAccent = const MaterialAccentColor( + static const MaterialAccentColor indigoAccent = MaterialAccentColor( _indigoAccentPrimaryValue, - const { - 100: const Color(0xFF8C9EFF), - 200: const Color(_indigoAccentPrimaryValue), - 400: const Color(0xFF3D5AFE), - 700: const Color(0xFF304FFE), + { + 100: Color(0xFF8C9EFF), + 200: Color(_indigoAccentPrimaryValue), + 400: Color(0xFF3D5AFE), + 700: Color(0xFF304FFE), }, ); static const int _indigoAccentPrimaryValue = 0xFF536DFE; @@ -799,19 +799,19 @@ class Colors { /// * [indigo], [lightBlue], and [blueGrey], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor blue = const MaterialColor( + static const MaterialColor blue = MaterialColor( _bluePrimaryValue, - const { - 50: const Color(0xFFE3F2FD), - 100: const Color(0xFFBBDEFB), - 200: const Color(0xFF90CAF9), - 300: const Color(0xFF64B5F6), - 400: const Color(0xFF42A5F5), - 500: const Color(_bluePrimaryValue), - 600: const Color(0xFF1E88E5), - 700: const Color(0xFF1976D2), - 800: const Color(0xFF1565C0), - 900: const Color(0xFF0D47A1), + { + 50: Color(0xFFE3F2FD), + 100: Color(0xFFBBDEFB), + 200: Color(0xFF90CAF9), + 300: Color(0xFF64B5F6), + 400: Color(0xFF42A5F5), + 500: Color(_bluePrimaryValue), + 600: Color(0xFF1E88E5), + 700: Color(0xFF1976D2), + 800: Color(0xFF1565C0), + 900: Color(0xFF0D47A1), }, ); static const int _bluePrimaryValue = 0xFF2196F3; @@ -842,13 +842,13 @@ class Colors { /// * [indigoAccent] and [lightBlueAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor blueAccent = const MaterialAccentColor( + static const MaterialAccentColor blueAccent = MaterialAccentColor( _blueAccentPrimaryValue, - const { - 100: const Color(0xFF82B1FF), - 200: const Color(_blueAccentPrimaryValue), - 400: const Color(0xFF2979FF), - 700: const Color(0xFF2962FF), + { + 100: Color(0xFF82B1FF), + 200: Color(_blueAccentPrimaryValue), + 400: Color(0xFF2979FF), + 700: Color(0xFF2962FF), }, ); static const int _blueAccentPrimaryValue = 0xFF448AFF; @@ -879,19 +879,19 @@ class Colors { /// * [blue] and [cyan], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor lightBlue = const MaterialColor( + static const MaterialColor lightBlue = MaterialColor( _lightBluePrimaryValue, - const { - 50: const Color(0xFFE1F5FE), - 100: const Color(0xFFB3E5FC), - 200: const Color(0xFF81D4FA), - 300: const Color(0xFF4FC3F7), - 400: const Color(0xFF29B6F6), - 500: const Color(_lightBluePrimaryValue), - 600: const Color(0xFF039BE5), - 700: const Color(0xFF0288D1), - 800: const Color(0xFF0277BD), - 900: const Color(0xFF01579B), + { + 50: Color(0xFFE1F5FE), + 100: Color(0xFFB3E5FC), + 200: Color(0xFF81D4FA), + 300: Color(0xFF4FC3F7), + 400: Color(0xFF29B6F6), + 500: Color(_lightBluePrimaryValue), + 600: Color(0xFF039BE5), + 700: Color(0xFF0288D1), + 800: Color(0xFF0277BD), + 900: Color(0xFF01579B), }, ); static const int _lightBluePrimaryValue = 0xFF03A9F4; @@ -922,13 +922,13 @@ class Colors { /// * [blueAccent] and [cyanAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor lightBlueAccent = const MaterialAccentColor( + static const MaterialAccentColor lightBlueAccent = MaterialAccentColor( _lightBlueAccentPrimaryValue, - const { - 100: const Color(0xFF80D8FF), - 200: const Color(_lightBlueAccentPrimaryValue), - 400: const Color(0xFF00B0FF), - 700: const Color(0xFF0091EA), + { + 100: Color(0xFF80D8FF), + 200: Color(_lightBlueAccentPrimaryValue), + 400: Color(0xFF00B0FF), + 700: Color(0xFF0091EA), }, ); static const int _lightBlueAccentPrimaryValue = 0xFF40C4FF; @@ -961,19 +961,19 @@ class Colors { /// * [lightBlue], [teal], and [blueGrey], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor cyan = const MaterialColor( + static const MaterialColor cyan = MaterialColor( _cyanPrimaryValue, - const { - 50: const Color(0xFFE0F7FA), - 100: const Color(0xFFB2EBF2), - 200: const Color(0xFF80DEEA), - 300: const Color(0xFF4DD0E1), - 400: const Color(0xFF26C6DA), - 500: const Color(_cyanPrimaryValue), - 600: const Color(0xFF00ACC1), - 700: const Color(0xFF0097A7), - 800: const Color(0xFF00838F), - 900: const Color(0xFF006064), + { + 50: Color(0xFFE0F7FA), + 100: Color(0xFFB2EBF2), + 200: Color(0xFF80DEEA), + 300: Color(0xFF4DD0E1), + 400: Color(0xFF26C6DA), + 500: Color(_cyanPrimaryValue), + 600: Color(0xFF00ACC1), + 700: Color(0xFF0097A7), + 800: Color(0xFF00838F), + 900: Color(0xFF006064), }, ); static const int _cyanPrimaryValue = 0xFF00BCD4; @@ -1004,13 +1004,13 @@ class Colors { /// * [lightBlueAccent] and [tealAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor cyanAccent = const MaterialAccentColor( + static const MaterialAccentColor cyanAccent = MaterialAccentColor( _cyanAccentPrimaryValue, - const { - 100: const Color(0xFF84FFFF), - 200: const Color(_cyanAccentPrimaryValue), - 400: const Color(0xFF00E5FF), - 700: const Color(0xFF00B8D4), + { + 100: Color(0xFF84FFFF), + 200: Color(_cyanAccentPrimaryValue), + 400: Color(0xFF00E5FF), + 700: Color(0xFF00B8D4), }, ); static const int _cyanAccentPrimaryValue = 0xFF18FFFF; @@ -1041,19 +1041,19 @@ class Colors { /// * [green] and [cyan], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor teal = const MaterialColor( + static const MaterialColor teal = MaterialColor( _tealPrimaryValue, - const { - 50: const Color(0xFFE0F2F1), - 100: const Color(0xFFB2DFDB), - 200: const Color(0xFF80CBC4), - 300: const Color(0xFF4DB6AC), - 400: const Color(0xFF26A69A), - 500: const Color(_tealPrimaryValue), - 600: const Color(0xFF00897B), - 700: const Color(0xFF00796B), - 800: const Color(0xFF00695C), - 900: const Color(0xFF004D40), + { + 50: Color(0xFFE0F2F1), + 100: Color(0xFFB2DFDB), + 200: Color(0xFF80CBC4), + 300: Color(0xFF4DB6AC), + 400: Color(0xFF26A69A), + 500: Color(_tealPrimaryValue), + 600: Color(0xFF00897B), + 700: Color(0xFF00796B), + 800: Color(0xFF00695C), + 900: Color(0xFF004D40), }, ); static const int _tealPrimaryValue = 0xFF009688; @@ -1084,13 +1084,13 @@ class Colors { /// * [greenAccent] and [cyanAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor tealAccent = const MaterialAccentColor( + static const MaterialAccentColor tealAccent = MaterialAccentColor( _tealAccentPrimaryValue, - const { - 100: const Color(0xFFA7FFEB), - 200: const Color(_tealAccentPrimaryValue), - 400: const Color(0xFF1DE9B6), - 700: const Color(0xFF00BFA5), + { + 100: Color(0xFFA7FFEB), + 200: Color(_tealAccentPrimaryValue), + 400: Color(0xFF1DE9B6), + 700: Color(0xFF00BFA5), }, ); static const int _tealAccentPrimaryValue = 0xFF64FFDA; @@ -1124,19 +1124,19 @@ class Colors { /// * [teal], [lightGreen], and [lime], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor green = const MaterialColor( + static const MaterialColor green = MaterialColor( _greenPrimaryValue, - const { - 50: const Color(0xFFE8F5E9), - 100: const Color(0xFFC8E6C9), - 200: const Color(0xFFA5D6A7), - 300: const Color(0xFF81C784), - 400: const Color(0xFF66BB6A), - 500: const Color(_greenPrimaryValue), - 600: const Color(0xFF43A047), - 700: const Color(0xFF388E3C), - 800: const Color(0xFF2E7D32), - 900: const Color(0xFF1B5E20), + { + 50: Color(0xFFE8F5E9), + 100: Color(0xFFC8E6C9), + 200: Color(0xFFA5D6A7), + 300: Color(0xFF81C784), + 400: Color(0xFF66BB6A), + 500: Color(_greenPrimaryValue), + 600: Color(0xFF43A047), + 700: Color(0xFF388E3C), + 800: Color(0xFF2E7D32), + 900: Color(0xFF1B5E20), }, ); static const int _greenPrimaryValue = 0xFF4CAF50; @@ -1170,13 +1170,13 @@ class Colors { /// * [tealAccent], [lightGreenAccent], and [limeAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor greenAccent = const MaterialAccentColor( + static const MaterialAccentColor greenAccent = MaterialAccentColor( _greenAccentPrimaryValue, - const { - 100: const Color(0xFFB9F6CA), - 200: const Color(_greenAccentPrimaryValue), - 400: const Color(0xFF00E676), - 700: const Color(0xFF00C853), + { + 100: Color(0xFFB9F6CA), + 200: Color(_greenAccentPrimaryValue), + 400: Color(0xFF00E676), + 700: Color(0xFF00C853), }, ); static const int _greenAccentPrimaryValue = 0xFF69F0AE; @@ -1207,19 +1207,19 @@ class Colors { /// * [green] and [lime], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor lightGreen = const MaterialColor( + static const MaterialColor lightGreen = MaterialColor( _lightGreenPrimaryValue, - const { - 50: const Color(0xFFF1F8E9), - 100: const Color(0xFFDCEDC8), - 200: const Color(0xFFC5E1A5), - 300: const Color(0xFFAED581), - 400: const Color(0xFF9CCC65), - 500: const Color(_lightGreenPrimaryValue), - 600: const Color(0xFF7CB342), - 700: const Color(0xFF689F38), - 800: const Color(0xFF558B2F), - 900: const Color(0xFF33691E), + { + 50: Color(0xFFF1F8E9), + 100: Color(0xFFDCEDC8), + 200: Color(0xFFC5E1A5), + 300: Color(0xFFAED581), + 400: Color(0xFF9CCC65), + 500: Color(_lightGreenPrimaryValue), + 600: Color(0xFF7CB342), + 700: Color(0xFF689F38), + 800: Color(0xFF558B2F), + 900: Color(0xFF33691E), }, ); static const int _lightGreenPrimaryValue = 0xFF8BC34A; @@ -1250,13 +1250,13 @@ class Colors { /// * [greenAccent] and [limeAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor lightGreenAccent = const MaterialAccentColor( + static const MaterialAccentColor lightGreenAccent = MaterialAccentColor( _lightGreenAccentPrimaryValue, - const { - 100: const Color(0xFFCCFF90), - 200: const Color(_lightGreenAccentPrimaryValue), - 400: const Color(0xFF76FF03), - 700: const Color(0xFF64DD17), + { + 100: Color(0xFFCCFF90), + 200: Color(_lightGreenAccentPrimaryValue), + 400: Color(0xFF76FF03), + 700: Color(0xFF64DD17), }, ); static const int _lightGreenAccentPrimaryValue = 0xFFB2FF59; @@ -1287,19 +1287,19 @@ class Colors { /// * [lightGreen] and [yellow], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor lime = const MaterialColor( + static const MaterialColor lime = MaterialColor( _limePrimaryValue, - const { - 50: const Color(0xFFF9FBE7), - 100: const Color(0xFFF0F4C3), - 200: const Color(0xFFE6EE9C), - 300: const Color(0xFFDCE775), - 400: const Color(0xFFD4E157), - 500: const Color(_limePrimaryValue), - 600: const Color(0xFFC0CA33), - 700: const Color(0xFFAFB42B), - 800: const Color(0xFF9E9D24), - 900: const Color(0xFF827717), + { + 50: Color(0xFFF9FBE7), + 100: Color(0xFFF0F4C3), + 200: Color(0xFFE6EE9C), + 300: Color(0xFFDCE775), + 400: Color(0xFFD4E157), + 500: Color(_limePrimaryValue), + 600: Color(0xFFC0CA33), + 700: Color(0xFFAFB42B), + 800: Color(0xFF9E9D24), + 900: Color(0xFF827717), }, ); static const int _limePrimaryValue = 0xFFCDDC39; @@ -1330,13 +1330,13 @@ class Colors { /// * [lightGreenAccent] and [yellowAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor limeAccent = const MaterialAccentColor( + static const MaterialAccentColor limeAccent = MaterialAccentColor( _limeAccentPrimaryValue, - const { - 100: const Color(0xFFF4FF81), - 200: const Color(_limeAccentPrimaryValue), - 400: const Color(0xFFC6FF00), - 700: const Color(0xFFAEEA00), + { + 100: Color(0xFFF4FF81), + 200: Color(_limeAccentPrimaryValue), + 400: Color(0xFFC6FF00), + 700: Color(0xFFAEEA00), }, ); static const int _limeAccentPrimaryValue = 0xFFEEFF41; @@ -1367,19 +1367,19 @@ class Colors { /// * [lime] and [amber], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor yellow = const MaterialColor( + static const MaterialColor yellow = MaterialColor( _yellowPrimaryValue, - const { - 50: const Color(0xFFFFFDE7), - 100: const Color(0xFFFFF9C4), - 200: const Color(0xFFFFF59D), - 300: const Color(0xFFFFF176), - 400: const Color(0xFFFFEE58), - 500: const Color(_yellowPrimaryValue), - 600: const Color(0xFFFDD835), - 700: const Color(0xFFFBC02D), - 800: const Color(0xFFF9A825), - 900: const Color(0xFFF57F17), + { + 50: Color(0xFFFFFDE7), + 100: Color(0xFFFFF9C4), + 200: Color(0xFFFFF59D), + 300: Color(0xFFFFF176), + 400: Color(0xFFFFEE58), + 500: Color(_yellowPrimaryValue), + 600: Color(0xFFFDD835), + 700: Color(0xFFFBC02D), + 800: Color(0xFFF9A825), + 900: Color(0xFFF57F17), }, ); static const int _yellowPrimaryValue = 0xFFFFEB3B; @@ -1410,13 +1410,13 @@ class Colors { /// * [limeAccent] and [amberAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor yellowAccent = const MaterialAccentColor( + static const MaterialAccentColor yellowAccent = MaterialAccentColor( _yellowAccentPrimaryValue, - const { - 100: const Color(0xFFFFFF8D), - 200: const Color(_yellowAccentPrimaryValue), - 400: const Color(0xFFFFEA00), - 700: const Color(0xFFFFD600), + { + 100: Color(0xFFFFFF8D), + 200: Color(_yellowAccentPrimaryValue), + 400: Color(0xFFFFEA00), + 700: Color(0xFFFFD600), }, ); static const int _yellowAccentPrimaryValue = 0xFFFFFF00; @@ -1447,19 +1447,19 @@ class Colors { /// * [yellow] and [orange], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor amber = const MaterialColor( + static const MaterialColor amber = MaterialColor( _amberPrimaryValue, - const { - 50: const Color(0xFFFFF8E1), - 100: const Color(0xFFFFECB3), - 200: const Color(0xFFFFE082), - 300: const Color(0xFFFFD54F), - 400: const Color(0xFFFFCA28), - 500: const Color(_amberPrimaryValue), - 600: const Color(0xFFFFB300), - 700: const Color(0xFFFFA000), - 800: const Color(0xFFFF8F00), - 900: const Color(0xFFFF6F00), + { + 50: Color(0xFFFFF8E1), + 100: Color(0xFFFFECB3), + 200: Color(0xFFFFE082), + 300: Color(0xFFFFD54F), + 400: Color(0xFFFFCA28), + 500: Color(_amberPrimaryValue), + 600: Color(0xFFFFB300), + 700: Color(0xFFFFA000), + 800: Color(0xFFFF8F00), + 900: Color(0xFFFF6F00), }, ); static const int _amberPrimaryValue = 0xFFFFC107; @@ -1490,13 +1490,13 @@ class Colors { /// * [yellowAccent] and [orangeAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor amberAccent = const MaterialAccentColor( + static const MaterialAccentColor amberAccent = MaterialAccentColor( _amberAccentPrimaryValue, - const { - 100: const Color(0xFFFFE57F), - 200: const Color(_amberAccentPrimaryValue), - 400: const Color(0xFFFFC400), - 700: const Color(0xFFFFAB00), + { + 100: Color(0xFFFFE57F), + 200: Color(_amberAccentPrimaryValue), + 400: Color(0xFFFFC400), + 700: Color(0xFFFFAB00), }, ); static const int _amberAccentPrimaryValue = 0xFFFFD740; @@ -1529,19 +1529,19 @@ class Colors { /// * [amber], [deepOrange], and [brown], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor orange = const MaterialColor( + static const MaterialColor orange = MaterialColor( _orangePrimaryValue, - const { - 50: const Color(0xFFFFF3E0), - 100: const Color(0xFFFFE0B2), - 200: const Color(0xFFFFCC80), - 300: const Color(0xFFFFB74D), - 400: const Color(0xFFFFA726), - 500: const Color(_orangePrimaryValue), - 600: const Color(0xFFFB8C00), - 700: const Color(0xFFF57C00), - 800: const Color(0xFFEF6C00), - 900: const Color(0xFFE65100), + { + 50: Color(0xFFFFF3E0), + 100: Color(0xFFFFE0B2), + 200: Color(0xFFFFCC80), + 300: Color(0xFFFFB74D), + 400: Color(0xFFFFA726), + 500: Color(_orangePrimaryValue), + 600: Color(0xFFFB8C00), + 700: Color(0xFFF57C00), + 800: Color(0xFFEF6C00), + 900: Color(0xFFE65100), }, ); static const int _orangePrimaryValue = 0xFFFF9800; @@ -1572,13 +1572,13 @@ class Colors { /// * [amberAccent] and [deepOrangeAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor orangeAccent = const MaterialAccentColor( + static const MaterialAccentColor orangeAccent = MaterialAccentColor( _orangeAccentPrimaryValue, - const { - 100: const Color(0xFFFFD180), - 200: const Color(_orangeAccentPrimaryValue), - 400: const Color(0xFFFF9100), - 700: const Color(0xFFFF6D00), + { + 100: Color(0xFFFFD180), + 200: Color(_orangeAccentPrimaryValue), + 400: Color(0xFFFF9100), + 700: Color(0xFFFF6D00), }, ); static const int _orangeAccentPrimaryValue = 0xFFFFAB40; @@ -1611,19 +1611,19 @@ class Colors { /// * [orange], [red], and [brown], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor deepOrange = const MaterialColor( + static const MaterialColor deepOrange = MaterialColor( _deepOrangePrimaryValue, - const { - 50: const Color(0xFFFBE9E7), - 100: const Color(0xFFFFCCBC), - 200: const Color(0xFFFFAB91), - 300: const Color(0xFFFF8A65), - 400: const Color(0xFFFF7043), - 500: const Color(_deepOrangePrimaryValue), - 600: const Color(0xFFF4511E), - 700: const Color(0xFFE64A19), - 800: const Color(0xFFD84315), - 900: const Color(0xFFBF360C), + { + 50: Color(0xFFFBE9E7), + 100: Color(0xFFFFCCBC), + 200: Color(0xFFFFAB91), + 300: Color(0xFFFF8A65), + 400: Color(0xFFFF7043), + 500: Color(_deepOrangePrimaryValue), + 600: Color(0xFFF4511E), + 700: Color(0xFFE64A19), + 800: Color(0xFFD84315), + 900: Color(0xFFBF360C), }, ); static const int _deepOrangePrimaryValue = 0xFFFF5722; @@ -1654,13 +1654,13 @@ class Colors { /// * [orangeAccent] [redAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor deepOrangeAccent = const MaterialAccentColor( + static const MaterialAccentColor deepOrangeAccent = MaterialAccentColor( _deepOrangeAccentPrimaryValue, - const { - 100: const Color(0xFFFF9E80), - 200: const Color(_deepOrangeAccentPrimaryValue), - 400: const Color(0xFFFF3D00), - 700: const Color(0xFFDD2C00), + { + 100: Color(0xFFFF9E80), + 200: Color(_deepOrangeAccentPrimaryValue), + 400: Color(0xFFFF3D00), + 700: Color(0xFFDD2C00), }, ); static const int _deepOrangeAccentPrimaryValue = 0xFFFF6E40; @@ -1689,19 +1689,19 @@ class Colors { /// * [orange] and [blueGrey], vaguely similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor brown = const MaterialColor( + static const MaterialColor brown = MaterialColor( _brownPrimaryValue, - const { - 50: const Color(0xFFEFEBE9), - 100: const Color(0xFFD7CCC8), - 200: const Color(0xFFBCAAA4), - 300: const Color(0xFFA1887F), - 400: const Color(0xFF8D6E63), - 500: const Color(_brownPrimaryValue), - 600: const Color(0xFF6D4C41), - 700: const Color(0xFF5D4037), - 800: const Color(0xFF4E342E), - 900: const Color(0xFF3E2723), + { + 50: Color(0xFFEFEBE9), + 100: Color(0xFFD7CCC8), + 200: Color(0xFFBCAAA4), + 300: Color(0xFFA1887F), + 400: Color(0xFF8D6E63), + 500: Color(_brownPrimaryValue), + 600: Color(0xFF6D4C41), + 700: Color(0xFF5D4037), + 800: Color(0xFF4E342E), + 900: Color(0xFF3E2723), }, ); static const int _brownPrimaryValue = 0xFF795548; @@ -1737,21 +1737,21 @@ class Colors { /// provide a different approach to showing shades of grey. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor grey = const MaterialColor( + static const MaterialColor grey = MaterialColor( _greyPrimaryValue, - const { - 50: const Color(0xFFFAFAFA), - 100: const Color(0xFFF5F5F5), - 200: const Color(0xFFEEEEEE), - 300: const Color(0xFFE0E0E0), - 350: const Color(0xFFD6D6D6), // only for raised button while pressed in light theme - 400: const Color(0xFFBDBDBD), - 500: const Color(_greyPrimaryValue), - 600: const Color(0xFF757575), - 700: const Color(0xFF616161), - 800: const Color(0xFF424242), - 850: const Color(0xFF303030), // only for background color in dark theme - 900: const Color(0xFF212121), + { + 50: Color(0xFFFAFAFA), + 100: Color(0xFFF5F5F5), + 200: Color(0xFFEEEEEE), + 300: Color(0xFFE0E0E0), + 350: Color(0xFFD6D6D6), // only for raised button while pressed in light theme + 400: Color(0xFFBDBDBD), + 500: Color(_greyPrimaryValue), + 600: Color(0xFF757575), + 700: Color(0xFF616161), + 800: Color(0xFF424242), + 850: Color(0xFF303030), // only for background color in dark theme + 900: Color(0xFF212121), }, ); static const int _greyPrimaryValue = 0xFF9E9E9E; @@ -1782,25 +1782,25 @@ class Colors { /// * [grey], [cyan], and [blue], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor blueGrey = const MaterialColor( + static const MaterialColor blueGrey = MaterialColor( _blueGreyPrimaryValue, - const { - 50: const Color(0xFFECEFF1), - 100: const Color(0xFFCFD8DC), - 200: const Color(0xFFB0BEC5), - 300: const Color(0xFF90A4AE), - 400: const Color(0xFF78909C), - 500: const Color(_blueGreyPrimaryValue), - 600: const Color(0xFF546E7A), - 700: const Color(0xFF455A64), - 800: const Color(0xFF37474F), - 900: const Color(0xFF263238), + { + 50: Color(0xFFECEFF1), + 100: Color(0xFFCFD8DC), + 200: Color(0xFFB0BEC5), + 300: Color(0xFF90A4AE), + 400: Color(0xFF78909C), + 500: Color(_blueGreyPrimaryValue), + 600: Color(0xFF546E7A), + 700: Color(0xFF455A64), + 800: Color(0xFF37474F), + 900: Color(0xFF263238), }, ); static const int _blueGreyPrimaryValue = 0xFF607D8B; /// The material design primary color swatches, excluding grey. - static const List primaries = const [ + static const List primaries = [ red, pink, purple, @@ -1825,7 +1825,7 @@ class Colors { ]; /// The material design accent color swatches. - static const List accents = const [ + static const List accents = [ redAccent, pinkAccent, purpleAccent, From 854b0fd3b23611e89f852b6711e8f8ee0241f8d7 Mon Sep 17 00:00:00 2001 From: Todd Volkert Date: Fri, 27 Jul 2018 08:44:39 -0700 Subject: [PATCH 32/66] Revert flutter/flutter#19592 (#19861) It was causing problems rolling Flutter into Fuchsia --- packages/flutter/lib/src/material/colors.dart | 684 +++++++++--------- 1 file changed, 342 insertions(+), 342 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 3c71007b6791..0c2666838f2b 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -192,7 +192,7 @@ class Colors { Colors._(); /// Completely invisible. - static const Color transparent = Color(0x00000000); + static const Color transparent = const Color(0x00000000); /// Completely opaque black. /// @@ -204,7 +204,7 @@ class Colors { /// are variants on this color but with different opacities. /// * [white], a solid white color. /// * [transparent], a fully-transparent color. - static const Color black = Color(0xFF000000); + static const Color black = const Color(0xFF000000); /// Black with 87% opacity. /// @@ -219,7 +219,7 @@ class Colors { /// rather than hard-coding colors in your build methods. /// * [black], [black54], [black45], [black38], [black26], [black12], which /// are variants on this color but with different opacities. - static const Color black87 = Color(0xDD000000); + static const Color black87 = const Color(0xDD000000); /// Black with 54% opacity. /// @@ -235,7 +235,7 @@ class Colors { /// rather than hard-coding colors in your build methods. /// * [black], [black87], [black45], [black38], [black26], [black12], which /// are variants on this color but with different opacities. - static const Color black54 = Color(0x8A000000); + static const Color black54 = const Color(0x8A000000); /// Black with 45% opacity. /// @@ -247,7 +247,7 @@ class Colors { /// /// * [black], [black87], [black54], [black38], [black26], [black12], which /// are variants on this color but with different opacities. - static const Color black45 = Color(0x73000000); + static const Color black45 = const Color(0x73000000); /// Black with 38% opacity. /// @@ -259,7 +259,7 @@ class Colors { /// /// * [black], [black87], [black54], [black45], [black26], [black12], which /// are variants on this color but with different opacities. - static const Color black38 = Color(0x61000000); + static const Color black38 = const Color(0x61000000); /// Black with 26% opacity. /// @@ -274,7 +274,7 @@ class Colors { /// rather than hard-coding colors in your build methods. /// * [black], [black87], [black54], [black45], [black38], [black12], which /// are variants on this color but with different opacities. - static const Color black26 = Color(0x42000000); + static const Color black26 = const Color(0x42000000); /// Black with 12% opacity. /// @@ -286,7 +286,7 @@ class Colors { /// /// * [black], [black87], [black54], [black45], [black38], [black26], which /// are variants on this color but with different opacities. - static const Color black12 = Color(0x1F000000); + static const Color black12 = const Color(0x1F000000); /// Completely opaque white. /// @@ -304,7 +304,7 @@ class Colors { /// but with different opacities. /// * [black], a solid black color. /// * [transparent], a fully-transparent color. - static const Color white = Color(0xFFFFFFFF); + static const Color white = const Color(0xFFFFFFFF); /// White with 70% opacity. /// @@ -319,7 +319,7 @@ class Colors { /// rather than hard-coding colors in your build methods. /// * [white, white30, white12, white10], which are variants on this color /// but with different opacities. - static const Color white70 = Color(0xB3FFFFFF); + static const Color white70 = const Color(0xB3FFFFFF); /// White with 32% opacity. /// @@ -334,7 +334,7 @@ class Colors { /// rather than hard-coding colors in your build methods. /// * [white, white70, white12, white10], which are variants on this color /// but with different opacities. - static const Color white30 = Color(0x4DFFFFFF); + static const Color white30 = const Color(0x4DFFFFFF); /// White with 24% opacity. /// @@ -346,7 +346,7 @@ class Colors { /// /// * [white, white70, white30, white10], which are variants on this color /// but with different opacities. - static const Color white24 = Color(0x3DFFFFFF); + static const Color white24 = const Color(0x3DFFFFFF); /// White with 12% opacity. /// @@ -358,7 +358,7 @@ class Colors { /// /// * [white, white70, white30, white10], which are variants on this color /// but with different opacities. - static const Color white12 = Color(0x1FFFFFFF); + static const Color white12 = const Color(0x1FFFFFFF); /// White with 10% opacity. /// @@ -369,7 +369,7 @@ class Colors { /// * [white, white70, white30, white12], which are variants on this color /// but with different opacities. /// * [transparent], a fully-transparent color, not far from this one. - static const Color white10 = Color(0x1AFFFFFF); + static const Color white10 = const Color(0x1AFFFFFF); /// The red primary color and swatch. /// @@ -397,19 +397,19 @@ class Colors { /// * [deepOrange] and [pink], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor red = MaterialColor( + static const MaterialColor red = const MaterialColor( _redPrimaryValue, - { - 50: Color(0xFFFFEBEE), - 100: Color(0xFFFFCDD2), - 200: Color(0xFFEF9A9A), - 300: Color(0xFFE57373), - 400: Color(0xFFEF5350), - 500: Color(_redPrimaryValue), - 600: Color(0xFFE53935), - 700: Color(0xFFD32F2F), - 800: Color(0xFFC62828), - 900: Color(0xFFB71C1C), + const { + 50: const Color(0xFFFFEBEE), + 100: const Color(0xFFFFCDD2), + 200: const Color(0xFFEF9A9A), + 300: const Color(0xFFE57373), + 400: const Color(0xFFEF5350), + 500: const Color(_redPrimaryValue), + 600: const Color(0xFFE53935), + 700: const Color(0xFFD32F2F), + 800: const Color(0xFFC62828), + 900: const Color(0xFFB71C1C), }, ); static const int _redPrimaryValue = 0xFFF44336; @@ -440,13 +440,13 @@ class Colors { /// * [deepOrangeAccent] and [pinkAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor redAccent = MaterialAccentColor( + static const MaterialAccentColor redAccent = const MaterialAccentColor( _redAccentValue, - { - 100: Color(0xFFFF8A80), - 200: Color(_redAccentValue), - 400: Color(0xFFFF1744), - 700: Color(0xFFD50000), + const { + 100: const Color(0xFFFF8A80), + 200: const Color(_redAccentValue), + 400: const Color(0xFFFF1744), + 700: const Color(0xFFD50000), }, ); static const int _redAccentValue = 0xFFFF5252; @@ -477,19 +477,19 @@ class Colors { /// * [red] and [purple], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor pink = MaterialColor( + static const MaterialColor pink = const MaterialColor( _pinkPrimaryValue, - { - 50: Color(0xFFFCE4EC), - 100: Color(0xFFF8BBD0), - 200: Color(0xFFF48FB1), - 300: Color(0xFFF06292), - 400: Color(0xFFEC407A), - 500: Color(_pinkPrimaryValue), - 600: Color(0xFFD81B60), - 700: Color(0xFFC2185B), - 800: Color(0xFFAD1457), - 900: Color(0xFF880E4F), + const { + 50: const Color(0xFFFCE4EC), + 100: const Color(0xFFF8BBD0), + 200: const Color(0xFFF48FB1), + 300: const Color(0xFFF06292), + 400: const Color(0xFFEC407A), + 500: const Color(_pinkPrimaryValue), + 600: const Color(0xFFD81B60), + 700: const Color(0xFFC2185B), + 800: const Color(0xFFAD1457), + 900: const Color(0xFF880E4F), }, ); static const int _pinkPrimaryValue = 0xFFE91E63; @@ -520,13 +520,13 @@ class Colors { /// * [redAccent] and [purpleAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor pinkAccent = MaterialAccentColor( + static const MaterialAccentColor pinkAccent = const MaterialAccentColor( _pinkAccentPrimaryValue, - { - 100: Color(0xFFFF80AB), - 200: Color(_pinkAccentPrimaryValue), - 400: Color(0xFFF50057), - 700: Color(0xFFC51162), + const { + 100: const Color(0xFFFF80AB), + 200: const Color(_pinkAccentPrimaryValue), + 400: const Color(0xFFF50057), + 700: const Color(0xFFC51162), }, ); static const int _pinkAccentPrimaryValue = 0xFFFF4081; @@ -557,19 +557,19 @@ class Colors { /// * [deepPurple] and [pink], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor purple = MaterialColor( + static const MaterialColor purple = const MaterialColor( _purplePrimaryValue, - { - 50: Color(0xFFF3E5F5), - 100: Color(0xFFE1BEE7), - 200: Color(0xFFCE93D8), - 300: Color(0xFFBA68C8), - 400: Color(0xFFAB47BC), - 500: Color(_purplePrimaryValue), - 600: Color(0xFF8E24AA), - 700: Color(0xFF7B1FA2), - 800: Color(0xFF6A1B9A), - 900: Color(0xFF4A148C), + const { + 50: const Color(0xFFF3E5F5), + 100: const Color(0xFFE1BEE7), + 200: const Color(0xFFCE93D8), + 300: const Color(0xFFBA68C8), + 400: const Color(0xFFAB47BC), + 500: const Color(_purplePrimaryValue), + 600: const Color(0xFF8E24AA), + 700: const Color(0xFF7B1FA2), + 800: const Color(0xFF6A1B9A), + 900: const Color(0xFF4A148C), }, ); static const int _purplePrimaryValue = 0xFF9C27B0; @@ -600,13 +600,13 @@ class Colors { /// * [deepPurpleAccent] and [pinkAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor purpleAccent = MaterialAccentColor( + static const MaterialAccentColor purpleAccent = const MaterialAccentColor( _purpleAccentPrimaryValue, - { - 100: Color(0xFFEA80FC), - 200: Color(_purpleAccentPrimaryValue), - 400: Color(0xFFD500F9), - 700: Color(0xFFAA00FF), + const { + 100: const Color(0xFFEA80FC), + 200: const Color(_purpleAccentPrimaryValue), + 400: const Color(0xFFD500F9), + 700: const Color(0xFFAA00FF), }, ); static const int _purpleAccentPrimaryValue = 0xFFE040FB; @@ -637,19 +637,19 @@ class Colors { /// * [purple] and [indigo], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor deepPurple = MaterialColor( + static const MaterialColor deepPurple = const MaterialColor( _deepPurplePrimaryValue, - { - 50: Color(0xFFEDE7F6), - 100: Color(0xFFD1C4E9), - 200: Color(0xFFB39DDB), - 300: Color(0xFF9575CD), - 400: Color(0xFF7E57C2), - 500: Color(_deepPurplePrimaryValue), - 600: Color(0xFF5E35B1), - 700: Color(0xFF512DA8), - 800: Color(0xFF4527A0), - 900: Color(0xFF311B92), + const { + 50: const Color(0xFFEDE7F6), + 100: const Color(0xFFD1C4E9), + 200: const Color(0xFFB39DDB), + 300: const Color(0xFF9575CD), + 400: const Color(0xFF7E57C2), + 500: const Color(_deepPurplePrimaryValue), + 600: const Color(0xFF5E35B1), + 700: const Color(0xFF512DA8), + 800: const Color(0xFF4527A0), + 900: const Color(0xFF311B92), }, ); static const int _deepPurplePrimaryValue = 0xFF673AB7; @@ -680,13 +680,13 @@ class Colors { /// * [purpleAccent] and [indigoAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor deepPurpleAccent = MaterialAccentColor( + static const MaterialAccentColor deepPurpleAccent = const MaterialAccentColor( _deepPurpleAccentPrimaryValue, - { - 100: Color(0xFFB388FF), - 200: Color(_deepPurpleAccentPrimaryValue), - 400: Color(0xFF651FFF), - 700: Color(0xFF6200EA), + const { + 100: const Color(0xFFB388FF), + 200: const Color(_deepPurpleAccentPrimaryValue), + 400: const Color(0xFF651FFF), + 700: const Color(0xFF6200EA), }, ); static const int _deepPurpleAccentPrimaryValue = 0xFF7C4DFF; @@ -717,19 +717,19 @@ class Colors { /// * [blue] and [deepPurple], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor indigo = MaterialColor( + static const MaterialColor indigo = const MaterialColor( _indigoPrimaryValue, - { - 50: Color(0xFFE8EAF6), - 100: Color(0xFFC5CAE9), - 200: Color(0xFF9FA8DA), - 300: Color(0xFF7986CB), - 400: Color(0xFF5C6BC0), - 500: Color(_indigoPrimaryValue), - 600: Color(0xFF3949AB), - 700: Color(0xFF303F9F), - 800: Color(0xFF283593), - 900: Color(0xFF1A237E), + const { + 50: const Color(0xFFE8EAF6), + 100: const Color(0xFFC5CAE9), + 200: const Color(0xFF9FA8DA), + 300: const Color(0xFF7986CB), + 400: const Color(0xFF5C6BC0), + 500: const Color(_indigoPrimaryValue), + 600: const Color(0xFF3949AB), + 700: const Color(0xFF303F9F), + 800: const Color(0xFF283593), + 900: const Color(0xFF1A237E), }, ); static const int _indigoPrimaryValue = 0xFF3F51B5; @@ -760,13 +760,13 @@ class Colors { /// * [blueAccent] and [deepPurpleAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor indigoAccent = MaterialAccentColor( + static const MaterialAccentColor indigoAccent = const MaterialAccentColor( _indigoAccentPrimaryValue, - { - 100: Color(0xFF8C9EFF), - 200: Color(_indigoAccentPrimaryValue), - 400: Color(0xFF3D5AFE), - 700: Color(0xFF304FFE), + const { + 100: const Color(0xFF8C9EFF), + 200: const Color(_indigoAccentPrimaryValue), + 400: const Color(0xFF3D5AFE), + 700: const Color(0xFF304FFE), }, ); static const int _indigoAccentPrimaryValue = 0xFF536DFE; @@ -799,19 +799,19 @@ class Colors { /// * [indigo], [lightBlue], and [blueGrey], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor blue = MaterialColor( + static const MaterialColor blue = const MaterialColor( _bluePrimaryValue, - { - 50: Color(0xFFE3F2FD), - 100: Color(0xFFBBDEFB), - 200: Color(0xFF90CAF9), - 300: Color(0xFF64B5F6), - 400: Color(0xFF42A5F5), - 500: Color(_bluePrimaryValue), - 600: Color(0xFF1E88E5), - 700: Color(0xFF1976D2), - 800: Color(0xFF1565C0), - 900: Color(0xFF0D47A1), + const { + 50: const Color(0xFFE3F2FD), + 100: const Color(0xFFBBDEFB), + 200: const Color(0xFF90CAF9), + 300: const Color(0xFF64B5F6), + 400: const Color(0xFF42A5F5), + 500: const Color(_bluePrimaryValue), + 600: const Color(0xFF1E88E5), + 700: const Color(0xFF1976D2), + 800: const Color(0xFF1565C0), + 900: const Color(0xFF0D47A1), }, ); static const int _bluePrimaryValue = 0xFF2196F3; @@ -842,13 +842,13 @@ class Colors { /// * [indigoAccent] and [lightBlueAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor blueAccent = MaterialAccentColor( + static const MaterialAccentColor blueAccent = const MaterialAccentColor( _blueAccentPrimaryValue, - { - 100: Color(0xFF82B1FF), - 200: Color(_blueAccentPrimaryValue), - 400: Color(0xFF2979FF), - 700: Color(0xFF2962FF), + const { + 100: const Color(0xFF82B1FF), + 200: const Color(_blueAccentPrimaryValue), + 400: const Color(0xFF2979FF), + 700: const Color(0xFF2962FF), }, ); static const int _blueAccentPrimaryValue = 0xFF448AFF; @@ -879,19 +879,19 @@ class Colors { /// * [blue] and [cyan], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor lightBlue = MaterialColor( + static const MaterialColor lightBlue = const MaterialColor( _lightBluePrimaryValue, - { - 50: Color(0xFFE1F5FE), - 100: Color(0xFFB3E5FC), - 200: Color(0xFF81D4FA), - 300: Color(0xFF4FC3F7), - 400: Color(0xFF29B6F6), - 500: Color(_lightBluePrimaryValue), - 600: Color(0xFF039BE5), - 700: Color(0xFF0288D1), - 800: Color(0xFF0277BD), - 900: Color(0xFF01579B), + const { + 50: const Color(0xFFE1F5FE), + 100: const Color(0xFFB3E5FC), + 200: const Color(0xFF81D4FA), + 300: const Color(0xFF4FC3F7), + 400: const Color(0xFF29B6F6), + 500: const Color(_lightBluePrimaryValue), + 600: const Color(0xFF039BE5), + 700: const Color(0xFF0288D1), + 800: const Color(0xFF0277BD), + 900: const Color(0xFF01579B), }, ); static const int _lightBluePrimaryValue = 0xFF03A9F4; @@ -922,13 +922,13 @@ class Colors { /// * [blueAccent] and [cyanAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor lightBlueAccent = MaterialAccentColor( + static const MaterialAccentColor lightBlueAccent = const MaterialAccentColor( _lightBlueAccentPrimaryValue, - { - 100: Color(0xFF80D8FF), - 200: Color(_lightBlueAccentPrimaryValue), - 400: Color(0xFF00B0FF), - 700: Color(0xFF0091EA), + const { + 100: const Color(0xFF80D8FF), + 200: const Color(_lightBlueAccentPrimaryValue), + 400: const Color(0xFF00B0FF), + 700: const Color(0xFF0091EA), }, ); static const int _lightBlueAccentPrimaryValue = 0xFF40C4FF; @@ -961,19 +961,19 @@ class Colors { /// * [lightBlue], [teal], and [blueGrey], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor cyan = MaterialColor( + static const MaterialColor cyan = const MaterialColor( _cyanPrimaryValue, - { - 50: Color(0xFFE0F7FA), - 100: Color(0xFFB2EBF2), - 200: Color(0xFF80DEEA), - 300: Color(0xFF4DD0E1), - 400: Color(0xFF26C6DA), - 500: Color(_cyanPrimaryValue), - 600: Color(0xFF00ACC1), - 700: Color(0xFF0097A7), - 800: Color(0xFF00838F), - 900: Color(0xFF006064), + const { + 50: const Color(0xFFE0F7FA), + 100: const Color(0xFFB2EBF2), + 200: const Color(0xFF80DEEA), + 300: const Color(0xFF4DD0E1), + 400: const Color(0xFF26C6DA), + 500: const Color(_cyanPrimaryValue), + 600: const Color(0xFF00ACC1), + 700: const Color(0xFF0097A7), + 800: const Color(0xFF00838F), + 900: const Color(0xFF006064), }, ); static const int _cyanPrimaryValue = 0xFF00BCD4; @@ -1004,13 +1004,13 @@ class Colors { /// * [lightBlueAccent] and [tealAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor cyanAccent = MaterialAccentColor( + static const MaterialAccentColor cyanAccent = const MaterialAccentColor( _cyanAccentPrimaryValue, - { - 100: Color(0xFF84FFFF), - 200: Color(_cyanAccentPrimaryValue), - 400: Color(0xFF00E5FF), - 700: Color(0xFF00B8D4), + const { + 100: const Color(0xFF84FFFF), + 200: const Color(_cyanAccentPrimaryValue), + 400: const Color(0xFF00E5FF), + 700: const Color(0xFF00B8D4), }, ); static const int _cyanAccentPrimaryValue = 0xFF18FFFF; @@ -1041,19 +1041,19 @@ class Colors { /// * [green] and [cyan], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor teal = MaterialColor( + static const MaterialColor teal = const MaterialColor( _tealPrimaryValue, - { - 50: Color(0xFFE0F2F1), - 100: Color(0xFFB2DFDB), - 200: Color(0xFF80CBC4), - 300: Color(0xFF4DB6AC), - 400: Color(0xFF26A69A), - 500: Color(_tealPrimaryValue), - 600: Color(0xFF00897B), - 700: Color(0xFF00796B), - 800: Color(0xFF00695C), - 900: Color(0xFF004D40), + const { + 50: const Color(0xFFE0F2F1), + 100: const Color(0xFFB2DFDB), + 200: const Color(0xFF80CBC4), + 300: const Color(0xFF4DB6AC), + 400: const Color(0xFF26A69A), + 500: const Color(_tealPrimaryValue), + 600: const Color(0xFF00897B), + 700: const Color(0xFF00796B), + 800: const Color(0xFF00695C), + 900: const Color(0xFF004D40), }, ); static const int _tealPrimaryValue = 0xFF009688; @@ -1084,13 +1084,13 @@ class Colors { /// * [greenAccent] and [cyanAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor tealAccent = MaterialAccentColor( + static const MaterialAccentColor tealAccent = const MaterialAccentColor( _tealAccentPrimaryValue, - { - 100: Color(0xFFA7FFEB), - 200: Color(_tealAccentPrimaryValue), - 400: Color(0xFF1DE9B6), - 700: Color(0xFF00BFA5), + const { + 100: const Color(0xFFA7FFEB), + 200: const Color(_tealAccentPrimaryValue), + 400: const Color(0xFF1DE9B6), + 700: const Color(0xFF00BFA5), }, ); static const int _tealAccentPrimaryValue = 0xFF64FFDA; @@ -1124,19 +1124,19 @@ class Colors { /// * [teal], [lightGreen], and [lime], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor green = MaterialColor( + static const MaterialColor green = const MaterialColor( _greenPrimaryValue, - { - 50: Color(0xFFE8F5E9), - 100: Color(0xFFC8E6C9), - 200: Color(0xFFA5D6A7), - 300: Color(0xFF81C784), - 400: Color(0xFF66BB6A), - 500: Color(_greenPrimaryValue), - 600: Color(0xFF43A047), - 700: Color(0xFF388E3C), - 800: Color(0xFF2E7D32), - 900: Color(0xFF1B5E20), + const { + 50: const Color(0xFFE8F5E9), + 100: const Color(0xFFC8E6C9), + 200: const Color(0xFFA5D6A7), + 300: const Color(0xFF81C784), + 400: const Color(0xFF66BB6A), + 500: const Color(_greenPrimaryValue), + 600: const Color(0xFF43A047), + 700: const Color(0xFF388E3C), + 800: const Color(0xFF2E7D32), + 900: const Color(0xFF1B5E20), }, ); static const int _greenPrimaryValue = 0xFF4CAF50; @@ -1170,13 +1170,13 @@ class Colors { /// * [tealAccent], [lightGreenAccent], and [limeAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor greenAccent = MaterialAccentColor( + static const MaterialAccentColor greenAccent = const MaterialAccentColor( _greenAccentPrimaryValue, - { - 100: Color(0xFFB9F6CA), - 200: Color(_greenAccentPrimaryValue), - 400: Color(0xFF00E676), - 700: Color(0xFF00C853), + const { + 100: const Color(0xFFB9F6CA), + 200: const Color(_greenAccentPrimaryValue), + 400: const Color(0xFF00E676), + 700: const Color(0xFF00C853), }, ); static const int _greenAccentPrimaryValue = 0xFF69F0AE; @@ -1207,19 +1207,19 @@ class Colors { /// * [green] and [lime], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor lightGreen = MaterialColor( + static const MaterialColor lightGreen = const MaterialColor( _lightGreenPrimaryValue, - { - 50: Color(0xFFF1F8E9), - 100: Color(0xFFDCEDC8), - 200: Color(0xFFC5E1A5), - 300: Color(0xFFAED581), - 400: Color(0xFF9CCC65), - 500: Color(_lightGreenPrimaryValue), - 600: Color(0xFF7CB342), - 700: Color(0xFF689F38), - 800: Color(0xFF558B2F), - 900: Color(0xFF33691E), + const { + 50: const Color(0xFFF1F8E9), + 100: const Color(0xFFDCEDC8), + 200: const Color(0xFFC5E1A5), + 300: const Color(0xFFAED581), + 400: const Color(0xFF9CCC65), + 500: const Color(_lightGreenPrimaryValue), + 600: const Color(0xFF7CB342), + 700: const Color(0xFF689F38), + 800: const Color(0xFF558B2F), + 900: const Color(0xFF33691E), }, ); static const int _lightGreenPrimaryValue = 0xFF8BC34A; @@ -1250,13 +1250,13 @@ class Colors { /// * [greenAccent] and [limeAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor lightGreenAccent = MaterialAccentColor( + static const MaterialAccentColor lightGreenAccent = const MaterialAccentColor( _lightGreenAccentPrimaryValue, - { - 100: Color(0xFFCCFF90), - 200: Color(_lightGreenAccentPrimaryValue), - 400: Color(0xFF76FF03), - 700: Color(0xFF64DD17), + const { + 100: const Color(0xFFCCFF90), + 200: const Color(_lightGreenAccentPrimaryValue), + 400: const Color(0xFF76FF03), + 700: const Color(0xFF64DD17), }, ); static const int _lightGreenAccentPrimaryValue = 0xFFB2FF59; @@ -1287,19 +1287,19 @@ class Colors { /// * [lightGreen] and [yellow], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor lime = MaterialColor( + static const MaterialColor lime = const MaterialColor( _limePrimaryValue, - { - 50: Color(0xFFF9FBE7), - 100: Color(0xFFF0F4C3), - 200: Color(0xFFE6EE9C), - 300: Color(0xFFDCE775), - 400: Color(0xFFD4E157), - 500: Color(_limePrimaryValue), - 600: Color(0xFFC0CA33), - 700: Color(0xFFAFB42B), - 800: Color(0xFF9E9D24), - 900: Color(0xFF827717), + const { + 50: const Color(0xFFF9FBE7), + 100: const Color(0xFFF0F4C3), + 200: const Color(0xFFE6EE9C), + 300: const Color(0xFFDCE775), + 400: const Color(0xFFD4E157), + 500: const Color(_limePrimaryValue), + 600: const Color(0xFFC0CA33), + 700: const Color(0xFFAFB42B), + 800: const Color(0xFF9E9D24), + 900: const Color(0xFF827717), }, ); static const int _limePrimaryValue = 0xFFCDDC39; @@ -1330,13 +1330,13 @@ class Colors { /// * [lightGreenAccent] and [yellowAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor limeAccent = MaterialAccentColor( + static const MaterialAccentColor limeAccent = const MaterialAccentColor( _limeAccentPrimaryValue, - { - 100: Color(0xFFF4FF81), - 200: Color(_limeAccentPrimaryValue), - 400: Color(0xFFC6FF00), - 700: Color(0xFFAEEA00), + const { + 100: const Color(0xFFF4FF81), + 200: const Color(_limeAccentPrimaryValue), + 400: const Color(0xFFC6FF00), + 700: const Color(0xFFAEEA00), }, ); static const int _limeAccentPrimaryValue = 0xFFEEFF41; @@ -1367,19 +1367,19 @@ class Colors { /// * [lime] and [amber], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor yellow = MaterialColor( + static const MaterialColor yellow = const MaterialColor( _yellowPrimaryValue, - { - 50: Color(0xFFFFFDE7), - 100: Color(0xFFFFF9C4), - 200: Color(0xFFFFF59D), - 300: Color(0xFFFFF176), - 400: Color(0xFFFFEE58), - 500: Color(_yellowPrimaryValue), - 600: Color(0xFFFDD835), - 700: Color(0xFFFBC02D), - 800: Color(0xFFF9A825), - 900: Color(0xFFF57F17), + const { + 50: const Color(0xFFFFFDE7), + 100: const Color(0xFFFFF9C4), + 200: const Color(0xFFFFF59D), + 300: const Color(0xFFFFF176), + 400: const Color(0xFFFFEE58), + 500: const Color(_yellowPrimaryValue), + 600: const Color(0xFFFDD835), + 700: const Color(0xFFFBC02D), + 800: const Color(0xFFF9A825), + 900: const Color(0xFFF57F17), }, ); static const int _yellowPrimaryValue = 0xFFFFEB3B; @@ -1410,13 +1410,13 @@ class Colors { /// * [limeAccent] and [amberAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor yellowAccent = MaterialAccentColor( + static const MaterialAccentColor yellowAccent = const MaterialAccentColor( _yellowAccentPrimaryValue, - { - 100: Color(0xFFFFFF8D), - 200: Color(_yellowAccentPrimaryValue), - 400: Color(0xFFFFEA00), - 700: Color(0xFFFFD600), + const { + 100: const Color(0xFFFFFF8D), + 200: const Color(_yellowAccentPrimaryValue), + 400: const Color(0xFFFFEA00), + 700: const Color(0xFFFFD600), }, ); static const int _yellowAccentPrimaryValue = 0xFFFFFF00; @@ -1447,19 +1447,19 @@ class Colors { /// * [yellow] and [orange], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor amber = MaterialColor( + static const MaterialColor amber = const MaterialColor( _amberPrimaryValue, - { - 50: Color(0xFFFFF8E1), - 100: Color(0xFFFFECB3), - 200: Color(0xFFFFE082), - 300: Color(0xFFFFD54F), - 400: Color(0xFFFFCA28), - 500: Color(_amberPrimaryValue), - 600: Color(0xFFFFB300), - 700: Color(0xFFFFA000), - 800: Color(0xFFFF8F00), - 900: Color(0xFFFF6F00), + const { + 50: const Color(0xFFFFF8E1), + 100: const Color(0xFFFFECB3), + 200: const Color(0xFFFFE082), + 300: const Color(0xFFFFD54F), + 400: const Color(0xFFFFCA28), + 500: const Color(_amberPrimaryValue), + 600: const Color(0xFFFFB300), + 700: const Color(0xFFFFA000), + 800: const Color(0xFFFF8F00), + 900: const Color(0xFFFF6F00), }, ); static const int _amberPrimaryValue = 0xFFFFC107; @@ -1490,13 +1490,13 @@ class Colors { /// * [yellowAccent] and [orangeAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor amberAccent = MaterialAccentColor( + static const MaterialAccentColor amberAccent = const MaterialAccentColor( _amberAccentPrimaryValue, - { - 100: Color(0xFFFFE57F), - 200: Color(_amberAccentPrimaryValue), - 400: Color(0xFFFFC400), - 700: Color(0xFFFFAB00), + const { + 100: const Color(0xFFFFE57F), + 200: const Color(_amberAccentPrimaryValue), + 400: const Color(0xFFFFC400), + 700: const Color(0xFFFFAB00), }, ); static const int _amberAccentPrimaryValue = 0xFFFFD740; @@ -1529,19 +1529,19 @@ class Colors { /// * [amber], [deepOrange], and [brown], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor orange = MaterialColor( + static const MaterialColor orange = const MaterialColor( _orangePrimaryValue, - { - 50: Color(0xFFFFF3E0), - 100: Color(0xFFFFE0B2), - 200: Color(0xFFFFCC80), - 300: Color(0xFFFFB74D), - 400: Color(0xFFFFA726), - 500: Color(_orangePrimaryValue), - 600: Color(0xFFFB8C00), - 700: Color(0xFFF57C00), - 800: Color(0xFFEF6C00), - 900: Color(0xFFE65100), + const { + 50: const Color(0xFFFFF3E0), + 100: const Color(0xFFFFE0B2), + 200: const Color(0xFFFFCC80), + 300: const Color(0xFFFFB74D), + 400: const Color(0xFFFFA726), + 500: const Color(_orangePrimaryValue), + 600: const Color(0xFFFB8C00), + 700: const Color(0xFFF57C00), + 800: const Color(0xFFEF6C00), + 900: const Color(0xFFE65100), }, ); static const int _orangePrimaryValue = 0xFFFF9800; @@ -1572,13 +1572,13 @@ class Colors { /// * [amberAccent] and [deepOrangeAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor orangeAccent = MaterialAccentColor( + static const MaterialAccentColor orangeAccent = const MaterialAccentColor( _orangeAccentPrimaryValue, - { - 100: Color(0xFFFFD180), - 200: Color(_orangeAccentPrimaryValue), - 400: Color(0xFFFF9100), - 700: Color(0xFFFF6D00), + const { + 100: const Color(0xFFFFD180), + 200: const Color(_orangeAccentPrimaryValue), + 400: const Color(0xFFFF9100), + 700: const Color(0xFFFF6D00), }, ); static const int _orangeAccentPrimaryValue = 0xFFFFAB40; @@ -1611,19 +1611,19 @@ class Colors { /// * [orange], [red], and [brown], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor deepOrange = MaterialColor( + static const MaterialColor deepOrange = const MaterialColor( _deepOrangePrimaryValue, - { - 50: Color(0xFFFBE9E7), - 100: Color(0xFFFFCCBC), - 200: Color(0xFFFFAB91), - 300: Color(0xFFFF8A65), - 400: Color(0xFFFF7043), - 500: Color(_deepOrangePrimaryValue), - 600: Color(0xFFF4511E), - 700: Color(0xFFE64A19), - 800: Color(0xFFD84315), - 900: Color(0xFFBF360C), + const { + 50: const Color(0xFFFBE9E7), + 100: const Color(0xFFFFCCBC), + 200: const Color(0xFFFFAB91), + 300: const Color(0xFFFF8A65), + 400: const Color(0xFFFF7043), + 500: const Color(_deepOrangePrimaryValue), + 600: const Color(0xFFF4511E), + 700: const Color(0xFFE64A19), + 800: const Color(0xFFD84315), + 900: const Color(0xFFBF360C), }, ); static const int _deepOrangePrimaryValue = 0xFFFF5722; @@ -1654,13 +1654,13 @@ class Colors { /// * [orangeAccent] [redAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor deepOrangeAccent = MaterialAccentColor( + static const MaterialAccentColor deepOrangeAccent = const MaterialAccentColor( _deepOrangeAccentPrimaryValue, - { - 100: Color(0xFFFF9E80), - 200: Color(_deepOrangeAccentPrimaryValue), - 400: Color(0xFFFF3D00), - 700: Color(0xFFDD2C00), + const { + 100: const Color(0xFFFF9E80), + 200: const Color(_deepOrangeAccentPrimaryValue), + 400: const Color(0xFFFF3D00), + 700: const Color(0xFFDD2C00), }, ); static const int _deepOrangeAccentPrimaryValue = 0xFFFF6E40; @@ -1689,19 +1689,19 @@ class Colors { /// * [orange] and [blueGrey], vaguely similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor brown = MaterialColor( + static const MaterialColor brown = const MaterialColor( _brownPrimaryValue, - { - 50: Color(0xFFEFEBE9), - 100: Color(0xFFD7CCC8), - 200: Color(0xFFBCAAA4), - 300: Color(0xFFA1887F), - 400: Color(0xFF8D6E63), - 500: Color(_brownPrimaryValue), - 600: Color(0xFF6D4C41), - 700: Color(0xFF5D4037), - 800: Color(0xFF4E342E), - 900: Color(0xFF3E2723), + const { + 50: const Color(0xFFEFEBE9), + 100: const Color(0xFFD7CCC8), + 200: const Color(0xFFBCAAA4), + 300: const Color(0xFFA1887F), + 400: const Color(0xFF8D6E63), + 500: const Color(_brownPrimaryValue), + 600: const Color(0xFF6D4C41), + 700: const Color(0xFF5D4037), + 800: const Color(0xFF4E342E), + 900: const Color(0xFF3E2723), }, ); static const int _brownPrimaryValue = 0xFF795548; @@ -1737,21 +1737,21 @@ class Colors { /// provide a different approach to showing shades of grey. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor grey = MaterialColor( + static const MaterialColor grey = const MaterialColor( _greyPrimaryValue, - { - 50: Color(0xFFFAFAFA), - 100: Color(0xFFF5F5F5), - 200: Color(0xFFEEEEEE), - 300: Color(0xFFE0E0E0), - 350: Color(0xFFD6D6D6), // only for raised button while pressed in light theme - 400: Color(0xFFBDBDBD), - 500: Color(_greyPrimaryValue), - 600: Color(0xFF757575), - 700: Color(0xFF616161), - 800: Color(0xFF424242), - 850: Color(0xFF303030), // only for background color in dark theme - 900: Color(0xFF212121), + const { + 50: const Color(0xFFFAFAFA), + 100: const Color(0xFFF5F5F5), + 200: const Color(0xFFEEEEEE), + 300: const Color(0xFFE0E0E0), + 350: const Color(0xFFD6D6D6), // only for raised button while pressed in light theme + 400: const Color(0xFFBDBDBD), + 500: const Color(_greyPrimaryValue), + 600: const Color(0xFF757575), + 700: const Color(0xFF616161), + 800: const Color(0xFF424242), + 850: const Color(0xFF303030), // only for background color in dark theme + 900: const Color(0xFF212121), }, ); static const int _greyPrimaryValue = 0xFF9E9E9E; @@ -1782,25 +1782,25 @@ class Colors { /// * [grey], [cyan], and [blue], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor blueGrey = MaterialColor( + static const MaterialColor blueGrey = const MaterialColor( _blueGreyPrimaryValue, - { - 50: Color(0xFFECEFF1), - 100: Color(0xFFCFD8DC), - 200: Color(0xFFB0BEC5), - 300: Color(0xFF90A4AE), - 400: Color(0xFF78909C), - 500: Color(_blueGreyPrimaryValue), - 600: Color(0xFF546E7A), - 700: Color(0xFF455A64), - 800: Color(0xFF37474F), - 900: Color(0xFF263238), + const { + 50: const Color(0xFFECEFF1), + 100: const Color(0xFFCFD8DC), + 200: const Color(0xFFB0BEC5), + 300: const Color(0xFF90A4AE), + 400: const Color(0xFF78909C), + 500: const Color(_blueGreyPrimaryValue), + 600: const Color(0xFF546E7A), + 700: const Color(0xFF455A64), + 800: const Color(0xFF37474F), + 900: const Color(0xFF263238), }, ); static const int _blueGreyPrimaryValue = 0xFF607D8B; /// The material design primary color swatches, excluding grey. - static const List primaries = [ + static const List primaries = const [ red, pink, purple, @@ -1825,7 +1825,7 @@ class Colors { ]; /// The material design accent color swatches. - static const List accents = [ + static const List accents = const [ redAccent, pinkAccent, purpleAccent, From 69280f7427ba2b18d39604da9487bae11cfa489e Mon Sep 17 00:00:00 2001 From: Alexandre Ardhuin Date: Thu, 2 Aug 2018 12:02:32 +0200 Subject: [PATCH 33/66] re-re-enable lint unnecessary_const (#20103) --- packages/flutter/lib/src/material/colors.dart | 684 +++++++++--------- 1 file changed, 342 insertions(+), 342 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 0c2666838f2b..3c71007b6791 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -192,7 +192,7 @@ class Colors { Colors._(); /// Completely invisible. - static const Color transparent = const Color(0x00000000); + static const Color transparent = Color(0x00000000); /// Completely opaque black. /// @@ -204,7 +204,7 @@ class Colors { /// are variants on this color but with different opacities. /// * [white], a solid white color. /// * [transparent], a fully-transparent color. - static const Color black = const Color(0xFF000000); + static const Color black = Color(0xFF000000); /// Black with 87% opacity. /// @@ -219,7 +219,7 @@ class Colors { /// rather than hard-coding colors in your build methods. /// * [black], [black54], [black45], [black38], [black26], [black12], which /// are variants on this color but with different opacities. - static const Color black87 = const Color(0xDD000000); + static const Color black87 = Color(0xDD000000); /// Black with 54% opacity. /// @@ -235,7 +235,7 @@ class Colors { /// rather than hard-coding colors in your build methods. /// * [black], [black87], [black45], [black38], [black26], [black12], which /// are variants on this color but with different opacities. - static const Color black54 = const Color(0x8A000000); + static const Color black54 = Color(0x8A000000); /// Black with 45% opacity. /// @@ -247,7 +247,7 @@ class Colors { /// /// * [black], [black87], [black54], [black38], [black26], [black12], which /// are variants on this color but with different opacities. - static const Color black45 = const Color(0x73000000); + static const Color black45 = Color(0x73000000); /// Black with 38% opacity. /// @@ -259,7 +259,7 @@ class Colors { /// /// * [black], [black87], [black54], [black45], [black26], [black12], which /// are variants on this color but with different opacities. - static const Color black38 = const Color(0x61000000); + static const Color black38 = Color(0x61000000); /// Black with 26% opacity. /// @@ -274,7 +274,7 @@ class Colors { /// rather than hard-coding colors in your build methods. /// * [black], [black87], [black54], [black45], [black38], [black12], which /// are variants on this color but with different opacities. - static const Color black26 = const Color(0x42000000); + static const Color black26 = Color(0x42000000); /// Black with 12% opacity. /// @@ -286,7 +286,7 @@ class Colors { /// /// * [black], [black87], [black54], [black45], [black38], [black26], which /// are variants on this color but with different opacities. - static const Color black12 = const Color(0x1F000000); + static const Color black12 = Color(0x1F000000); /// Completely opaque white. /// @@ -304,7 +304,7 @@ class Colors { /// but with different opacities. /// * [black], a solid black color. /// * [transparent], a fully-transparent color. - static const Color white = const Color(0xFFFFFFFF); + static const Color white = Color(0xFFFFFFFF); /// White with 70% opacity. /// @@ -319,7 +319,7 @@ class Colors { /// rather than hard-coding colors in your build methods. /// * [white, white30, white12, white10], which are variants on this color /// but with different opacities. - static const Color white70 = const Color(0xB3FFFFFF); + static const Color white70 = Color(0xB3FFFFFF); /// White with 32% opacity. /// @@ -334,7 +334,7 @@ class Colors { /// rather than hard-coding colors in your build methods. /// * [white, white70, white12, white10], which are variants on this color /// but with different opacities. - static const Color white30 = const Color(0x4DFFFFFF); + static const Color white30 = Color(0x4DFFFFFF); /// White with 24% opacity. /// @@ -346,7 +346,7 @@ class Colors { /// /// * [white, white70, white30, white10], which are variants on this color /// but with different opacities. - static const Color white24 = const Color(0x3DFFFFFF); + static const Color white24 = Color(0x3DFFFFFF); /// White with 12% opacity. /// @@ -358,7 +358,7 @@ class Colors { /// /// * [white, white70, white30, white10], which are variants on this color /// but with different opacities. - static const Color white12 = const Color(0x1FFFFFFF); + static const Color white12 = Color(0x1FFFFFFF); /// White with 10% opacity. /// @@ -369,7 +369,7 @@ class Colors { /// * [white, white70, white30, white12], which are variants on this color /// but with different opacities. /// * [transparent], a fully-transparent color, not far from this one. - static const Color white10 = const Color(0x1AFFFFFF); + static const Color white10 = Color(0x1AFFFFFF); /// The red primary color and swatch. /// @@ -397,19 +397,19 @@ class Colors { /// * [deepOrange] and [pink], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor red = const MaterialColor( + static const MaterialColor red = MaterialColor( _redPrimaryValue, - const { - 50: const Color(0xFFFFEBEE), - 100: const Color(0xFFFFCDD2), - 200: const Color(0xFFEF9A9A), - 300: const Color(0xFFE57373), - 400: const Color(0xFFEF5350), - 500: const Color(_redPrimaryValue), - 600: const Color(0xFFE53935), - 700: const Color(0xFFD32F2F), - 800: const Color(0xFFC62828), - 900: const Color(0xFFB71C1C), + { + 50: Color(0xFFFFEBEE), + 100: Color(0xFFFFCDD2), + 200: Color(0xFFEF9A9A), + 300: Color(0xFFE57373), + 400: Color(0xFFEF5350), + 500: Color(_redPrimaryValue), + 600: Color(0xFFE53935), + 700: Color(0xFFD32F2F), + 800: Color(0xFFC62828), + 900: Color(0xFFB71C1C), }, ); static const int _redPrimaryValue = 0xFFF44336; @@ -440,13 +440,13 @@ class Colors { /// * [deepOrangeAccent] and [pinkAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor redAccent = const MaterialAccentColor( + static const MaterialAccentColor redAccent = MaterialAccentColor( _redAccentValue, - const { - 100: const Color(0xFFFF8A80), - 200: const Color(_redAccentValue), - 400: const Color(0xFFFF1744), - 700: const Color(0xFFD50000), + { + 100: Color(0xFFFF8A80), + 200: Color(_redAccentValue), + 400: Color(0xFFFF1744), + 700: Color(0xFFD50000), }, ); static const int _redAccentValue = 0xFFFF5252; @@ -477,19 +477,19 @@ class Colors { /// * [red] and [purple], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor pink = const MaterialColor( + static const MaterialColor pink = MaterialColor( _pinkPrimaryValue, - const { - 50: const Color(0xFFFCE4EC), - 100: const Color(0xFFF8BBD0), - 200: const Color(0xFFF48FB1), - 300: const Color(0xFFF06292), - 400: const Color(0xFFEC407A), - 500: const Color(_pinkPrimaryValue), - 600: const Color(0xFFD81B60), - 700: const Color(0xFFC2185B), - 800: const Color(0xFFAD1457), - 900: const Color(0xFF880E4F), + { + 50: Color(0xFFFCE4EC), + 100: Color(0xFFF8BBD0), + 200: Color(0xFFF48FB1), + 300: Color(0xFFF06292), + 400: Color(0xFFEC407A), + 500: Color(_pinkPrimaryValue), + 600: Color(0xFFD81B60), + 700: Color(0xFFC2185B), + 800: Color(0xFFAD1457), + 900: Color(0xFF880E4F), }, ); static const int _pinkPrimaryValue = 0xFFE91E63; @@ -520,13 +520,13 @@ class Colors { /// * [redAccent] and [purpleAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor pinkAccent = const MaterialAccentColor( + static const MaterialAccentColor pinkAccent = MaterialAccentColor( _pinkAccentPrimaryValue, - const { - 100: const Color(0xFFFF80AB), - 200: const Color(_pinkAccentPrimaryValue), - 400: const Color(0xFFF50057), - 700: const Color(0xFFC51162), + { + 100: Color(0xFFFF80AB), + 200: Color(_pinkAccentPrimaryValue), + 400: Color(0xFFF50057), + 700: Color(0xFFC51162), }, ); static const int _pinkAccentPrimaryValue = 0xFFFF4081; @@ -557,19 +557,19 @@ class Colors { /// * [deepPurple] and [pink], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor purple = const MaterialColor( + static const MaterialColor purple = MaterialColor( _purplePrimaryValue, - const { - 50: const Color(0xFFF3E5F5), - 100: const Color(0xFFE1BEE7), - 200: const Color(0xFFCE93D8), - 300: const Color(0xFFBA68C8), - 400: const Color(0xFFAB47BC), - 500: const Color(_purplePrimaryValue), - 600: const Color(0xFF8E24AA), - 700: const Color(0xFF7B1FA2), - 800: const Color(0xFF6A1B9A), - 900: const Color(0xFF4A148C), + { + 50: Color(0xFFF3E5F5), + 100: Color(0xFFE1BEE7), + 200: Color(0xFFCE93D8), + 300: Color(0xFFBA68C8), + 400: Color(0xFFAB47BC), + 500: Color(_purplePrimaryValue), + 600: Color(0xFF8E24AA), + 700: Color(0xFF7B1FA2), + 800: Color(0xFF6A1B9A), + 900: Color(0xFF4A148C), }, ); static const int _purplePrimaryValue = 0xFF9C27B0; @@ -600,13 +600,13 @@ class Colors { /// * [deepPurpleAccent] and [pinkAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor purpleAccent = const MaterialAccentColor( + static const MaterialAccentColor purpleAccent = MaterialAccentColor( _purpleAccentPrimaryValue, - const { - 100: const Color(0xFFEA80FC), - 200: const Color(_purpleAccentPrimaryValue), - 400: const Color(0xFFD500F9), - 700: const Color(0xFFAA00FF), + { + 100: Color(0xFFEA80FC), + 200: Color(_purpleAccentPrimaryValue), + 400: Color(0xFFD500F9), + 700: Color(0xFFAA00FF), }, ); static const int _purpleAccentPrimaryValue = 0xFFE040FB; @@ -637,19 +637,19 @@ class Colors { /// * [purple] and [indigo], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor deepPurple = const MaterialColor( + static const MaterialColor deepPurple = MaterialColor( _deepPurplePrimaryValue, - const { - 50: const Color(0xFFEDE7F6), - 100: const Color(0xFFD1C4E9), - 200: const Color(0xFFB39DDB), - 300: const Color(0xFF9575CD), - 400: const Color(0xFF7E57C2), - 500: const Color(_deepPurplePrimaryValue), - 600: const Color(0xFF5E35B1), - 700: const Color(0xFF512DA8), - 800: const Color(0xFF4527A0), - 900: const Color(0xFF311B92), + { + 50: Color(0xFFEDE7F6), + 100: Color(0xFFD1C4E9), + 200: Color(0xFFB39DDB), + 300: Color(0xFF9575CD), + 400: Color(0xFF7E57C2), + 500: Color(_deepPurplePrimaryValue), + 600: Color(0xFF5E35B1), + 700: Color(0xFF512DA8), + 800: Color(0xFF4527A0), + 900: Color(0xFF311B92), }, ); static const int _deepPurplePrimaryValue = 0xFF673AB7; @@ -680,13 +680,13 @@ class Colors { /// * [purpleAccent] and [indigoAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor deepPurpleAccent = const MaterialAccentColor( + static const MaterialAccentColor deepPurpleAccent = MaterialAccentColor( _deepPurpleAccentPrimaryValue, - const { - 100: const Color(0xFFB388FF), - 200: const Color(_deepPurpleAccentPrimaryValue), - 400: const Color(0xFF651FFF), - 700: const Color(0xFF6200EA), + { + 100: Color(0xFFB388FF), + 200: Color(_deepPurpleAccentPrimaryValue), + 400: Color(0xFF651FFF), + 700: Color(0xFF6200EA), }, ); static const int _deepPurpleAccentPrimaryValue = 0xFF7C4DFF; @@ -717,19 +717,19 @@ class Colors { /// * [blue] and [deepPurple], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor indigo = const MaterialColor( + static const MaterialColor indigo = MaterialColor( _indigoPrimaryValue, - const { - 50: const Color(0xFFE8EAF6), - 100: const Color(0xFFC5CAE9), - 200: const Color(0xFF9FA8DA), - 300: const Color(0xFF7986CB), - 400: const Color(0xFF5C6BC0), - 500: const Color(_indigoPrimaryValue), - 600: const Color(0xFF3949AB), - 700: const Color(0xFF303F9F), - 800: const Color(0xFF283593), - 900: const Color(0xFF1A237E), + { + 50: Color(0xFFE8EAF6), + 100: Color(0xFFC5CAE9), + 200: Color(0xFF9FA8DA), + 300: Color(0xFF7986CB), + 400: Color(0xFF5C6BC0), + 500: Color(_indigoPrimaryValue), + 600: Color(0xFF3949AB), + 700: Color(0xFF303F9F), + 800: Color(0xFF283593), + 900: Color(0xFF1A237E), }, ); static const int _indigoPrimaryValue = 0xFF3F51B5; @@ -760,13 +760,13 @@ class Colors { /// * [blueAccent] and [deepPurpleAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor indigoAccent = const MaterialAccentColor( + static const MaterialAccentColor indigoAccent = MaterialAccentColor( _indigoAccentPrimaryValue, - const { - 100: const Color(0xFF8C9EFF), - 200: const Color(_indigoAccentPrimaryValue), - 400: const Color(0xFF3D5AFE), - 700: const Color(0xFF304FFE), + { + 100: Color(0xFF8C9EFF), + 200: Color(_indigoAccentPrimaryValue), + 400: Color(0xFF3D5AFE), + 700: Color(0xFF304FFE), }, ); static const int _indigoAccentPrimaryValue = 0xFF536DFE; @@ -799,19 +799,19 @@ class Colors { /// * [indigo], [lightBlue], and [blueGrey], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor blue = const MaterialColor( + static const MaterialColor blue = MaterialColor( _bluePrimaryValue, - const { - 50: const Color(0xFFE3F2FD), - 100: const Color(0xFFBBDEFB), - 200: const Color(0xFF90CAF9), - 300: const Color(0xFF64B5F6), - 400: const Color(0xFF42A5F5), - 500: const Color(_bluePrimaryValue), - 600: const Color(0xFF1E88E5), - 700: const Color(0xFF1976D2), - 800: const Color(0xFF1565C0), - 900: const Color(0xFF0D47A1), + { + 50: Color(0xFFE3F2FD), + 100: Color(0xFFBBDEFB), + 200: Color(0xFF90CAF9), + 300: Color(0xFF64B5F6), + 400: Color(0xFF42A5F5), + 500: Color(_bluePrimaryValue), + 600: Color(0xFF1E88E5), + 700: Color(0xFF1976D2), + 800: Color(0xFF1565C0), + 900: Color(0xFF0D47A1), }, ); static const int _bluePrimaryValue = 0xFF2196F3; @@ -842,13 +842,13 @@ class Colors { /// * [indigoAccent] and [lightBlueAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor blueAccent = const MaterialAccentColor( + static const MaterialAccentColor blueAccent = MaterialAccentColor( _blueAccentPrimaryValue, - const { - 100: const Color(0xFF82B1FF), - 200: const Color(_blueAccentPrimaryValue), - 400: const Color(0xFF2979FF), - 700: const Color(0xFF2962FF), + { + 100: Color(0xFF82B1FF), + 200: Color(_blueAccentPrimaryValue), + 400: Color(0xFF2979FF), + 700: Color(0xFF2962FF), }, ); static const int _blueAccentPrimaryValue = 0xFF448AFF; @@ -879,19 +879,19 @@ class Colors { /// * [blue] and [cyan], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor lightBlue = const MaterialColor( + static const MaterialColor lightBlue = MaterialColor( _lightBluePrimaryValue, - const { - 50: const Color(0xFFE1F5FE), - 100: const Color(0xFFB3E5FC), - 200: const Color(0xFF81D4FA), - 300: const Color(0xFF4FC3F7), - 400: const Color(0xFF29B6F6), - 500: const Color(_lightBluePrimaryValue), - 600: const Color(0xFF039BE5), - 700: const Color(0xFF0288D1), - 800: const Color(0xFF0277BD), - 900: const Color(0xFF01579B), + { + 50: Color(0xFFE1F5FE), + 100: Color(0xFFB3E5FC), + 200: Color(0xFF81D4FA), + 300: Color(0xFF4FC3F7), + 400: Color(0xFF29B6F6), + 500: Color(_lightBluePrimaryValue), + 600: Color(0xFF039BE5), + 700: Color(0xFF0288D1), + 800: Color(0xFF0277BD), + 900: Color(0xFF01579B), }, ); static const int _lightBluePrimaryValue = 0xFF03A9F4; @@ -922,13 +922,13 @@ class Colors { /// * [blueAccent] and [cyanAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor lightBlueAccent = const MaterialAccentColor( + static const MaterialAccentColor lightBlueAccent = MaterialAccentColor( _lightBlueAccentPrimaryValue, - const { - 100: const Color(0xFF80D8FF), - 200: const Color(_lightBlueAccentPrimaryValue), - 400: const Color(0xFF00B0FF), - 700: const Color(0xFF0091EA), + { + 100: Color(0xFF80D8FF), + 200: Color(_lightBlueAccentPrimaryValue), + 400: Color(0xFF00B0FF), + 700: Color(0xFF0091EA), }, ); static const int _lightBlueAccentPrimaryValue = 0xFF40C4FF; @@ -961,19 +961,19 @@ class Colors { /// * [lightBlue], [teal], and [blueGrey], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor cyan = const MaterialColor( + static const MaterialColor cyan = MaterialColor( _cyanPrimaryValue, - const { - 50: const Color(0xFFE0F7FA), - 100: const Color(0xFFB2EBF2), - 200: const Color(0xFF80DEEA), - 300: const Color(0xFF4DD0E1), - 400: const Color(0xFF26C6DA), - 500: const Color(_cyanPrimaryValue), - 600: const Color(0xFF00ACC1), - 700: const Color(0xFF0097A7), - 800: const Color(0xFF00838F), - 900: const Color(0xFF006064), + { + 50: Color(0xFFE0F7FA), + 100: Color(0xFFB2EBF2), + 200: Color(0xFF80DEEA), + 300: Color(0xFF4DD0E1), + 400: Color(0xFF26C6DA), + 500: Color(_cyanPrimaryValue), + 600: Color(0xFF00ACC1), + 700: Color(0xFF0097A7), + 800: Color(0xFF00838F), + 900: Color(0xFF006064), }, ); static const int _cyanPrimaryValue = 0xFF00BCD4; @@ -1004,13 +1004,13 @@ class Colors { /// * [lightBlueAccent] and [tealAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor cyanAccent = const MaterialAccentColor( + static const MaterialAccentColor cyanAccent = MaterialAccentColor( _cyanAccentPrimaryValue, - const { - 100: const Color(0xFF84FFFF), - 200: const Color(_cyanAccentPrimaryValue), - 400: const Color(0xFF00E5FF), - 700: const Color(0xFF00B8D4), + { + 100: Color(0xFF84FFFF), + 200: Color(_cyanAccentPrimaryValue), + 400: Color(0xFF00E5FF), + 700: Color(0xFF00B8D4), }, ); static const int _cyanAccentPrimaryValue = 0xFF18FFFF; @@ -1041,19 +1041,19 @@ class Colors { /// * [green] and [cyan], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor teal = const MaterialColor( + static const MaterialColor teal = MaterialColor( _tealPrimaryValue, - const { - 50: const Color(0xFFE0F2F1), - 100: const Color(0xFFB2DFDB), - 200: const Color(0xFF80CBC4), - 300: const Color(0xFF4DB6AC), - 400: const Color(0xFF26A69A), - 500: const Color(_tealPrimaryValue), - 600: const Color(0xFF00897B), - 700: const Color(0xFF00796B), - 800: const Color(0xFF00695C), - 900: const Color(0xFF004D40), + { + 50: Color(0xFFE0F2F1), + 100: Color(0xFFB2DFDB), + 200: Color(0xFF80CBC4), + 300: Color(0xFF4DB6AC), + 400: Color(0xFF26A69A), + 500: Color(_tealPrimaryValue), + 600: Color(0xFF00897B), + 700: Color(0xFF00796B), + 800: Color(0xFF00695C), + 900: Color(0xFF004D40), }, ); static const int _tealPrimaryValue = 0xFF009688; @@ -1084,13 +1084,13 @@ class Colors { /// * [greenAccent] and [cyanAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor tealAccent = const MaterialAccentColor( + static const MaterialAccentColor tealAccent = MaterialAccentColor( _tealAccentPrimaryValue, - const { - 100: const Color(0xFFA7FFEB), - 200: const Color(_tealAccentPrimaryValue), - 400: const Color(0xFF1DE9B6), - 700: const Color(0xFF00BFA5), + { + 100: Color(0xFFA7FFEB), + 200: Color(_tealAccentPrimaryValue), + 400: Color(0xFF1DE9B6), + 700: Color(0xFF00BFA5), }, ); static const int _tealAccentPrimaryValue = 0xFF64FFDA; @@ -1124,19 +1124,19 @@ class Colors { /// * [teal], [lightGreen], and [lime], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor green = const MaterialColor( + static const MaterialColor green = MaterialColor( _greenPrimaryValue, - const { - 50: const Color(0xFFE8F5E9), - 100: const Color(0xFFC8E6C9), - 200: const Color(0xFFA5D6A7), - 300: const Color(0xFF81C784), - 400: const Color(0xFF66BB6A), - 500: const Color(_greenPrimaryValue), - 600: const Color(0xFF43A047), - 700: const Color(0xFF388E3C), - 800: const Color(0xFF2E7D32), - 900: const Color(0xFF1B5E20), + { + 50: Color(0xFFE8F5E9), + 100: Color(0xFFC8E6C9), + 200: Color(0xFFA5D6A7), + 300: Color(0xFF81C784), + 400: Color(0xFF66BB6A), + 500: Color(_greenPrimaryValue), + 600: Color(0xFF43A047), + 700: Color(0xFF388E3C), + 800: Color(0xFF2E7D32), + 900: Color(0xFF1B5E20), }, ); static const int _greenPrimaryValue = 0xFF4CAF50; @@ -1170,13 +1170,13 @@ class Colors { /// * [tealAccent], [lightGreenAccent], and [limeAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor greenAccent = const MaterialAccentColor( + static const MaterialAccentColor greenAccent = MaterialAccentColor( _greenAccentPrimaryValue, - const { - 100: const Color(0xFFB9F6CA), - 200: const Color(_greenAccentPrimaryValue), - 400: const Color(0xFF00E676), - 700: const Color(0xFF00C853), + { + 100: Color(0xFFB9F6CA), + 200: Color(_greenAccentPrimaryValue), + 400: Color(0xFF00E676), + 700: Color(0xFF00C853), }, ); static const int _greenAccentPrimaryValue = 0xFF69F0AE; @@ -1207,19 +1207,19 @@ class Colors { /// * [green] and [lime], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor lightGreen = const MaterialColor( + static const MaterialColor lightGreen = MaterialColor( _lightGreenPrimaryValue, - const { - 50: const Color(0xFFF1F8E9), - 100: const Color(0xFFDCEDC8), - 200: const Color(0xFFC5E1A5), - 300: const Color(0xFFAED581), - 400: const Color(0xFF9CCC65), - 500: const Color(_lightGreenPrimaryValue), - 600: const Color(0xFF7CB342), - 700: const Color(0xFF689F38), - 800: const Color(0xFF558B2F), - 900: const Color(0xFF33691E), + { + 50: Color(0xFFF1F8E9), + 100: Color(0xFFDCEDC8), + 200: Color(0xFFC5E1A5), + 300: Color(0xFFAED581), + 400: Color(0xFF9CCC65), + 500: Color(_lightGreenPrimaryValue), + 600: Color(0xFF7CB342), + 700: Color(0xFF689F38), + 800: Color(0xFF558B2F), + 900: Color(0xFF33691E), }, ); static const int _lightGreenPrimaryValue = 0xFF8BC34A; @@ -1250,13 +1250,13 @@ class Colors { /// * [greenAccent] and [limeAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor lightGreenAccent = const MaterialAccentColor( + static const MaterialAccentColor lightGreenAccent = MaterialAccentColor( _lightGreenAccentPrimaryValue, - const { - 100: const Color(0xFFCCFF90), - 200: const Color(_lightGreenAccentPrimaryValue), - 400: const Color(0xFF76FF03), - 700: const Color(0xFF64DD17), + { + 100: Color(0xFFCCFF90), + 200: Color(_lightGreenAccentPrimaryValue), + 400: Color(0xFF76FF03), + 700: Color(0xFF64DD17), }, ); static const int _lightGreenAccentPrimaryValue = 0xFFB2FF59; @@ -1287,19 +1287,19 @@ class Colors { /// * [lightGreen] and [yellow], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor lime = const MaterialColor( + static const MaterialColor lime = MaterialColor( _limePrimaryValue, - const { - 50: const Color(0xFFF9FBE7), - 100: const Color(0xFFF0F4C3), - 200: const Color(0xFFE6EE9C), - 300: const Color(0xFFDCE775), - 400: const Color(0xFFD4E157), - 500: const Color(_limePrimaryValue), - 600: const Color(0xFFC0CA33), - 700: const Color(0xFFAFB42B), - 800: const Color(0xFF9E9D24), - 900: const Color(0xFF827717), + { + 50: Color(0xFFF9FBE7), + 100: Color(0xFFF0F4C3), + 200: Color(0xFFE6EE9C), + 300: Color(0xFFDCE775), + 400: Color(0xFFD4E157), + 500: Color(_limePrimaryValue), + 600: Color(0xFFC0CA33), + 700: Color(0xFFAFB42B), + 800: Color(0xFF9E9D24), + 900: Color(0xFF827717), }, ); static const int _limePrimaryValue = 0xFFCDDC39; @@ -1330,13 +1330,13 @@ class Colors { /// * [lightGreenAccent] and [yellowAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor limeAccent = const MaterialAccentColor( + static const MaterialAccentColor limeAccent = MaterialAccentColor( _limeAccentPrimaryValue, - const { - 100: const Color(0xFFF4FF81), - 200: const Color(_limeAccentPrimaryValue), - 400: const Color(0xFFC6FF00), - 700: const Color(0xFFAEEA00), + { + 100: Color(0xFFF4FF81), + 200: Color(_limeAccentPrimaryValue), + 400: Color(0xFFC6FF00), + 700: Color(0xFFAEEA00), }, ); static const int _limeAccentPrimaryValue = 0xFFEEFF41; @@ -1367,19 +1367,19 @@ class Colors { /// * [lime] and [amber], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor yellow = const MaterialColor( + static const MaterialColor yellow = MaterialColor( _yellowPrimaryValue, - const { - 50: const Color(0xFFFFFDE7), - 100: const Color(0xFFFFF9C4), - 200: const Color(0xFFFFF59D), - 300: const Color(0xFFFFF176), - 400: const Color(0xFFFFEE58), - 500: const Color(_yellowPrimaryValue), - 600: const Color(0xFFFDD835), - 700: const Color(0xFFFBC02D), - 800: const Color(0xFFF9A825), - 900: const Color(0xFFF57F17), + { + 50: Color(0xFFFFFDE7), + 100: Color(0xFFFFF9C4), + 200: Color(0xFFFFF59D), + 300: Color(0xFFFFF176), + 400: Color(0xFFFFEE58), + 500: Color(_yellowPrimaryValue), + 600: Color(0xFFFDD835), + 700: Color(0xFFFBC02D), + 800: Color(0xFFF9A825), + 900: Color(0xFFF57F17), }, ); static const int _yellowPrimaryValue = 0xFFFFEB3B; @@ -1410,13 +1410,13 @@ class Colors { /// * [limeAccent] and [amberAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor yellowAccent = const MaterialAccentColor( + static const MaterialAccentColor yellowAccent = MaterialAccentColor( _yellowAccentPrimaryValue, - const { - 100: const Color(0xFFFFFF8D), - 200: const Color(_yellowAccentPrimaryValue), - 400: const Color(0xFFFFEA00), - 700: const Color(0xFFFFD600), + { + 100: Color(0xFFFFFF8D), + 200: Color(_yellowAccentPrimaryValue), + 400: Color(0xFFFFEA00), + 700: Color(0xFFFFD600), }, ); static const int _yellowAccentPrimaryValue = 0xFFFFFF00; @@ -1447,19 +1447,19 @@ class Colors { /// * [yellow] and [orange], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor amber = const MaterialColor( + static const MaterialColor amber = MaterialColor( _amberPrimaryValue, - const { - 50: const Color(0xFFFFF8E1), - 100: const Color(0xFFFFECB3), - 200: const Color(0xFFFFE082), - 300: const Color(0xFFFFD54F), - 400: const Color(0xFFFFCA28), - 500: const Color(_amberPrimaryValue), - 600: const Color(0xFFFFB300), - 700: const Color(0xFFFFA000), - 800: const Color(0xFFFF8F00), - 900: const Color(0xFFFF6F00), + { + 50: Color(0xFFFFF8E1), + 100: Color(0xFFFFECB3), + 200: Color(0xFFFFE082), + 300: Color(0xFFFFD54F), + 400: Color(0xFFFFCA28), + 500: Color(_amberPrimaryValue), + 600: Color(0xFFFFB300), + 700: Color(0xFFFFA000), + 800: Color(0xFFFF8F00), + 900: Color(0xFFFF6F00), }, ); static const int _amberPrimaryValue = 0xFFFFC107; @@ -1490,13 +1490,13 @@ class Colors { /// * [yellowAccent] and [orangeAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor amberAccent = const MaterialAccentColor( + static const MaterialAccentColor amberAccent = MaterialAccentColor( _amberAccentPrimaryValue, - const { - 100: const Color(0xFFFFE57F), - 200: const Color(_amberAccentPrimaryValue), - 400: const Color(0xFFFFC400), - 700: const Color(0xFFFFAB00), + { + 100: Color(0xFFFFE57F), + 200: Color(_amberAccentPrimaryValue), + 400: Color(0xFFFFC400), + 700: Color(0xFFFFAB00), }, ); static const int _amberAccentPrimaryValue = 0xFFFFD740; @@ -1529,19 +1529,19 @@ class Colors { /// * [amber], [deepOrange], and [brown], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor orange = const MaterialColor( + static const MaterialColor orange = MaterialColor( _orangePrimaryValue, - const { - 50: const Color(0xFFFFF3E0), - 100: const Color(0xFFFFE0B2), - 200: const Color(0xFFFFCC80), - 300: const Color(0xFFFFB74D), - 400: const Color(0xFFFFA726), - 500: const Color(_orangePrimaryValue), - 600: const Color(0xFFFB8C00), - 700: const Color(0xFFF57C00), - 800: const Color(0xFFEF6C00), - 900: const Color(0xFFE65100), + { + 50: Color(0xFFFFF3E0), + 100: Color(0xFFFFE0B2), + 200: Color(0xFFFFCC80), + 300: Color(0xFFFFB74D), + 400: Color(0xFFFFA726), + 500: Color(_orangePrimaryValue), + 600: Color(0xFFFB8C00), + 700: Color(0xFFF57C00), + 800: Color(0xFFEF6C00), + 900: Color(0xFFE65100), }, ); static const int _orangePrimaryValue = 0xFFFF9800; @@ -1572,13 +1572,13 @@ class Colors { /// * [amberAccent] and [deepOrangeAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor orangeAccent = const MaterialAccentColor( + static const MaterialAccentColor orangeAccent = MaterialAccentColor( _orangeAccentPrimaryValue, - const { - 100: const Color(0xFFFFD180), - 200: const Color(_orangeAccentPrimaryValue), - 400: const Color(0xFFFF9100), - 700: const Color(0xFFFF6D00), + { + 100: Color(0xFFFFD180), + 200: Color(_orangeAccentPrimaryValue), + 400: Color(0xFFFF9100), + 700: Color(0xFFFF6D00), }, ); static const int _orangeAccentPrimaryValue = 0xFFFFAB40; @@ -1611,19 +1611,19 @@ class Colors { /// * [orange], [red], and [brown], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor deepOrange = const MaterialColor( + static const MaterialColor deepOrange = MaterialColor( _deepOrangePrimaryValue, - const { - 50: const Color(0xFFFBE9E7), - 100: const Color(0xFFFFCCBC), - 200: const Color(0xFFFFAB91), - 300: const Color(0xFFFF8A65), - 400: const Color(0xFFFF7043), - 500: const Color(_deepOrangePrimaryValue), - 600: const Color(0xFFF4511E), - 700: const Color(0xFFE64A19), - 800: const Color(0xFFD84315), - 900: const Color(0xFFBF360C), + { + 50: Color(0xFFFBE9E7), + 100: Color(0xFFFFCCBC), + 200: Color(0xFFFFAB91), + 300: Color(0xFFFF8A65), + 400: Color(0xFFFF7043), + 500: Color(_deepOrangePrimaryValue), + 600: Color(0xFFF4511E), + 700: Color(0xFFE64A19), + 800: Color(0xFFD84315), + 900: Color(0xFFBF360C), }, ); static const int _deepOrangePrimaryValue = 0xFFFF5722; @@ -1654,13 +1654,13 @@ class Colors { /// * [orangeAccent] [redAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor deepOrangeAccent = const MaterialAccentColor( + static const MaterialAccentColor deepOrangeAccent = MaterialAccentColor( _deepOrangeAccentPrimaryValue, - const { - 100: const Color(0xFFFF9E80), - 200: const Color(_deepOrangeAccentPrimaryValue), - 400: const Color(0xFFFF3D00), - 700: const Color(0xFFDD2C00), + { + 100: Color(0xFFFF9E80), + 200: Color(_deepOrangeAccentPrimaryValue), + 400: Color(0xFFFF3D00), + 700: Color(0xFFDD2C00), }, ); static const int _deepOrangeAccentPrimaryValue = 0xFFFF6E40; @@ -1689,19 +1689,19 @@ class Colors { /// * [orange] and [blueGrey], vaguely similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor brown = const MaterialColor( + static const MaterialColor brown = MaterialColor( _brownPrimaryValue, - const { - 50: const Color(0xFFEFEBE9), - 100: const Color(0xFFD7CCC8), - 200: const Color(0xFFBCAAA4), - 300: const Color(0xFFA1887F), - 400: const Color(0xFF8D6E63), - 500: const Color(_brownPrimaryValue), - 600: const Color(0xFF6D4C41), - 700: const Color(0xFF5D4037), - 800: const Color(0xFF4E342E), - 900: const Color(0xFF3E2723), + { + 50: Color(0xFFEFEBE9), + 100: Color(0xFFD7CCC8), + 200: Color(0xFFBCAAA4), + 300: Color(0xFFA1887F), + 400: Color(0xFF8D6E63), + 500: Color(_brownPrimaryValue), + 600: Color(0xFF6D4C41), + 700: Color(0xFF5D4037), + 800: Color(0xFF4E342E), + 900: Color(0xFF3E2723), }, ); static const int _brownPrimaryValue = 0xFF795548; @@ -1737,21 +1737,21 @@ class Colors { /// provide a different approach to showing shades of grey. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor grey = const MaterialColor( + static const MaterialColor grey = MaterialColor( _greyPrimaryValue, - const { - 50: const Color(0xFFFAFAFA), - 100: const Color(0xFFF5F5F5), - 200: const Color(0xFFEEEEEE), - 300: const Color(0xFFE0E0E0), - 350: const Color(0xFFD6D6D6), // only for raised button while pressed in light theme - 400: const Color(0xFFBDBDBD), - 500: const Color(_greyPrimaryValue), - 600: const Color(0xFF757575), - 700: const Color(0xFF616161), - 800: const Color(0xFF424242), - 850: const Color(0xFF303030), // only for background color in dark theme - 900: const Color(0xFF212121), + { + 50: Color(0xFFFAFAFA), + 100: Color(0xFFF5F5F5), + 200: Color(0xFFEEEEEE), + 300: Color(0xFFE0E0E0), + 350: Color(0xFFD6D6D6), // only for raised button while pressed in light theme + 400: Color(0xFFBDBDBD), + 500: Color(_greyPrimaryValue), + 600: Color(0xFF757575), + 700: Color(0xFF616161), + 800: Color(0xFF424242), + 850: Color(0xFF303030), // only for background color in dark theme + 900: Color(0xFF212121), }, ); static const int _greyPrimaryValue = 0xFF9E9E9E; @@ -1782,25 +1782,25 @@ class Colors { /// * [grey], [cyan], and [blue], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor blueGrey = const MaterialColor( + static const MaterialColor blueGrey = MaterialColor( _blueGreyPrimaryValue, - const { - 50: const Color(0xFFECEFF1), - 100: const Color(0xFFCFD8DC), - 200: const Color(0xFFB0BEC5), - 300: const Color(0xFF90A4AE), - 400: const Color(0xFF78909C), - 500: const Color(_blueGreyPrimaryValue), - 600: const Color(0xFF546E7A), - 700: const Color(0xFF455A64), - 800: const Color(0xFF37474F), - 900: const Color(0xFF263238), + { + 50: Color(0xFFECEFF1), + 100: Color(0xFFCFD8DC), + 200: Color(0xFFB0BEC5), + 300: Color(0xFF90A4AE), + 400: Color(0xFF78909C), + 500: Color(_blueGreyPrimaryValue), + 600: Color(0xFF546E7A), + 700: Color(0xFF455A64), + 800: Color(0xFF37474F), + 900: Color(0xFF263238), }, ); static const int _blueGreyPrimaryValue = 0xFF607D8B; /// The material design primary color swatches, excluding grey. - static const List primaries = const [ + static const List primaries = [ red, pink, purple, @@ -1825,7 +1825,7 @@ class Colors { ]; /// The material design accent color swatches. - static const List accents = const [ + static const List accents = [ redAccent, pinkAccent, purpleAccent, From 868f06dd15f2a69e38b7090088d3141fce62e600 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Thu, 6 Sep 2018 12:59:01 -0700 Subject: [PATCH 34/66] change expand icon to use default icon colors (#21328) --- packages/flutter/lib/src/material/colors.dart | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 3c71007b6791..dcf3909c9205 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -321,6 +321,19 @@ class Colors { /// but with different opacities. static const Color white70 = Color(0xB3FFFFFF); + /// White with 54% opacity. + /// + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.whites.png) + /// + /// See also: + /// + /// * [ExpandIcon], which uses this color for dark themes. + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. + /// * [white, white30, white12, white10], which are variants on this color + /// but with different opacities. + static const Color white54 = Color(0x8AFFFFFF); + /// White with 32% opacity. /// /// Used for disabled radio buttons and the text of disabled flat buttons in dark themes. From 46d1fa33de360d89e136ea65ce0969af9b47d988 Mon Sep 17 00:00:00 2001 From: Alexandre Ardhuin Date: Fri, 7 Sep 2018 11:00:05 +0200 Subject: [PATCH 35/66] lint unnecessary_new on samples (#21539) * lint unnecessary_new on samples * fix tests --- packages/flutter/lib/src/material/colors.dart | 72 +++++++++---------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index dcf3909c9205..5bd7af124cbb 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -116,7 +116,7 @@ class MaterialAccentColor extends ColorSwatch { /// Each [ColorSwatch] constant is a color and can used directly. For example: /// /// ```dart -/// new Container( +/// Container( /// color: Colors.blue, // same as Colors.blue[500] or Colors.blue.shade500 /// ) /// ``` @@ -398,7 +398,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.red[400], /// ) @@ -441,7 +441,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.redAccent[400], /// ) @@ -478,7 +478,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.pink[400], /// ) @@ -521,7 +521,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.pinkAccent[400], /// ) @@ -558,7 +558,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.purple[400], /// ) @@ -601,7 +601,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.purpleAccent[400], /// ) @@ -638,7 +638,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.deepPurple[400], /// ) @@ -681,7 +681,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.deepPurpleAccent[400], /// ) @@ -718,7 +718,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.indigo[400], /// ) @@ -761,7 +761,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.indigoAccent[400], /// ) @@ -800,7 +800,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.blue[400], /// ) @@ -843,7 +843,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.blueAccent[400], /// ) @@ -880,7 +880,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.lightBlue[400], /// ) @@ -923,7 +923,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.lightBlueAccent[400], /// ) @@ -962,7 +962,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.cyan[400], /// ) @@ -1005,7 +1005,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.cyanAccent[400], /// ) @@ -1042,7 +1042,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.teal[400], /// ) @@ -1085,7 +1085,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.tealAccent[400], /// ) @@ -1125,7 +1125,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.green[400], /// ) @@ -1171,7 +1171,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.greenAccent[400], /// ) @@ -1208,7 +1208,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.lightGreen[400], /// ) @@ -1251,7 +1251,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.lightGreenAccent[400], /// ) @@ -1288,7 +1288,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.lime[400], /// ) @@ -1331,7 +1331,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.limeAccent[400], /// ) @@ -1368,7 +1368,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.yellow[400], /// ) @@ -1411,7 +1411,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.yellowAccent[400], /// ) @@ -1448,7 +1448,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.amber[400], /// ) @@ -1491,7 +1491,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.amberAccent[400], /// ) @@ -1530,7 +1530,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.orange[400], /// ) @@ -1573,7 +1573,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.orangeAccent[400], /// ) @@ -1612,7 +1612,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.deepOrange[400], /// ) @@ -1655,7 +1655,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.deepOrangeAccent[400], /// ) @@ -1691,7 +1691,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.brown[400], /// ) @@ -1737,7 +1737,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.grey[400], /// ) @@ -1784,7 +1784,7 @@ class Colors { /// ## Sample code /// /// ```dart - /// new Icon( + /// Icon( /// Icons.widgets, /// color: Colors.blueGrey[400], /// ) From 7db481a9b3e0be66594c85a2c3b29402a5781d82 Mon Sep 17 00:00:00 2001 From: Greg Spencer Date: Wed, 7 Nov 2018 20:35:10 -0800 Subject: [PATCH 36/66] Convert existing '## Sample code' samples to '{@tool sample}...{@end-tool}' form. (#24077) This converts existing ## Sample code samples to {@tool sample}...{@end-tool} form. Also: 1. Fixed a minor bug in analyze-sample-code.dart 2. Made the snippet tool only insert descriptions if the description is non-empty. 3. Moved the Card diagram to before the code sample. --- packages/flutter/lib/src/material/colors.dart | 110 ++++++++++++------ 1 file changed, 74 insertions(+), 36 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 5bd7af124cbb..7b694ae7bb9c 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -104,7 +104,7 @@ class MaterialAccentColor extends ColorSwatch { /// In addition, a series of blacks and whites with common opacities are /// available. For example, [black54] is a pure black with 54% opacity. /// -/// ## Sample code +/// {@tool sample} /// /// To select a specific color from one of the swatches, index into the swatch /// using an integer for the specific color desired, as follows: @@ -112,6 +112,8 @@ class MaterialAccentColor extends ColorSwatch { /// ```dart /// Color selection = Colors.green[400]; // Selects a mid-range green. /// ``` +/// {@end-tool} +/// {@tool sample} /// /// Each [ColorSwatch] constant is a color and can used directly. For example: /// @@ -120,6 +122,7 @@ class MaterialAccentColor extends ColorSwatch { /// color: Colors.blue, // same as Colors.blue[500] or Colors.blue.shade500 /// ) /// ``` +/// {@end-tool} /// /// ## Color palettes /// @@ -395,7 +398,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pink.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pinkAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -403,6 +406,7 @@ class Colors { /// color: Colors.red[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -438,7 +442,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pink.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pinkAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -446,6 +450,7 @@ class Colors { /// color: Colors.redAccent[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -475,7 +480,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.purple.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.purpleAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -483,6 +488,7 @@ class Colors { /// color: Colors.pink[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -518,7 +524,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.purple.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.purpleAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -526,6 +532,7 @@ class Colors { /// color: Colors.pinkAccent[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -555,7 +562,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pink.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pinkAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -563,6 +570,7 @@ class Colors { /// color: Colors.purple[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -598,7 +606,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pink.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pinkAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -606,6 +614,7 @@ class Colors { /// color: Colors.purpleAccent[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -635,7 +644,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.indigo.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.indigoAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -643,6 +652,7 @@ class Colors { /// color: Colors.deepPurple[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -678,7 +688,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.indigo.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.indigoAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -686,6 +696,7 @@ class Colors { /// color: Colors.deepPurpleAccent[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -715,7 +726,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepPurple.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepPurpleAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -723,6 +734,7 @@ class Colors { /// color: Colors.indigo[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -758,7 +770,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepPurple.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepPurpleAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -766,6 +778,7 @@ class Colors { /// color: Colors.indigoAccent[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -797,7 +810,7 @@ class Colors { /// /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blueGrey.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -805,6 +818,7 @@ class Colors { /// color: Colors.blue[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -840,7 +854,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightBlue.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightBlueAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -848,6 +862,7 @@ class Colors { /// color: Colors.blueAccent[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -877,7 +892,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyan.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyanAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -885,6 +900,7 @@ class Colors { /// color: Colors.lightBlue[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -920,7 +936,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyan.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyanAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -928,6 +944,7 @@ class Colors { /// color: Colors.lightBlueAccent[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -959,7 +976,7 @@ class Colors { /// /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blueGrey.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -967,6 +984,7 @@ class Colors { /// color: Colors.cyan[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -1002,7 +1020,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.teal.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.tealAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -1010,6 +1028,7 @@ class Colors { /// color: Colors.cyanAccent[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -1039,7 +1058,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyan.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyanAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -1047,6 +1066,7 @@ class Colors { /// color: Colors.teal[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -1082,7 +1102,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyan.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyanAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -1090,6 +1110,7 @@ class Colors { /// color: Colors.tealAccent[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -1122,7 +1143,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lime.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.limeAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -1130,6 +1151,7 @@ class Colors { /// color: Colors.green[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -1168,7 +1190,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lime.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.limeAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -1176,6 +1198,7 @@ class Colors { /// color: Colors.greenAccent[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -1205,7 +1228,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lime.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.limeAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -1213,6 +1236,7 @@ class Colors { /// color: Colors.lightGreen[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -1248,7 +1272,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lime.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.limeAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -1256,6 +1280,7 @@ class Colors { /// color: Colors.lightGreenAccent[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -1285,7 +1310,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.yellow.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.yellowAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -1293,6 +1318,7 @@ class Colors { /// color: Colors.lime[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -1328,7 +1354,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.yellow.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.yellowAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -1336,6 +1362,7 @@ class Colors { /// color: Colors.limeAccent[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -1365,7 +1392,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.amber.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.amberAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -1373,6 +1400,7 @@ class Colors { /// color: Colors.yellow[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -1408,7 +1436,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.amber.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.amberAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -1416,6 +1444,7 @@ class Colors { /// color: Colors.yellowAccent[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -1445,7 +1474,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.orange.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.orangeAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -1453,6 +1482,7 @@ class Colors { /// color: Colors.amber[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -1488,7 +1518,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.orange.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.orangeAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -1496,6 +1526,7 @@ class Colors { /// color: Colors.amberAccent[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -1527,7 +1558,7 @@ class Colors { /// /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.brown.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -1535,6 +1566,7 @@ class Colors { /// color: Colors.orange[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -1570,7 +1602,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepOrange.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepOrangeAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -1578,6 +1610,7 @@ class Colors { /// color: Colors.orangeAccent[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -1609,7 +1642,7 @@ class Colors { /// /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.brown.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -1617,6 +1650,7 @@ class Colors { /// color: Colors.deepOrange[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -1652,7 +1686,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.red.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.redAccent.png) /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -1660,6 +1694,7 @@ class Colors { /// color: Colors.deepOrangeAccent[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -1688,7 +1723,7 @@ class Colors { /// /// This swatch has no corresponding accent color and swatch. /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -1696,6 +1731,7 @@ class Colors { /// color: Colors.brown[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -1734,7 +1770,7 @@ class Colors { /// used for raised button while pressed in light themes, and 850 is used for /// the background color of the dark theme. See [ThemeData.brightness]. /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -1742,6 +1778,7 @@ class Colors { /// color: Colors.grey[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// @@ -1781,7 +1818,7 @@ class Colors { /// /// This swatch has no corresponding accent swatch. /// - /// ## Sample code + /// {@tool sample} /// /// ```dart /// Icon( @@ -1789,6 +1826,7 @@ class Colors { /// color: Colors.blueGrey[400], /// ) /// ``` + /// {@end-tool} /// /// See also: /// From d76a07d856801826e2aaf93d168915e773f5fe5c Mon Sep 17 00:00:00 2001 From: MhdHejazi Date: Fri, 1 Feb 2019 21:14:48 +0300 Subject: [PATCH 37/66] #19060 Update material.google.com links to material.io (#26807) --- packages/flutter/lib/src/material/colors.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 7b694ae7bb9c..d2414a3b778d 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -89,7 +89,7 @@ class MaterialAccentColor extends ColorSwatch { } /// [Color] and [ColorSwatch] constants which represent Material design's -/// [color palette](http://material.google.com/style/color.html). +/// [color palette](https://material.io/design/color/). /// /// Instead of using an absolute color from these palettes, consider using /// [Theme.of] to obtain the local [ThemeData] structure, which exposes the From 412064e5d5f6da0682d7d40c32e178fde7b1c35f Mon Sep 17 00:00:00 2001 From: Shi-Hao Hong Date: Fri, 24 May 2019 09:06:23 -0700 Subject: [PATCH 38/66] ExpandIcon Custom Colors (#33148) * Implement ExpandIcon custom color, expandedColor, and disabledColor * Update to use pumpAndSettle instead of hard-coded duration * Update colors to unfocused state, added dark mode test to active state * Fix Colors.white30 doc opacity value * Add links to Material Design specifications to color, expandedColor and disabledColor * Update API docs to reference dark theme material page --- packages/flutter/lib/src/material/colors.dart | 39 +++++++++++++------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index d2414a3b778d..7f2131d6c0b1 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -242,8 +242,6 @@ class Colors { /// Black with 45% opacity. /// - /// Used for disabled icons. - /// /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blacks.png) /// /// See also: @@ -254,7 +252,9 @@ class Colors { /// Black with 38% opacity. /// - /// Used for the placeholder text in data tables in light themes. + /// For light themes, i.e. when the Theme's [ThemeData.brightness] is + /// [Brightness.light], this color is used for disabled icons and for + /// placeholder text in [DataTable]. /// /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blacks.png) /// @@ -303,7 +303,7 @@ class Colors { /// * [Typography.white], which uses this color for its text styles. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - /// * [white70, white30, white12, white10], which are variants on this color + /// * [white70, white60, white54, white30, white12, white10], which are variants on this color /// but with different opacities. /// * [black], a solid black color. /// * [transparent], a fully-transparent color. @@ -320,11 +320,14 @@ class Colors { /// * [Typography.white], which uses this color for its text styles. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - /// * [white, white30, white12, white10], which are variants on this color + /// * [white, white60, white54, white30, white12, white10], which are variants on this color /// but with different opacities. static const Color white70 = Color(0xB3FFFFFF); - /// White with 54% opacity. + /// White with 60% opacity. + /// + /// Used for medium-emphasis text and hint text when [Theme.brightness] is + /// set to [Brightness.dark]. /// /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.whites.png) /// @@ -333,11 +336,23 @@ class Colors { /// * [ExpandIcon], which uses this color for dark themes. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - /// * [white, white30, white12, white10], which are variants on this color + /// * [white, white54, white30, white12, white10], which are variants on this color + /// but with different opacities. + static const Color white60 = Color(0x99FFFFFF); + + /// White with 54% opacity. + /// + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.whites.png) + /// + /// See also: + /// + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. + /// * [white, white60, white30, white12, white10], which are variants on this color /// but with different opacities. static const Color white54 = Color(0x8AFFFFFF); - /// White with 32% opacity. + /// White with 30% opacity. /// /// Used for disabled radio buttons and the text of disabled flat buttons in dark themes. /// @@ -348,7 +363,7 @@ class Colors { /// * [ThemeData.disabledColor], which uses this color by default in dark themes. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - /// * [white, white70, white12, white10], which are variants on this color + /// * [white, white60, white54, white70, white12, white10], which are variants on this color /// but with different opacities. static const Color white30 = Color(0x4DFFFFFF); @@ -360,7 +375,7 @@ class Colors { /// /// See also: /// - /// * [white, white70, white30, white10], which are variants on this color + /// * [white, white60, white54, white70, white30, white10], which are variants on this color /// but with different opacities. static const Color white24 = Color(0x3DFFFFFF); @@ -372,7 +387,7 @@ class Colors { /// /// See also: /// - /// * [white, white70, white30, white10], which are variants on this color + /// * [white, white60, white54, white70, white30, white10], which are variants on this color /// but with different opacities. static const Color white12 = Color(0x1FFFFFFF); @@ -382,7 +397,7 @@ class Colors { /// /// See also: /// - /// * [white, white70, white30, white12], which are variants on this color + /// * [white, white60, white54, white70, white30, white12], which are variants on this color /// but with different opacities. /// * [transparent], a fully-transparent color, not far from this one. static const Color white10 = Color(0x1AFFFFFF); From cfa1fbbc81c3b48986e19a8b392630d17c7438b3 Mon Sep 17 00:00:00 2001 From: Shi-Hao Hong Date: Wed, 10 Jul 2019 08:50:24 -0700 Subject: [PATCH 39/66] Update Dark Theme disabledColor to White38 (#35136) * Add Colors.white38 * Update ThemeData.disabledColor and ButtonThemeData.disabledColor to Colors.white38 * Update pre-existing tests to expect Colors.white38 instead of Colors.white30 * Update API documentation to reflect these changes --- packages/flutter/lib/src/material/colors.dart | 30 +++++++++++++------ 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 7f2131d6c0b1..6c2fbd75cd49 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -303,7 +303,7 @@ class Colors { /// * [Typography.white], which uses this color for its text styles. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - /// * [white70, white60, white54, white30, white12, white10], which are variants on this color + /// * [white70, white60, white54, white38, white30, white12, white10], which are variants on this color /// but with different opacities. /// * [black], a solid black color. /// * [transparent], a fully-transparent color. @@ -320,7 +320,7 @@ class Colors { /// * [Typography.white], which uses this color for its text styles. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - /// * [white, white60, white54, white30, white12, white10], which are variants on this color + /// * [white, white60, white54, white38, white30, white12, white10], which are variants on this color /// but with different opacities. static const Color white70 = Color(0xB3FFFFFF); @@ -336,7 +336,7 @@ class Colors { /// * [ExpandIcon], which uses this color for dark themes. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - /// * [white, white54, white30, white12, white10], which are variants on this color + /// * [white, white54, white30, white38, white12, white10], which are variants on this color /// but with different opacities. static const Color white60 = Color(0x99FFFFFF); @@ -348,11 +348,11 @@ class Colors { /// /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - /// * [white, white60, white30, white12, white10], which are variants on this color + /// * [white, white60, white38, white30, white12, white10], which are variants on this color /// but with different opacities. static const Color white54 = Color(0x8AFFFFFF); - /// White with 30% opacity. + /// White with 38% opacity. /// /// Used for disabled radio buttons and the text of disabled flat buttons in dark themes. /// @@ -363,7 +363,19 @@ class Colors { /// * [ThemeData.disabledColor], which uses this color by default in dark themes. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - /// * [white, white60, white54, white70, white12, white10], which are variants on this color + /// * [white, white60, white54, white70, white30, white12, white10], which are variants on this color + /// but with different opacities. + static const Color white38 = Color(0x62FFFFFF); + + /// White with 30% opacity. + /// + /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.whites.png) + /// + /// See also: + /// + /// * [Theme.of], which allows you to select colors from the current theme + /// rather than hard-coding colors in your build methods. + /// * [white, white60, white54, white70, white38, white12, white10], which are variants on this color /// but with different opacities. static const Color white30 = Color(0x4DFFFFFF); @@ -375,7 +387,7 @@ class Colors { /// /// See also: /// - /// * [white, white60, white54, white70, white30, white10], which are variants on this color + /// * [white, white60, white54, white70, white38, white30, white10], which are variants on this color /// but with different opacities. static const Color white24 = Color(0x3DFFFFFF); @@ -387,7 +399,7 @@ class Colors { /// /// See also: /// - /// * [white, white60, white54, white70, white30, white10], which are variants on this color + /// * [white, white60, white54, white70, white38, white30, white10], which are variants on this color /// but with different opacities. static const Color white12 = Color(0x1FFFFFFF); @@ -397,7 +409,7 @@ class Colors { /// /// See also: /// - /// * [white, white60, white54, white70, white30, white12], which are variants on this color + /// * [white, white60, white54, white70, white38, white30, white12], which are variants on this color /// but with different opacities. /// * [transparent], a fully-transparent color, not far from this one. static const Color white10 = Color(0x1AFFFFFF); From bf6bccd8f8282a23d72f4d3f3560fea0b151d4f2 Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Wed, 27 Nov 2019 15:04:02 -0800 Subject: [PATCH 40/66] License update (#45373) * Update project.pbxproj files to say Flutter rather than Chromium Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright. * Update the copyright notice checker to require a standard notice on all files * Update copyrights on Dart files. (This was a mechanical commit.) * Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine. Some were already marked "The Flutter Authors", not clear why. Their dates have been normalized. Some were missing the blank line after the license. Some were randomly different in trivial ways for no apparent reason (e.g. missing the trailing period). * Clean up the copyrights in non-Dart files. (Manual edits.) Also, make sure templates don't have copyrights. * Fix some more ORGANIZATIONNAMEs --- packages/flutter/lib/src/material/colors.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 6c2fbd75cd49..00a5964bf81b 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -1,4 +1,4 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. +// Copyright 2014 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. From 8a9cff282ed36f8b621010f9887890503e60e2f8 Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Tue, 7 Jan 2020 12:03:03 -0800 Subject: [PATCH 41/66] Mark unused but desired private constructors as such (#46200) --- packages/flutter/lib/src/material/colors.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 00a5964bf81b..bd141a273707 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -192,6 +192,9 @@ class MaterialAccentColor extends ColorSwatch { /// The [Colors.transparent] color isn't shown here because it is entirely /// invisible! class Colors { + // This class is not meant to be instatiated or extended; this constructor + // prevents instantiation and extension. + // ignore: unused_element Colors._(); /// Completely invisible. From 71d722cd9f4f678228ad0f0708fc76094ae50c8b Mon Sep 17 00:00:00 2001 From: Greg Spencer Date: Wed, 8 Jan 2020 15:28:02 -0800 Subject: [PATCH 42/66] Reverse the sense of the terms snippet and sample. (#48254) --- packages/flutter/lib/src/material/colors.dart | 74 +++++++++---------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index bd141a273707..d23ebc2dc4dd 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -104,7 +104,7 @@ class MaterialAccentColor extends ColorSwatch { /// In addition, a series of blacks and whites with common opacities are /// available. For example, [black54] is a pure black with 54% opacity. /// -/// {@tool sample} +/// {@tool snippet} /// /// To select a specific color from one of the swatches, index into the swatch /// using an integer for the specific color desired, as follows: @@ -113,7 +113,7 @@ class MaterialAccentColor extends ColorSwatch { /// Color selection = Colors.green[400]; // Selects a mid-range green. /// ``` /// {@end-tool} -/// {@tool sample} +/// {@tool snippet} /// /// Each [ColorSwatch] constant is a color and can used directly. For example: /// @@ -428,7 +428,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pink.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pinkAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -472,7 +472,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pink.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pinkAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -510,7 +510,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.purple.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.purpleAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -554,7 +554,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.purple.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.purpleAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -592,7 +592,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pink.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pinkAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -636,7 +636,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pink.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.pinkAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -674,7 +674,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.indigo.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.indigoAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -718,7 +718,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.indigo.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.indigoAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -756,7 +756,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepPurple.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepPurpleAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -800,7 +800,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepPurple.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepPurpleAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -840,7 +840,7 @@ class Colors { /// /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blueGrey.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -884,7 +884,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightBlue.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lightBlueAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -922,7 +922,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyan.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyanAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -966,7 +966,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyan.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyanAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -1006,7 +1006,7 @@ class Colors { /// /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blueGrey.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -1050,7 +1050,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.teal.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.tealAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -1088,7 +1088,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyan.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyanAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -1132,7 +1132,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyan.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.cyanAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -1173,7 +1173,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lime.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.limeAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -1220,7 +1220,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lime.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.limeAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -1258,7 +1258,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lime.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.limeAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -1302,7 +1302,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.lime.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.limeAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -1340,7 +1340,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.yellow.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.yellowAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -1384,7 +1384,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.yellow.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.yellowAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -1422,7 +1422,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.amber.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.amberAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -1466,7 +1466,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.amber.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.amberAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -1504,7 +1504,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.orange.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.orangeAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -1548,7 +1548,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.orange.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.orangeAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -1588,7 +1588,7 @@ class Colors { /// /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.brown.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -1632,7 +1632,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepOrange.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.deepOrangeAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -1672,7 +1672,7 @@ class Colors { /// /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.brown.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -1716,7 +1716,7 @@ class Colors { /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.red.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.redAccent.png) /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -1753,7 +1753,7 @@ class Colors { /// /// This swatch has no corresponding accent color and swatch. /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -1800,7 +1800,7 @@ class Colors { /// used for raised button while pressed in light themes, and 850 is used for /// the background color of the dark theme. See [ThemeData.brightness]. /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( @@ -1848,7 +1848,7 @@ class Colors { /// /// This swatch has no corresponding accent swatch. /// - /// {@tool sample} + /// {@tool snippet} /// /// ```dart /// Icon( From f73d1da2ae89097b169c62a8fa3d227c06841df3 Mon Sep 17 00:00:00 2001 From: Darren Austin Date: Thu, 11 Jun 2020 05:10:01 -0700 Subject: [PATCH 43/66] Typo fixing sweep through packages/flutter. (#59219) --- packages/flutter/lib/src/material/colors.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index d23ebc2dc4dd..a4f2f8ce4d11 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -192,7 +192,7 @@ class MaterialAccentColor extends ColorSwatch { /// The [Colors.transparent] color isn't shown here because it is entirely /// invisible! class Colors { - // This class is not meant to be instatiated or extended; this constructor + // This class is not meant to be instantiated or extended; this constructor // prevents instantiation and extension. // ignore: unused_element Colors._(); From 0bcceaf082a6359a68d67018683019786e04eeb2 Mon Sep 17 00:00:00 2001 From: Alexandre Ardhuin Date: Thu, 11 Jun 2020 14:11:30 +0200 Subject: [PATCH 44/66] Opt out nnbd in packages/flutter (#59186) * add language version 2.8 in packages/flutter * enable non-nullable analyzer flag --- packages/flutter/lib/src/material/colors.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index a4f2f8ce4d11..ec11c7a91334 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// @dart = 2.8 + import 'dart:ui' show Color; import 'package:flutter/painting.dart'; From 85bbc48582033e65c6c9ab6b97315105eb9f6266 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Wed, 29 Jul 2020 10:21:04 -0700 Subject: [PATCH 45/66] Fix 'unresolved doc reference' for material A-D (#62473) --- packages/flutter/lib/src/material/colors.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index ec11c7a91334..46510ac881f1 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -331,7 +331,7 @@ class Colors { /// White with 60% opacity. /// - /// Used for medium-emphasis text and hint text when [Theme.brightness] is + /// Used for medium-emphasis text and hint text when [ThemeData.brightness] is /// set to [Brightness.dark]. /// /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.whites.png) From dc7937b465ae2f9c2474a9bba61746bf51d15304 Mon Sep 17 00:00:00 2001 From: Filip Hracek Date: Tue, 11 Aug 2020 14:46:04 -0700 Subject: [PATCH 46/66] =?UTF-8?q?Add=20=E2=80=9CSee=20also=E2=80=9D=20link?= =?UTF-8?q?s=20to=20favorite=20class=20API=20docs=20(#62805)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/flutter/lib/src/material/colors.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 46510ac881f1..1e3d14e532ab 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -193,6 +193,10 @@ class MaterialAccentColor extends ColorSwatch { /// /// The [Colors.transparent] color isn't shown here because it is entirely /// invisible! +/// +/// See also: +/// +/// * Cookbook: [Use themes to share colors and font styles](https://flutter.dev/docs/cookbook/design/themes) class Colors { // This class is not meant to be instantiated or extended; this constructor // prevents instantiation and extension. From 1e17190bdfe0839ca435a8b8d1a9de5222150533 Mon Sep 17 00:00:00 2001 From: Alexandre Ardhuin Date: Mon, 28 Sep 2020 22:57:04 +0200 Subject: [PATCH 47/66] migration of material files to nullsafety (#66633) --- packages/flutter/lib/src/material/colors.dart | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 1e3d14e532ab..12a08f16269e 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// @dart = 2.8 - import 'dart:ui' show Color; import 'package:flutter/painting.dart'; @@ -27,34 +25,34 @@ class MaterialColor extends ColorSwatch { const MaterialColor(int primary, Map swatch) : super(primary, swatch); /// The lightest shade. - Color get shade50 => this[50]; + Color get shade50 => this[50]!; /// The second lightest shade. - Color get shade100 => this[100]; + Color get shade100 => this[100]!; /// The third lightest shade. - Color get shade200 => this[200]; + Color get shade200 => this[200]!; /// The fourth lightest shade. - Color get shade300 => this[300]; + Color get shade300 => this[300]!; /// The fifth lightest shade. - Color get shade400 => this[400]; + Color get shade400 => this[400]!; /// The default shade. - Color get shade500 => this[500]; + Color get shade500 => this[500]!; /// The fourth darkest shade. - Color get shade600 => this[600]; + Color get shade600 => this[600]!; /// The third darkest shade. - Color get shade700 => this[700]; + Color get shade700 => this[700]!; /// The second darkest shade. - Color get shade800 => this[800]; + Color get shade800 => this[800]!; /// The darkest shade. - Color get shade900 => this[900]; + Color get shade900 => this[900]!; } /// Defines a single accent color as well a swatch of four shades of the @@ -75,19 +73,19 @@ class MaterialAccentColor extends ColorSwatch { const MaterialAccentColor(int primary, Map swatch) : super(primary, swatch); /// The lightest shade. - Color get shade50 => this[50]; + Color get shade50 => this[50]!; /// The second lightest shade. - Color get shade100 => this[100]; + Color get shade100 => this[100]!; /// The default shade. - Color get shade200 => this[200]; + Color get shade200 => this[200]!; /// The second darkest shade. - Color get shade400 => this[400]; + Color get shade400 => this[400]!; /// The darkest shade. - Color get shade700 => this[700]; + Color get shade700 => this[700]!; } /// [Color] and [ColorSwatch] constants which represent Material design's From 87893ed43d0988b908320ff0f0a19d3198924521 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Fri, 11 Dec 2020 13:39:36 -0800 Subject: [PATCH 48/66] Prepare to migrate API doc samples and snippets to null safety (#72040) --- packages/flutter/lib/src/material/colors.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 12a08f16269e..6e01c88c2c5c 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -6,6 +6,9 @@ import 'dart:ui' show Color; import 'package:flutter/painting.dart'; +// Examples can assume: +// // @dart = 2.9 + /// Defines a single color as well a color swatch with ten shades of the color. /// /// The color's shades are referred to by index. The greater the index, the From 1f88181d790332c23f501fb441783b2d6af33068 Mon Sep 17 00:00:00 2001 From: Darren Austin Date: Mon, 14 Dec 2020 19:03:05 -0800 Subject: [PATCH 49/66] Migrate some material doc samples to null safety. (#72297) --- packages/flutter/lib/src/material/colors.dart | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 6e01c88c2c5c..240f34ebb836 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -6,9 +6,6 @@ import 'dart:ui' show Color; import 'package:flutter/painting.dart'; -// Examples can assume: -// // @dart = 2.9 - /// Defines a single color as well a color swatch with ten shades of the color. /// /// The color's shades are referred to by index. The greater the index, the @@ -113,7 +110,7 @@ class MaterialAccentColor extends ColorSwatch { /// using an integer for the specific color desired, as follows: /// /// ```dart -/// Color selection = Colors.green[400]; // Selects a mid-range green. +/// Color selection = Colors.green[400]!; // Selects a mid-range green. /// ``` /// {@end-tool} /// {@tool snippet} From 191212bace3de7cf96e65c011735e6d831b468ab Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Wed, 27 Jan 2021 15:09:04 -0800 Subject: [PATCH 50/66] Remove "unnecessary" imports. (#74821) --- packages/flutter/lib/src/material/colors.dart | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 240f34ebb836..839d0c2f772d 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:ui' show Color; - import 'package:flutter/painting.dart'; /// Defines a single color as well a color swatch with ten shades of the color. From 1fa20b40b938c7bba583830c62ccb57e24b7fa0a Mon Sep 17 00:00:00 2001 From: Hans Muller Date: Tue, 16 Mar 2021 17:04:00 -0700 Subject: [PATCH 51/66] Removed accentColor refs from API docs (#78375) --- packages/flutter/lib/src/material/colors.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 839d0c2f772d..3dd11afcb272 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -90,9 +90,9 @@ class MaterialAccentColor extends ColorSwatch { /// [color palette](https://material.io/design/color/). /// /// Instead of using an absolute color from these palettes, consider using -/// [Theme.of] to obtain the local [ThemeData] structure, which exposes the -/// colors selected for the current theme, such as [ThemeData.primaryColor] and -/// [ThemeData.accentColor] (among many others). +/// [Theme.of] to obtain the local [ThemeData.colorScheme], which defines +/// the colors that most of the Material components use by default. +/// /// /// Most swatches have colors from 100 to 900 in increments of one hundred, plus /// the color 50. The smaller the number, the more pale the color. The greater From d0c344f15872cb6a71c496bdddfd60c134418d91 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Thu, 18 Mar 2021 13:40:08 -0700 Subject: [PATCH 52/66] Clean up ignores that are not ignoring anything (#78484) --- packages/flutter/lib/src/material/colors.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 3dd11afcb272..b0861f585d41 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -196,7 +196,6 @@ class MaterialAccentColor extends ColorSwatch { class Colors { // This class is not meant to be instantiated or extended; this constructor // prevents instantiation and extension. - // ignore: unused_element Colors._(); /// Completely invisible. From b866c081e31ff7f87746c275977edba4c8aad6d8 Mon Sep 17 00:00:00 2001 From: Janice Collins Date: Mon, 28 Jun 2021 13:11:03 -0700 Subject: [PATCH 53/66] Update flutter doc references to conform to new lookup code restrictions (#85412) --- packages/flutter/lib/src/material/colors.dart | 39 +++++++++++-------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index b0861f585d41..71da21568e20 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -307,8 +307,9 @@ class Colors { /// * [Typography.white], which uses this color for its text styles. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - /// * [white70, white60, white54, white38, white30, white12, white10], which are variants on this color - /// but with different opacities. + /// * [white70], [white60], [white54], [white38], [white30], [white12], + /// [white10], which are variants on this color but with different + /// opacities. /// * [black], a solid black color. /// * [transparent], a fully-transparent color. static const Color white = Color(0xFFFFFFFF); @@ -324,8 +325,9 @@ class Colors { /// * [Typography.white], which uses this color for its text styles. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - /// * [white, white60, white54, white38, white30, white12, white10], which are variants on this color - /// but with different opacities. + /// * [white], [white60], [white54], [white38], [white30], [white12], + /// [white10], which are variants on this color but with different + /// opacities. static const Color white70 = Color(0xB3FFFFFF); /// White with 60% opacity. @@ -340,8 +342,8 @@ class Colors { /// * [ExpandIcon], which uses this color for dark themes. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - /// * [white, white54, white30, white38, white12, white10], which are variants on this color - /// but with different opacities. + /// * [white], [white54], [white30], [white38], [white12], [white10], which + /// are variants on this color but with different opacities. static const Color white60 = Color(0x99FFFFFF); /// White with 54% opacity. @@ -352,8 +354,8 @@ class Colors { /// /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - /// * [white, white60, white38, white30, white12, white10], which are variants on this color - /// but with different opacities. + /// * [white], [white60], [white38], [white30], [white12], [white10], which + /// are variants on this color but with different opacities. static const Color white54 = Color(0x8AFFFFFF); /// White with 38% opacity. @@ -367,8 +369,9 @@ class Colors { /// * [ThemeData.disabledColor], which uses this color by default in dark themes. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - /// * [white, white60, white54, white70, white30, white12, white10], which are variants on this color - /// but with different opacities. + /// * [white], [white60], [white54], [white70], [white30], [white12], + /// [white10], which are variants on this color but with different + /// opacities. static const Color white38 = Color(0x62FFFFFF); /// White with 30% opacity. @@ -379,8 +382,9 @@ class Colors { /// /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - /// * [white, white60, white54, white70, white38, white12, white10], which are variants on this color - /// but with different opacities. + /// * [white], [white60], [white54], [white70], [white38], [white12], + /// [white10], which are variants on this color but with different + /// opacities. static const Color white30 = Color(0x4DFFFFFF); /// White with 24% opacity. @@ -391,7 +395,8 @@ class Colors { /// /// See also: /// - /// * [white, white60, white54, white70, white38, white30, white10], which are variants on this color + /// * [white], [white60], [white54], [white70], [white38], [white30], + /// [white10], which are variants on this color /// but with different opacities. static const Color white24 = Color(0x3DFFFFFF); @@ -403,8 +408,9 @@ class Colors { /// /// See also: /// - /// * [white, white60, white54, white70, white38, white30, white10], which are variants on this color - /// but with different opacities. + /// * [white], [white60], [white54], [white70], [white38], [white30], + /// [white10], which are variants on this color but with different + /// opacities. static const Color white12 = Color(0x1FFFFFFF); /// White with 10% opacity. @@ -413,7 +419,8 @@ class Colors { /// /// See also: /// - /// * [white, white60, white54, white70, white38, white30, white12], which are variants on this color + /// * [white], [white60], [white54], [white70], [white38], [white30], + /// [white12], which are variants on this color /// but with different opacities. /// * [transparent], a fully-transparent color, not far from this one. static const Color white10 = Color(0x1AFFFFFF); From 29735c4bf2e953d784ad2064939df480c246a451 Mon Sep 17 00:00:00 2001 From: Saed Nabil <38998344+Reekoooo@users.noreply.github.com> Date: Wed, 17 Nov 2021 00:53:05 +0200 Subject: [PATCH 54/66] Remove shade50 getter from MaterialAccentColor (#93507) --- packages/flutter/lib/src/material/colors.dart | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 71da21568e20..f112b90e2630 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -71,9 +71,6 @@ class MaterialAccentColor extends ColorSwatch { const MaterialAccentColor(int primary, Map swatch) : super(primary, swatch); /// The lightest shade. - Color get shade50 => this[50]!; - - /// The second lightest shade. Color get shade100 => this[100]!; /// The default shade. From f9f45aafe669e3d522a53a9e5e726006eb81a67e Mon Sep 17 00:00:00 2001 From: Pierre-Louis <6655696+guidezpl@users.noreply.github.com> Date: Mon, 21 Mar 2022 20:18:40 +0100 Subject: [PATCH 55/66] Fix `deprecated_new_in_comment_reference` for `material` library (#100289) * fix deprecated_new_in_comment_reference for `material` library in a future version of the SDK, these will be flagged, fix them now * Update pubspec.yaml --- packages/flutter/lib/src/material/colors.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index f112b90e2630..e764a357c6de 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -17,7 +17,7 @@ class MaterialColor extends ColorSwatch { /// Creates a color swatch with a variety of shades. /// /// The `primary` argument should be the 32 bit ARGB value of one of the - /// values in the swatch, as would be passed to the [new Color] constructor + /// values in the swatch, as would be passed to the [Color.new] constructor /// for that same color, and as is exposed by [value]. (This is distinct from /// the specific index of the color in the swatch.) const MaterialColor(int primary, Map swatch) : super(primary, swatch); From 1ba97d28581aa4e72cca44fd6345d62d02d2a67e Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Wed, 13 Apr 2022 22:38:40 -0700 Subject: [PATCH 56/66] super parameters for framework (#100905) --- packages/flutter/lib/src/material/colors.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index e764a357c6de..f15b00e806ec 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -20,7 +20,7 @@ class MaterialColor extends ColorSwatch { /// values in the swatch, as would be passed to the [Color.new] constructor /// for that same color, and as is exposed by [value]. (This is distinct from /// the specific index of the color in the swatch.) - const MaterialColor(int primary, Map swatch) : super(primary, swatch); + const MaterialColor(super.primary, super.swatch); /// The lightest shade. Color get shade50 => this[50]!; @@ -68,7 +68,7 @@ class MaterialColor extends ColorSwatch { class MaterialAccentColor extends ColorSwatch { /// Creates a color swatch with a variety of shades appropriate for accent /// colors. - const MaterialAccentColor(int primary, Map swatch) : super(primary, swatch); + const MaterialAccentColor(super.primary, super.swatch); /// The lightest shade. Color get shade100 => this[100]!; From 12baa963424171b3ef1e76f8c0d4e81e1c528c5d Mon Sep 17 00:00:00 2001 From: Pierre-Louis <6655696+guidezpl@users.noreply.github.com> Date: Wed, 27 Apr 2022 16:29:06 +0000 Subject: [PATCH 57/66] Fixes documentation inconsistencies around 'material' and 'material design' (#102632) --- packages/flutter/lib/src/material/colors.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index f15b00e806ec..35cdc6f7699f 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -1885,7 +1885,7 @@ class Colors { ); static const int _blueGreyPrimaryValue = 0xFF607D8B; - /// The material design primary color swatches, excluding grey. + /// The Material Design primary color swatches, excluding grey. static const List primaries = [ red, pink, @@ -1910,7 +1910,7 @@ class Colors { blueGrey, ]; - /// The material design accent color swatches. + /// The Material Design accent color swatches. static const List accents = [ redAccent, pinkAccent, From cb84fee4c04ec23c29f0420c45bd45d4e72d3fd4 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Thu, 23 Mar 2023 12:29:18 -0700 Subject: [PATCH 58/66] replace some ._() constructors with class modifiers (#122765) --- packages/flutter/lib/src/material/colors.dart | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 35cdc6f7699f..21c8da4c53c8 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -190,11 +190,7 @@ class MaterialAccentColor extends ColorSwatch { /// See also: /// /// * Cookbook: [Use themes to share colors and font styles](https://flutter.dev/docs/cookbook/design/themes) -class Colors { - // This class is not meant to be instantiated or extended; this constructor - // prevents instantiation and extension. - Colors._(); - +abstract final class Colors { /// Completely invisible. static const Color transparent = Color(0x00000000); From 3e2333c8154093089ee41b3c57430f3bf6812a59 Mon Sep 17 00:00:00 2001 From: Leigha Jarett Date: Thu, 8 Jun 2023 19:00:41 -0400 Subject: [PATCH 59/66] Adding migration guide for Material 3 colors (#128429) Fixes: https://github.com/flutter/flutter/issues/127228 --- packages/flutter/lib/src/material/colors.dart | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 21c8da4c53c8..2fadbd844ed6 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -10,6 +10,83 @@ import 'package:flutter/painting.dart'; /// darker the color. There are 10 valid indices: 50, 100, 200, ..., 900. /// The value of this color should the same the value of index 500 and [shade500]. /// +/// ## Updating to [ColorScheme] +/// +/// The [ColorScheme] is preferred for +/// representing colors in applications that are configured +/// for Material 3 (see [ThemeData.useMaterial3]). +/// For more information on colors in Material 3 see +/// the spec at . +/// +///{@template flutter.material.colors.colorRoles} +/// In Material 3, colors are represented using color roles and +/// corresponding tokens. Each property in the [ColorScheme] class +/// represents one color role as defined in the spec above. +/// {@endtemplate} +/// +/// ### Material 3 Colors in Flutter +/// +///{@template flutter.material.colors.settingColors} +/// Flutter's Material widgets can be assigned colors at the widget level +/// using widget properties, +/// or at the app level using theme classes. +/// +/// For example, you can set the background of the [AppBar] by +/// setting the [AppBar.backgroundColor] to a specific [Color] value. +/// +/// To globally set the AppBar background color for your app, you +/// can set the [ThemeData.appBarTheme] property for your [MaterialApp] +/// using the [ThemeData] class. You can also override +/// the default appearance of all the [AppBar]s in a widget subtree by +/// placing the [AppBarTheme] at the root of the subtree. +/// +/// Alternatively, you can set the [ThemeData.colorScheme] property +/// to a custom [ColorScheme]. This creates a unified [ColorScheme] to be +/// used across the app. The [AppBar.backgroundColor] uses the +/// [ColorScheme.surface] by default. +///{@endtemplate} +/// +/// ### Migrating from [MaterialColor] to [ColorScheme] +/// +/// In most cases, there are new properties in Flutter widgets that +/// accept a [ColorScheme] instead of a [MaterialColor]. +/// +/// For example, you may have previously constructed a [ThemeData] +/// using a primarySwatch: +/// +/// ```dart +/// ThemeData( +/// primarySwatch: Colors.amber, +/// ) +/// ``` +/// +/// In Material 3, you can use the [ColorScheme] class to +/// construct a [ThemeData] with the same color palette +/// by using the [ColorScheme.fromSeed] constructor: +/// +/// ```dart +/// ThemeData( +/// colorScheme: ColorScheme.fromSeed(seedColor: Colors.amber), +/// ) +/// ``` +/// +/// The [ColorScheme.fromSeed] constructor +/// will generate a set of tonal palettes, +/// which are used to create the color scheme. +/// +/// Alternatively you can use the [ColorScheme.fromSwatch] constructor: +/// +/// ```dart +/// ThemeData( +/// colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.amber), +/// ) +/// ``` +/// +/// The [ColorScheme.fromSwatch] constructor will +/// create the color scheme directly from the specific +/// color values used in the [MaterialColor]. +/// +/// /// See also: /// /// * [Colors], which defines all of the standard material colors. From c162f2230afcc4fcb88b35c6450527b6c5b4838c Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Thu, 13 Jun 2024 13:47:23 -0500 Subject: [PATCH 60/66] Update framework and flutter fix flutter.dev/docs links (#150174) Update links in the framework and fix data files to their newest, up-to-date destinations. --- packages/flutter/lib/src/material/colors.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 2fadbd844ed6..2b40ba8da269 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -266,7 +266,7 @@ class MaterialAccentColor extends ColorSwatch { /// /// See also: /// -/// * Cookbook: [Use themes to share colors and font styles](https://flutter.dev/docs/cookbook/design/themes) +/// * Cookbook: [Use themes to share colors and font styles](https://docs.flutter.dev/cookbook/design/themes) abstract final class Colors { /// Completely invisible. static const Color transparent = Color(0x00000000); From 2580000e14ccff5c124cbbe64a54929ddbf25260 Mon Sep 17 00:00:00 2001 From: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com> Date: Mon, 22 Jul 2024 13:50:50 -0700 Subject: [PATCH 61/66] material `docImport`s (#152060) https://github.com/flutter/flutter/issues/150800. I skipped files that contain generated code because the script isn't smart enough, and I did not fix some dubious comment refs. Those will be addressed in a different PR. --- packages/flutter/lib/src/material/colors.dart | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 2b40ba8da269..773b19d98419 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -2,6 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +/// @docImport 'app.dart'; +/// @docImport 'app_bar.dart'; +/// @docImport 'app_bar_theme.dart'; +/// @docImport 'color_scheme.dart'; +/// @docImport 'data_table.dart'; +/// @docImport 'expand_icon.dart'; +/// @docImport 'theme.dart'; +/// @docImport 'theme_data.dart'; +/// @docImport 'typography.dart'; +library; + import 'package:flutter/painting.dart'; /// Defines a single color as well a color swatch with ten shades of the color. From 0f2f237c0d62ab0ea77e9a918bed592f623b3bb2 Mon Sep 17 00:00:00 2001 From: John McDole Date: Tue, 17 Dec 2024 14:30:30 -0800 Subject: [PATCH 62/66] Trigger Build (#160476) Hello Monorepo. From fe7a22d0c536f0a9b30005b07155958c51da835f Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Thu, 19 Dec 2024 12:06:21 -0800 Subject: [PATCH 63/66] Auto-format Framework (#160545) This auto-formats all *.dart files in the repository outside of the `engine` subdirectory and enforces that these files stay formatted with a presubmit check. **Reviewers:** Please carefully review all the commits except for the one titled "formatted". The "formatted" commit was auto-generated by running `dev/tools/format.sh -a -f`. The other commits were hand-crafted to prepare the repo for the formatting change. I recommend reviewing the commits one-by-one via the "Commits" tab and avoiding Github's "Files changed" tab as it will likely slow down your browser because of the size of this PR. --------- Co-authored-by: Kate Lovett Co-authored-by: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com> --- packages/flutter/lib/src/material/colors.dart | 772 ++++++++---------- 1 file changed, 341 insertions(+), 431 deletions(-) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 773b19d98419..29b135a953ea 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -533,21 +533,18 @@ abstract final class Colors { /// * [deepOrange] and [pink], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor red = MaterialColor( - _redPrimaryValue, - { - 50: Color(0xFFFFEBEE), - 100: Color(0xFFFFCDD2), - 200: Color(0xFFEF9A9A), - 300: Color(0xFFE57373), - 400: Color(0xFFEF5350), - 500: Color(_redPrimaryValue), - 600: Color(0xFFE53935), - 700: Color(0xFFD32F2F), - 800: Color(0xFFC62828), - 900: Color(0xFFB71C1C), - }, - ); + static const MaterialColor red = MaterialColor(_redPrimaryValue, { + 50: Color(0xFFFFEBEE), + 100: Color(0xFFFFCDD2), + 200: Color(0xFFEF9A9A), + 300: Color(0xFFE57373), + 400: Color(0xFFEF5350), + 500: Color(_redPrimaryValue), + 600: Color(0xFFE53935), + 700: Color(0xFFD32F2F), + 800: Color(0xFFC62828), + 900: Color(0xFFB71C1C), + }); static const int _redPrimaryValue = 0xFFF44336; /// The red accent swatch. @@ -577,15 +574,12 @@ abstract final class Colors { /// * [deepOrangeAccent] and [pinkAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor redAccent = MaterialAccentColor( - _redAccentValue, - { - 100: Color(0xFFFF8A80), - 200: Color(_redAccentValue), - 400: Color(0xFFFF1744), - 700: Color(0xFFD50000), - }, - ); + static const MaterialAccentColor redAccent = MaterialAccentColor(_redAccentValue, { + 100: Color(0xFFFF8A80), + 200: Color(_redAccentValue), + 400: Color(0xFFFF1744), + 700: Color(0xFFD50000), + }); static const int _redAccentValue = 0xFFFF5252; /// The pink primary color and swatch. @@ -615,21 +609,18 @@ abstract final class Colors { /// * [red] and [purple], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor pink = MaterialColor( - _pinkPrimaryValue, - { - 50: Color(0xFFFCE4EC), - 100: Color(0xFFF8BBD0), - 200: Color(0xFFF48FB1), - 300: Color(0xFFF06292), - 400: Color(0xFFEC407A), - 500: Color(_pinkPrimaryValue), - 600: Color(0xFFD81B60), - 700: Color(0xFFC2185B), - 800: Color(0xFFAD1457), - 900: Color(0xFF880E4F), - }, - ); + static const MaterialColor pink = MaterialColor(_pinkPrimaryValue, { + 50: Color(0xFFFCE4EC), + 100: Color(0xFFF8BBD0), + 200: Color(0xFFF48FB1), + 300: Color(0xFFF06292), + 400: Color(0xFFEC407A), + 500: Color(_pinkPrimaryValue), + 600: Color(0xFFD81B60), + 700: Color(0xFFC2185B), + 800: Color(0xFFAD1457), + 900: Color(0xFF880E4F), + }); static const int _pinkPrimaryValue = 0xFFE91E63; /// The pink accent color swatch. @@ -659,15 +650,13 @@ abstract final class Colors { /// * [redAccent] and [purpleAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor pinkAccent = MaterialAccentColor( - _pinkAccentPrimaryValue, - { - 100: Color(0xFFFF80AB), - 200: Color(_pinkAccentPrimaryValue), - 400: Color(0xFFF50057), - 700: Color(0xFFC51162), - }, - ); + static const MaterialAccentColor pinkAccent = + MaterialAccentColor(_pinkAccentPrimaryValue, { + 100: Color(0xFFFF80AB), + 200: Color(_pinkAccentPrimaryValue), + 400: Color(0xFFF50057), + 700: Color(0xFFC51162), + }); static const int _pinkAccentPrimaryValue = 0xFFFF4081; /// The purple primary color and swatch. @@ -697,21 +686,18 @@ abstract final class Colors { /// * [deepPurple] and [pink], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor purple = MaterialColor( - _purplePrimaryValue, - { - 50: Color(0xFFF3E5F5), - 100: Color(0xFFE1BEE7), - 200: Color(0xFFCE93D8), - 300: Color(0xFFBA68C8), - 400: Color(0xFFAB47BC), - 500: Color(_purplePrimaryValue), - 600: Color(0xFF8E24AA), - 700: Color(0xFF7B1FA2), - 800: Color(0xFF6A1B9A), - 900: Color(0xFF4A148C), - }, - ); + static const MaterialColor purple = MaterialColor(_purplePrimaryValue, { + 50: Color(0xFFF3E5F5), + 100: Color(0xFFE1BEE7), + 200: Color(0xFFCE93D8), + 300: Color(0xFFBA68C8), + 400: Color(0xFFAB47BC), + 500: Color(_purplePrimaryValue), + 600: Color(0xFF8E24AA), + 700: Color(0xFF7B1FA2), + 800: Color(0xFF6A1B9A), + 900: Color(0xFF4A148C), + }); static const int _purplePrimaryValue = 0xFF9C27B0; /// The purple accent color and swatch. @@ -741,15 +727,13 @@ abstract final class Colors { /// * [deepPurpleAccent] and [pinkAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor purpleAccent = MaterialAccentColor( - _purpleAccentPrimaryValue, - { - 100: Color(0xFFEA80FC), - 200: Color(_purpleAccentPrimaryValue), - 400: Color(0xFFD500F9), - 700: Color(0xFFAA00FF), - }, - ); + static const MaterialAccentColor purpleAccent = + MaterialAccentColor(_purpleAccentPrimaryValue, { + 100: Color(0xFFEA80FC), + 200: Color(_purpleAccentPrimaryValue), + 400: Color(0xFFD500F9), + 700: Color(0xFFAA00FF), + }); static const int _purpleAccentPrimaryValue = 0xFFE040FB; /// The deep purple primary color and swatch. @@ -779,21 +763,18 @@ abstract final class Colors { /// * [purple] and [indigo], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor deepPurple = MaterialColor( - _deepPurplePrimaryValue, - { - 50: Color(0xFFEDE7F6), - 100: Color(0xFFD1C4E9), - 200: Color(0xFFB39DDB), - 300: Color(0xFF9575CD), - 400: Color(0xFF7E57C2), - 500: Color(_deepPurplePrimaryValue), - 600: Color(0xFF5E35B1), - 700: Color(0xFF512DA8), - 800: Color(0xFF4527A0), - 900: Color(0xFF311B92), - }, - ); + static const MaterialColor deepPurple = MaterialColor(_deepPurplePrimaryValue, { + 50: Color(0xFFEDE7F6), + 100: Color(0xFFD1C4E9), + 200: Color(0xFFB39DDB), + 300: Color(0xFF9575CD), + 400: Color(0xFF7E57C2), + 500: Color(_deepPurplePrimaryValue), + 600: Color(0xFF5E35B1), + 700: Color(0xFF512DA8), + 800: Color(0xFF4527A0), + 900: Color(0xFF311B92), + }); static const int _deepPurplePrimaryValue = 0xFF673AB7; /// The deep purple accent color and swatch. @@ -823,15 +804,13 @@ abstract final class Colors { /// * [purpleAccent] and [indigoAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor deepPurpleAccent = MaterialAccentColor( - _deepPurpleAccentPrimaryValue, - { - 100: Color(0xFFB388FF), - 200: Color(_deepPurpleAccentPrimaryValue), - 400: Color(0xFF651FFF), - 700: Color(0xFF6200EA), - }, - ); + static const MaterialAccentColor deepPurpleAccent = + MaterialAccentColor(_deepPurpleAccentPrimaryValue, { + 100: Color(0xFFB388FF), + 200: Color(_deepPurpleAccentPrimaryValue), + 400: Color(0xFF651FFF), + 700: Color(0xFF6200EA), + }); static const int _deepPurpleAccentPrimaryValue = 0xFF7C4DFF; /// The indigo primary color and swatch. @@ -861,21 +840,18 @@ abstract final class Colors { /// * [blue] and [deepPurple], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor indigo = MaterialColor( - _indigoPrimaryValue, - { - 50: Color(0xFFE8EAF6), - 100: Color(0xFFC5CAE9), - 200: Color(0xFF9FA8DA), - 300: Color(0xFF7986CB), - 400: Color(0xFF5C6BC0), - 500: Color(_indigoPrimaryValue), - 600: Color(0xFF3949AB), - 700: Color(0xFF303F9F), - 800: Color(0xFF283593), - 900: Color(0xFF1A237E), - }, - ); + static const MaterialColor indigo = MaterialColor(_indigoPrimaryValue, { + 50: Color(0xFFE8EAF6), + 100: Color(0xFFC5CAE9), + 200: Color(0xFF9FA8DA), + 300: Color(0xFF7986CB), + 400: Color(0xFF5C6BC0), + 500: Color(_indigoPrimaryValue), + 600: Color(0xFF3949AB), + 700: Color(0xFF303F9F), + 800: Color(0xFF283593), + 900: Color(0xFF1A237E), + }); static const int _indigoPrimaryValue = 0xFF3F51B5; /// The indigo accent color and swatch. @@ -905,15 +881,13 @@ abstract final class Colors { /// * [blueAccent] and [deepPurpleAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor indigoAccent = MaterialAccentColor( - _indigoAccentPrimaryValue, - { - 100: Color(0xFF8C9EFF), - 200: Color(_indigoAccentPrimaryValue), - 400: Color(0xFF3D5AFE), - 700: Color(0xFF304FFE), - }, - ); + static const MaterialAccentColor indigoAccent = + MaterialAccentColor(_indigoAccentPrimaryValue, { + 100: Color(0xFF8C9EFF), + 200: Color(_indigoAccentPrimaryValue), + 400: Color(0xFF3D5AFE), + 700: Color(0xFF304FFE), + }); static const int _indigoAccentPrimaryValue = 0xFF536DFE; /// The blue primary color and swatch. @@ -945,21 +919,18 @@ abstract final class Colors { /// * [indigo], [lightBlue], and [blueGrey], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor blue = MaterialColor( - _bluePrimaryValue, - { - 50: Color(0xFFE3F2FD), - 100: Color(0xFFBBDEFB), - 200: Color(0xFF90CAF9), - 300: Color(0xFF64B5F6), - 400: Color(0xFF42A5F5), - 500: Color(_bluePrimaryValue), - 600: Color(0xFF1E88E5), - 700: Color(0xFF1976D2), - 800: Color(0xFF1565C0), - 900: Color(0xFF0D47A1), - }, - ); + static const MaterialColor blue = MaterialColor(_bluePrimaryValue, { + 50: Color(0xFFE3F2FD), + 100: Color(0xFFBBDEFB), + 200: Color(0xFF90CAF9), + 300: Color(0xFF64B5F6), + 400: Color(0xFF42A5F5), + 500: Color(_bluePrimaryValue), + 600: Color(0xFF1E88E5), + 700: Color(0xFF1976D2), + 800: Color(0xFF1565C0), + 900: Color(0xFF0D47A1), + }); static const int _bluePrimaryValue = 0xFF2196F3; /// The blue accent color and swatch. @@ -989,15 +960,13 @@ abstract final class Colors { /// * [indigoAccent] and [lightBlueAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor blueAccent = MaterialAccentColor( - _blueAccentPrimaryValue, - { - 100: Color(0xFF82B1FF), - 200: Color(_blueAccentPrimaryValue), - 400: Color(0xFF2979FF), - 700: Color(0xFF2962FF), - }, - ); + static const MaterialAccentColor blueAccent = + MaterialAccentColor(_blueAccentPrimaryValue, { + 100: Color(0xFF82B1FF), + 200: Color(_blueAccentPrimaryValue), + 400: Color(0xFF2979FF), + 700: Color(0xFF2962FF), + }); static const int _blueAccentPrimaryValue = 0xFF448AFF; /// The light blue primary color and swatch. @@ -1027,21 +996,18 @@ abstract final class Colors { /// * [blue] and [cyan], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor lightBlue = MaterialColor( - _lightBluePrimaryValue, - { - 50: Color(0xFFE1F5FE), - 100: Color(0xFFB3E5FC), - 200: Color(0xFF81D4FA), - 300: Color(0xFF4FC3F7), - 400: Color(0xFF29B6F6), - 500: Color(_lightBluePrimaryValue), - 600: Color(0xFF039BE5), - 700: Color(0xFF0288D1), - 800: Color(0xFF0277BD), - 900: Color(0xFF01579B), - }, - ); + static const MaterialColor lightBlue = MaterialColor(_lightBluePrimaryValue, { + 50: Color(0xFFE1F5FE), + 100: Color(0xFFB3E5FC), + 200: Color(0xFF81D4FA), + 300: Color(0xFF4FC3F7), + 400: Color(0xFF29B6F6), + 500: Color(_lightBluePrimaryValue), + 600: Color(0xFF039BE5), + 700: Color(0xFF0288D1), + 800: Color(0xFF0277BD), + 900: Color(0xFF01579B), + }); static const int _lightBluePrimaryValue = 0xFF03A9F4; /// The light blue accent swatch. @@ -1071,15 +1037,13 @@ abstract final class Colors { /// * [blueAccent] and [cyanAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor lightBlueAccent = MaterialAccentColor( - _lightBlueAccentPrimaryValue, - { - 100: Color(0xFF80D8FF), - 200: Color(_lightBlueAccentPrimaryValue), - 400: Color(0xFF00B0FF), - 700: Color(0xFF0091EA), - }, - ); + static const MaterialAccentColor lightBlueAccent = + MaterialAccentColor(_lightBlueAccentPrimaryValue, { + 100: Color(0xFF80D8FF), + 200: Color(_lightBlueAccentPrimaryValue), + 400: Color(0xFF00B0FF), + 700: Color(0xFF0091EA), + }); static const int _lightBlueAccentPrimaryValue = 0xFF40C4FF; /// The cyan primary color and swatch. @@ -1111,21 +1075,18 @@ abstract final class Colors { /// * [lightBlue], [teal], and [blueGrey], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor cyan = MaterialColor( - _cyanPrimaryValue, - { - 50: Color(0xFFE0F7FA), - 100: Color(0xFFB2EBF2), - 200: Color(0xFF80DEEA), - 300: Color(0xFF4DD0E1), - 400: Color(0xFF26C6DA), - 500: Color(_cyanPrimaryValue), - 600: Color(0xFF00ACC1), - 700: Color(0xFF0097A7), - 800: Color(0xFF00838F), - 900: Color(0xFF006064), - }, - ); + static const MaterialColor cyan = MaterialColor(_cyanPrimaryValue, { + 50: Color(0xFFE0F7FA), + 100: Color(0xFFB2EBF2), + 200: Color(0xFF80DEEA), + 300: Color(0xFF4DD0E1), + 400: Color(0xFF26C6DA), + 500: Color(_cyanPrimaryValue), + 600: Color(0xFF00ACC1), + 700: Color(0xFF0097A7), + 800: Color(0xFF00838F), + 900: Color(0xFF006064), + }); static const int _cyanPrimaryValue = 0xFF00BCD4; /// The cyan accent color and swatch. @@ -1155,15 +1116,13 @@ abstract final class Colors { /// * [lightBlueAccent] and [tealAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor cyanAccent = MaterialAccentColor( - _cyanAccentPrimaryValue, - { - 100: Color(0xFF84FFFF), - 200: Color(_cyanAccentPrimaryValue), - 400: Color(0xFF00E5FF), - 700: Color(0xFF00B8D4), - }, - ); + static const MaterialAccentColor cyanAccent = + MaterialAccentColor(_cyanAccentPrimaryValue, { + 100: Color(0xFF84FFFF), + 200: Color(_cyanAccentPrimaryValue), + 400: Color(0xFF00E5FF), + 700: Color(0xFF00B8D4), + }); static const int _cyanAccentPrimaryValue = 0xFF18FFFF; /// The teal primary color and swatch. @@ -1193,21 +1152,18 @@ abstract final class Colors { /// * [green] and [cyan], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor teal = MaterialColor( - _tealPrimaryValue, - { - 50: Color(0xFFE0F2F1), - 100: Color(0xFFB2DFDB), - 200: Color(0xFF80CBC4), - 300: Color(0xFF4DB6AC), - 400: Color(0xFF26A69A), - 500: Color(_tealPrimaryValue), - 600: Color(0xFF00897B), - 700: Color(0xFF00796B), - 800: Color(0xFF00695C), - 900: Color(0xFF004D40), - }, - ); + static const MaterialColor teal = MaterialColor(_tealPrimaryValue, { + 50: Color(0xFFE0F2F1), + 100: Color(0xFFB2DFDB), + 200: Color(0xFF80CBC4), + 300: Color(0xFF4DB6AC), + 400: Color(0xFF26A69A), + 500: Color(_tealPrimaryValue), + 600: Color(0xFF00897B), + 700: Color(0xFF00796B), + 800: Color(0xFF00695C), + 900: Color(0xFF004D40), + }); static const int _tealPrimaryValue = 0xFF009688; /// The teal accent color and swatch. @@ -1237,15 +1193,13 @@ abstract final class Colors { /// * [greenAccent] and [cyanAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor tealAccent = MaterialAccentColor( - _tealAccentPrimaryValue, - { - 100: Color(0xFFA7FFEB), - 200: Color(_tealAccentPrimaryValue), - 400: Color(0xFF1DE9B6), - 700: Color(0xFF00BFA5), - }, - ); + static const MaterialAccentColor tealAccent = + MaterialAccentColor(_tealAccentPrimaryValue, { + 100: Color(0xFFA7FFEB), + 200: Color(_tealAccentPrimaryValue), + 400: Color(0xFF1DE9B6), + 700: Color(0xFF00BFA5), + }); static const int _tealAccentPrimaryValue = 0xFF64FFDA; /// The green primary color and swatch. @@ -1278,21 +1232,18 @@ abstract final class Colors { /// * [teal], [lightGreen], and [lime], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor green = MaterialColor( - _greenPrimaryValue, - { - 50: Color(0xFFE8F5E9), - 100: Color(0xFFC8E6C9), - 200: Color(0xFFA5D6A7), - 300: Color(0xFF81C784), - 400: Color(0xFF66BB6A), - 500: Color(_greenPrimaryValue), - 600: Color(0xFF43A047), - 700: Color(0xFF388E3C), - 800: Color(0xFF2E7D32), - 900: Color(0xFF1B5E20), - }, - ); + static const MaterialColor green = MaterialColor(_greenPrimaryValue, { + 50: Color(0xFFE8F5E9), + 100: Color(0xFFC8E6C9), + 200: Color(0xFFA5D6A7), + 300: Color(0xFF81C784), + 400: Color(0xFF66BB6A), + 500: Color(_greenPrimaryValue), + 600: Color(0xFF43A047), + 700: Color(0xFF388E3C), + 800: Color(0xFF2E7D32), + 900: Color(0xFF1B5E20), + }); static const int _greenPrimaryValue = 0xFF4CAF50; /// The green accent color and swatch. @@ -1325,15 +1276,13 @@ abstract final class Colors { /// * [tealAccent], [lightGreenAccent], and [limeAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor greenAccent = MaterialAccentColor( - _greenAccentPrimaryValue, - { - 100: Color(0xFFB9F6CA), - 200: Color(_greenAccentPrimaryValue), - 400: Color(0xFF00E676), - 700: Color(0xFF00C853), - }, - ); + static const MaterialAccentColor greenAccent = + MaterialAccentColor(_greenAccentPrimaryValue, { + 100: Color(0xFFB9F6CA), + 200: Color(_greenAccentPrimaryValue), + 400: Color(0xFF00E676), + 700: Color(0xFF00C853), + }); static const int _greenAccentPrimaryValue = 0xFF69F0AE; /// The light green primary color and swatch. @@ -1363,21 +1312,18 @@ abstract final class Colors { /// * [green] and [lime], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor lightGreen = MaterialColor( - _lightGreenPrimaryValue, - { - 50: Color(0xFFF1F8E9), - 100: Color(0xFFDCEDC8), - 200: Color(0xFFC5E1A5), - 300: Color(0xFFAED581), - 400: Color(0xFF9CCC65), - 500: Color(_lightGreenPrimaryValue), - 600: Color(0xFF7CB342), - 700: Color(0xFF689F38), - 800: Color(0xFF558B2F), - 900: Color(0xFF33691E), - }, - ); + static const MaterialColor lightGreen = MaterialColor(_lightGreenPrimaryValue, { + 50: Color(0xFFF1F8E9), + 100: Color(0xFFDCEDC8), + 200: Color(0xFFC5E1A5), + 300: Color(0xFFAED581), + 400: Color(0xFF9CCC65), + 500: Color(_lightGreenPrimaryValue), + 600: Color(0xFF7CB342), + 700: Color(0xFF689F38), + 800: Color(0xFF558B2F), + 900: Color(0xFF33691E), + }); static const int _lightGreenPrimaryValue = 0xFF8BC34A; /// The light green accent color and swatch. @@ -1407,15 +1353,13 @@ abstract final class Colors { /// * [greenAccent] and [limeAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor lightGreenAccent = MaterialAccentColor( - _lightGreenAccentPrimaryValue, - { - 100: Color(0xFFCCFF90), - 200: Color(_lightGreenAccentPrimaryValue), - 400: Color(0xFF76FF03), - 700: Color(0xFF64DD17), - }, - ); + static const MaterialAccentColor lightGreenAccent = + MaterialAccentColor(_lightGreenAccentPrimaryValue, { + 100: Color(0xFFCCFF90), + 200: Color(_lightGreenAccentPrimaryValue), + 400: Color(0xFF76FF03), + 700: Color(0xFF64DD17), + }); static const int _lightGreenAccentPrimaryValue = 0xFFB2FF59; /// The lime primary color and swatch. @@ -1445,21 +1389,18 @@ abstract final class Colors { /// * [lightGreen] and [yellow], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor lime = MaterialColor( - _limePrimaryValue, - { - 50: Color(0xFFF9FBE7), - 100: Color(0xFFF0F4C3), - 200: Color(0xFFE6EE9C), - 300: Color(0xFFDCE775), - 400: Color(0xFFD4E157), - 500: Color(_limePrimaryValue), - 600: Color(0xFFC0CA33), - 700: Color(0xFFAFB42B), - 800: Color(0xFF9E9D24), - 900: Color(0xFF827717), - }, - ); + static const MaterialColor lime = MaterialColor(_limePrimaryValue, { + 50: Color(0xFFF9FBE7), + 100: Color(0xFFF0F4C3), + 200: Color(0xFFE6EE9C), + 300: Color(0xFFDCE775), + 400: Color(0xFFD4E157), + 500: Color(_limePrimaryValue), + 600: Color(0xFFC0CA33), + 700: Color(0xFFAFB42B), + 800: Color(0xFF9E9D24), + 900: Color(0xFF827717), + }); static const int _limePrimaryValue = 0xFFCDDC39; /// The lime accent primary color and swatch. @@ -1489,15 +1430,13 @@ abstract final class Colors { /// * [lightGreenAccent] and [yellowAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor limeAccent = MaterialAccentColor( - _limeAccentPrimaryValue, - { - 100: Color(0xFFF4FF81), - 200: Color(_limeAccentPrimaryValue), - 400: Color(0xFFC6FF00), - 700: Color(0xFFAEEA00), - }, - ); + static const MaterialAccentColor limeAccent = + MaterialAccentColor(_limeAccentPrimaryValue, { + 100: Color(0xFFF4FF81), + 200: Color(_limeAccentPrimaryValue), + 400: Color(0xFFC6FF00), + 700: Color(0xFFAEEA00), + }); static const int _limeAccentPrimaryValue = 0xFFEEFF41; /// The yellow primary color and swatch. @@ -1527,21 +1466,18 @@ abstract final class Colors { /// * [lime] and [amber], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor yellow = MaterialColor( - _yellowPrimaryValue, - { - 50: Color(0xFFFFFDE7), - 100: Color(0xFFFFF9C4), - 200: Color(0xFFFFF59D), - 300: Color(0xFFFFF176), - 400: Color(0xFFFFEE58), - 500: Color(_yellowPrimaryValue), - 600: Color(0xFFFDD835), - 700: Color(0xFFFBC02D), - 800: Color(0xFFF9A825), - 900: Color(0xFFF57F17), - }, - ); + static const MaterialColor yellow = MaterialColor(_yellowPrimaryValue, { + 50: Color(0xFFFFFDE7), + 100: Color(0xFFFFF9C4), + 200: Color(0xFFFFF59D), + 300: Color(0xFFFFF176), + 400: Color(0xFFFFEE58), + 500: Color(_yellowPrimaryValue), + 600: Color(0xFFFDD835), + 700: Color(0xFFFBC02D), + 800: Color(0xFFF9A825), + 900: Color(0xFFF57F17), + }); static const int _yellowPrimaryValue = 0xFFFFEB3B; /// The yellow accent color and swatch. @@ -1571,15 +1507,13 @@ abstract final class Colors { /// * [limeAccent] and [amberAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor yellowAccent = MaterialAccentColor( - _yellowAccentPrimaryValue, - { - 100: Color(0xFFFFFF8D), - 200: Color(_yellowAccentPrimaryValue), - 400: Color(0xFFFFEA00), - 700: Color(0xFFFFD600), - }, - ); + static const MaterialAccentColor yellowAccent = + MaterialAccentColor(_yellowAccentPrimaryValue, { + 100: Color(0xFFFFFF8D), + 200: Color(_yellowAccentPrimaryValue), + 400: Color(0xFFFFEA00), + 700: Color(0xFFFFD600), + }); static const int _yellowAccentPrimaryValue = 0xFFFFFF00; /// The amber primary color and swatch. @@ -1609,21 +1543,18 @@ abstract final class Colors { /// * [yellow] and [orange], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor amber = MaterialColor( - _amberPrimaryValue, - { - 50: Color(0xFFFFF8E1), - 100: Color(0xFFFFECB3), - 200: Color(0xFFFFE082), - 300: Color(0xFFFFD54F), - 400: Color(0xFFFFCA28), - 500: Color(_amberPrimaryValue), - 600: Color(0xFFFFB300), - 700: Color(0xFFFFA000), - 800: Color(0xFFFF8F00), - 900: Color(0xFFFF6F00), - }, - ); + static const MaterialColor amber = MaterialColor(_amberPrimaryValue, { + 50: Color(0xFFFFF8E1), + 100: Color(0xFFFFECB3), + 200: Color(0xFFFFE082), + 300: Color(0xFFFFD54F), + 400: Color(0xFFFFCA28), + 500: Color(_amberPrimaryValue), + 600: Color(0xFFFFB300), + 700: Color(0xFFFFA000), + 800: Color(0xFFFF8F00), + 900: Color(0xFFFF6F00), + }); static const int _amberPrimaryValue = 0xFFFFC107; /// The amber accent color and swatch. @@ -1653,15 +1584,13 @@ abstract final class Colors { /// * [yellowAccent] and [orangeAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor amberAccent = MaterialAccentColor( - _amberAccentPrimaryValue, - { - 100: Color(0xFFFFE57F), - 200: Color(_amberAccentPrimaryValue), - 400: Color(0xFFFFC400), - 700: Color(0xFFFFAB00), - }, - ); + static const MaterialAccentColor amberAccent = + MaterialAccentColor(_amberAccentPrimaryValue, { + 100: Color(0xFFFFE57F), + 200: Color(_amberAccentPrimaryValue), + 400: Color(0xFFFFC400), + 700: Color(0xFFFFAB00), + }); static const int _amberAccentPrimaryValue = 0xFFFFD740; /// The orange primary color and swatch. @@ -1693,21 +1622,18 @@ abstract final class Colors { /// * [amber], [deepOrange], and [brown], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor orange = MaterialColor( - _orangePrimaryValue, - { - 50: Color(0xFFFFF3E0), - 100: Color(0xFFFFE0B2), - 200: Color(0xFFFFCC80), - 300: Color(0xFFFFB74D), - 400: Color(0xFFFFA726), - 500: Color(_orangePrimaryValue), - 600: Color(0xFFFB8C00), - 700: Color(0xFFF57C00), - 800: Color(0xFFEF6C00), - 900: Color(0xFFE65100), - }, - ); + static const MaterialColor orange = MaterialColor(_orangePrimaryValue, { + 50: Color(0xFFFFF3E0), + 100: Color(0xFFFFE0B2), + 200: Color(0xFFFFCC80), + 300: Color(0xFFFFB74D), + 400: Color(0xFFFFA726), + 500: Color(_orangePrimaryValue), + 600: Color(0xFFFB8C00), + 700: Color(0xFFF57C00), + 800: Color(0xFFEF6C00), + 900: Color(0xFFE65100), + }); static const int _orangePrimaryValue = 0xFFFF9800; /// The orange accent color and swatch. @@ -1737,15 +1663,13 @@ abstract final class Colors { /// * [amberAccent] and [deepOrangeAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor orangeAccent = MaterialAccentColor( - _orangeAccentPrimaryValue, - { - 100: Color(0xFFFFD180), - 200: Color(_orangeAccentPrimaryValue), - 400: Color(0xFFFF9100), - 700: Color(0xFFFF6D00), - }, - ); + static const MaterialAccentColor orangeAccent = + MaterialAccentColor(_orangeAccentPrimaryValue, { + 100: Color(0xFFFFD180), + 200: Color(_orangeAccentPrimaryValue), + 400: Color(0xFFFF9100), + 700: Color(0xFFFF6D00), + }); static const int _orangeAccentPrimaryValue = 0xFFFFAB40; /// The deep orange primary color and swatch. @@ -1777,21 +1701,18 @@ abstract final class Colors { /// * [orange], [red], and [brown], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor deepOrange = MaterialColor( - _deepOrangePrimaryValue, - { - 50: Color(0xFFFBE9E7), - 100: Color(0xFFFFCCBC), - 200: Color(0xFFFFAB91), - 300: Color(0xFFFF8A65), - 400: Color(0xFFFF7043), - 500: Color(_deepOrangePrimaryValue), - 600: Color(0xFFF4511E), - 700: Color(0xFFE64A19), - 800: Color(0xFFD84315), - 900: Color(0xFFBF360C), - }, - ); + static const MaterialColor deepOrange = MaterialColor(_deepOrangePrimaryValue, { + 50: Color(0xFFFBE9E7), + 100: Color(0xFFFFCCBC), + 200: Color(0xFFFFAB91), + 300: Color(0xFFFF8A65), + 400: Color(0xFFFF7043), + 500: Color(_deepOrangePrimaryValue), + 600: Color(0xFFF4511E), + 700: Color(0xFFE64A19), + 800: Color(0xFFD84315), + 900: Color(0xFFBF360C), + }); static const int _deepOrangePrimaryValue = 0xFFFF5722; /// The deep orange accent color and swatch. @@ -1821,15 +1742,13 @@ abstract final class Colors { /// * [orangeAccent] [redAccent], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialAccentColor deepOrangeAccent = MaterialAccentColor( - _deepOrangeAccentPrimaryValue, - { - 100: Color(0xFFFF9E80), - 200: Color(_deepOrangeAccentPrimaryValue), - 400: Color(0xFFFF3D00), - 700: Color(0xFFDD2C00), - }, - ); + static const MaterialAccentColor deepOrangeAccent = + MaterialAccentColor(_deepOrangeAccentPrimaryValue, { + 100: Color(0xFFFF9E80), + 200: Color(_deepOrangeAccentPrimaryValue), + 400: Color(0xFFFF3D00), + 700: Color(0xFFDD2C00), + }); static const int _deepOrangeAccentPrimaryValue = 0xFFFF6E40; /// The brown primary color and swatch. @@ -1857,21 +1776,18 @@ abstract final class Colors { /// * [orange] and [blueGrey], vaguely similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor brown = MaterialColor( - _brownPrimaryValue, - { - 50: Color(0xFFEFEBE9), - 100: Color(0xFFD7CCC8), - 200: Color(0xFFBCAAA4), - 300: Color(0xFFA1887F), - 400: Color(0xFF8D6E63), - 500: Color(_brownPrimaryValue), - 600: Color(0xFF6D4C41), - 700: Color(0xFF5D4037), - 800: Color(0xFF4E342E), - 900: Color(0xFF3E2723), - }, - ); + static const MaterialColor brown = MaterialColor(_brownPrimaryValue, { + 50: Color(0xFFEFEBE9), + 100: Color(0xFFD7CCC8), + 200: Color(0xFFBCAAA4), + 300: Color(0xFFA1887F), + 400: Color(0xFF8D6E63), + 500: Color(_brownPrimaryValue), + 600: Color(0xFF6D4C41), + 700: Color(0xFF5D4037), + 800: Color(0xFF4E342E), + 900: Color(0xFF3E2723), + }); static const int _brownPrimaryValue = 0xFF795548; /// The grey primary color and swatch. @@ -1906,23 +1822,20 @@ abstract final class Colors { /// provide a different approach to showing shades of grey. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor grey = MaterialColor( - _greyPrimaryValue, - { - 50: Color(0xFFFAFAFA), - 100: Color(0xFFF5F5F5), - 200: Color(0xFFEEEEEE), - 300: Color(0xFFE0E0E0), - 350: Color(0xFFD6D6D6), // only for raised button while pressed in light theme - 400: Color(0xFFBDBDBD), - 500: Color(_greyPrimaryValue), - 600: Color(0xFF757575), - 700: Color(0xFF616161), - 800: Color(0xFF424242), - 850: Color(0xFF303030), // only for background color in dark theme - 900: Color(0xFF212121), - }, - ); + static const MaterialColor grey = MaterialColor(_greyPrimaryValue, { + 50: Color(0xFFFAFAFA), + 100: Color(0xFFF5F5F5), + 200: Color(0xFFEEEEEE), + 300: Color(0xFFE0E0E0), + 350: Color(0xFFD6D6D6), // only for raised button while pressed in light theme + 400: Color(0xFFBDBDBD), + 500: Color(_greyPrimaryValue), + 600: Color(0xFF757575), + 700: Color(0xFF616161), + 800: Color(0xFF424242), + 850: Color(0xFF303030), // only for background color in dark theme + 900: Color(0xFF212121), + }); static const int _greyPrimaryValue = 0xFF9E9E9E; /// The blue-grey primary color and swatch. @@ -1952,21 +1865,18 @@ abstract final class Colors { /// * [grey], [cyan], and [blue], similar colors. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - static const MaterialColor blueGrey = MaterialColor( - _blueGreyPrimaryValue, - { - 50: Color(0xFFECEFF1), - 100: Color(0xFFCFD8DC), - 200: Color(0xFFB0BEC5), - 300: Color(0xFF90A4AE), - 400: Color(0xFF78909C), - 500: Color(_blueGreyPrimaryValue), - 600: Color(0xFF546E7A), - 700: Color(0xFF455A64), - 800: Color(0xFF37474F), - 900: Color(0xFF263238), - }, - ); + static const MaterialColor blueGrey = MaterialColor(_blueGreyPrimaryValue, { + 50: Color(0xFFECEFF1), + 100: Color(0xFFCFD8DC), + 200: Color(0xFFB0BEC5), + 300: Color(0xFF90A4AE), + 400: Color(0xFF78909C), + 500: Color(_blueGreyPrimaryValue), + 600: Color(0xFF546E7A), + 700: Color(0xFF455A64), + 800: Color(0xFF37474F), + 900: Color(0xFF263238), + }); static const int _blueGreyPrimaryValue = 0xFF607D8B; /// The Material Design primary color swatches, excluding grey. From b12c04c387e5892824c758d632787ec23643d0ba Mon Sep 17 00:00:00 2001 From: Justin McCandless Date: Mon, 20 Apr 2026 11:58:21 -0700 Subject: [PATCH 64/66] Move colors.dart to final location --- .../{flutter/lib/src/material => material_ui/lib/src}/colors.dart | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/{flutter/lib/src/material => material_ui/lib/src}/colors.dart (100%) diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/material_ui/lib/src/colors.dart similarity index 100% rename from packages/flutter/lib/src/material/colors.dart rename to packages/material_ui/lib/src/colors.dart From 15e99f800911ffc9ad299ba56fef62a5fbb0a839 Mon Sep 17 00:00:00 2001 From: Justin McCandless Date: Tue, 21 Apr 2026 09:36:24 -0700 Subject: [PATCH 65/66] My interpretation of the current version management recommendation. Basically everything from flutter/flutter's Material today should go into this m3 directory. As we add new m3e stuff, it will go in a new m3e directory. --- packages/material_ui/lib/src/{ => m3}/colors.dart | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/material_ui/lib/src/{ => m3}/colors.dart (100%) diff --git a/packages/material_ui/lib/src/colors.dart b/packages/material_ui/lib/src/m3/colors.dart similarity index 100% rename from packages/material_ui/lib/src/colors.dart rename to packages/material_ui/lib/src/m3/colors.dart From 70963520237ff8a572897ccc56dcf2c43c472fcf Mon Sep 17 00:00:00 2001 From: Justin McCandless Date: Tue, 21 Apr 2026 09:50:58 -0700 Subject: [PATCH 66/66] Export files work. --- packages/material_ui/lib/m3.dart | 13 +++++++++++++ packages/material_ui/lib/material_ui.dart | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 packages/material_ui/lib/m3.dart diff --git a/packages/material_ui/lib/m3.dart b/packages/material_ui/lib/m3.dart new file mode 100644 index 000000000000..c060375a7dc3 --- /dev/null +++ b/packages/material_ui/lib/m3.dart @@ -0,0 +1,13 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +/// The Flutter Material 3 library. +/// +/// Subsequent versions of Material, such as Material 3 Expressive, will have +/// their own libraries and directories. +/// +/// To use, import `package:material_ui/m3.dart`. +library m3; + +export 'src/m3/colors.dart'; diff --git a/packages/material_ui/lib/material_ui.dart b/packages/material_ui/lib/material_ui.dart index 1f2465f1265b..9490489fb601 100644 --- a/packages/material_ui/lib/material_ui.dart +++ b/packages/material_ui/lib/material_ui.dart @@ -7,4 +7,4 @@ /// To use, import `package:material_ui/material_ui.dart`. library material_ui; -export 'package:flutter/material.dart'; +export 'm3.dart';