| The renderer, and a transport bug that took four tries 58e6c97 nandi 18h ago | 1 | /// The design tokens, as Dart. |
| 2 | /// |
| 3 | /// The same numbers `flutter/src/frq/theme/tokens.cljd` carries, in the |
| 4 | /// language the renderer is written in. Duplicated rather than imported |
| 5 | /// because that file is ClojureDart and this is the half that is leaving it; |
| 6 | /// when the ClojureDart app goes, so does the other copy. |
| 7 | library; |
| 8 | |
| 9 | import 'package:flutter/material.dart'; |
| 10 | |
| 11 | const accent = Color(0xFFF4E3CF); |
| 12 | const onAccent = Color(0xFF000000); |
| 13 | const bg = Color(0xFF202833); |
| 14 | const onBg = Color(0xFFCCD1D7); |
| 15 | const component = Color(0xFF343C48); |
| 16 | const componentHover = Color(0xFF48505A); |
| 17 | const divider = Color(0x33CCD1D7); |
| 18 | const card = Color(0xFF2C3440); |
| 19 | const cardComponent = Color(0xFF3B4450); |
| 20 | const onCard = Color(0xFFFFFFFF); |
| 21 | const destructive = Color(0xFFFDA1A0); |
| 22 | const onDestructive = Color(0xFF000000); |
| 23 | const success = Color(0xFF92CF9C); |
| 24 | |
| 25 | /// `dim` is not a token of its own in the Clojure either — it is `onBg` at |
| 26 | /// the opacity a caption wants, and naming it here keeps that one decision in |
| 27 | /// one place. |
| 28 | const dim = Color(0x99CCD1D7); |
| 29 | |
| 30 | const radiusXs = 2.0; |
| 31 | const radiusS = 8.0; |
| 32 | const radiusM = 8.0; |
| 33 | |
| 34 | const spaceXxxs = 4.0; |
| 35 | const spaceXxs = 8.0; |
| 36 | const spaceXs = 12.0; |
| 37 | const spaceS = 16.0; |
| 38 | const spaceM = 24.0; |
| 39 | |
| 40 | /// libcosmic's typography, which was code rather than configuration there and |
| 41 | /// is code here for the same reason. |
| 42 | const textTitle3 = 24.0; // :title |
| 43 | const textTitle4 = 20.0; // :title-2 |
| 44 | const textBody = 14.0; // :label |
| 45 | const textCaption = 12.0; // :dim-label, :status, :spinner |