Skip to content

Commit 376c69d

Browse files
committed
Merge pull request flutter#2714 from collinjackson/colors_list
Provide a list of Material design primary and accent color swatches
2 parents dac1d4a + baa1e7e commit 376c69d

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

packages/flutter/lib/src/material/colors.dart

+43
Original file line numberDiff line numberDiff line change
@@ -384,4 +384,47 @@ class Colors {
384384
800: const Color(0xFF37474F),
385385
900: const Color(0xFF263238),
386386
};
387+
388+
/// All Material design primary color swatches (except grey)
389+
static const List<Map<int, Color>> primaries = const <Map<int, Color>>[
390+
red,
391+
pink,
392+
purple,
393+
deepPurple,
394+
indigo,
395+
blue,
396+
lightBlue,
397+
cyan,
398+
teal,
399+
green,
400+
lightGreen,
401+
lime,
402+
yellow,
403+
amber,
404+
orange,
405+
deepOrange,
406+
brown,
407+
// grey intentionally omitted
408+
blueGrey,
409+
];
410+
411+
/// All Material design accent color swatches
412+
static const List<Map<int, Color>> accents = const <Map<int, Color>>[
413+
redAccent,
414+
pinkAccent,
415+
purpleAccent,
416+
deepPurpleAccent,
417+
indigoAccent,
418+
blueAccent,
419+
lightBlueAccent,
420+
cyanAccent,
421+
tealAccent,
422+
greenAccent,
423+
lightGreenAccent,
424+
limeAccent,
425+
yellowAccent,
426+
amberAccent,
427+
orangeAccent,
428+
deepOrangeAccent,
429+
];
387430
}

0 commit comments

Comments
 (0)