File tree 5 files changed +27
-11
lines changed
5 files changed +27
-11
lines changed Original file line number Diff line number Diff line change 1
- ## NEXT
1
+ ## 1.1.4
2
2
3
3
* Updates minimum supported SDK version to Flutter 3.10/Dart 3.0.
4
+ * Improves README example and updates it to use code excerpts.
4
5
5
6
## 1.1.3
6
7
Original file line number Diff line number Diff line change @@ -5,16 +5,10 @@ This package defines color constants for the CSS colors. These color constants
5
5
use the [ Color] ( https://api.flutter.dev/flutter/dart-ui/Color-class.html ) class
6
6
from ` dart:ui ` , which means they're useful for Flutter apps.
7
7
8
- Import
9
- ------
10
-
11
- ``` dart
12
- import 'package:css_colors/css_colors.dart';
13
- ```
14
-
15
8
Use
16
9
---
17
10
11
+ <? code-excerpt "test/css_colors_test.dart (Usage)"?>
18
12
``` dart
19
- new Container(color: CSSColors.orange)
13
+ final Container orange = Container (color: CSSColors.orange);
20
14
```
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: css_colors
2
2
description : Defines constant dart:ui Color objects for CSS colors (for use in Flutter code).
3
3
repository : https://github.com/flutter/packages/tree/main/packages/css_colors
4
4
issue_tracker : https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+css_colors%22
5
- version : 1.1.3
5
+ version : 1.1.4
6
6
7
7
environment :
8
8
sdk : " >=3.0.0 <4.0.0"
@@ -11,6 +11,8 @@ environment:
11
11
dependencies :
12
12
flutter :
13
13
sdk : flutter
14
+ flutter_test :
15
+ sdk : flutter
14
16
15
17
topics :
16
18
- color
Original file line number Diff line number Diff line change
1
+ // Copyright 2013 The Flutter Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ import 'package:css_colors/css_colors.dart' ;
6
+ import 'package:flutter/material.dart' ;
7
+ import 'package:flutter_test/flutter_test.dart' ;
8
+
9
+ void main () {
10
+ testWidgets ('CSSColors.orange should be correct' ,
11
+ (WidgetTester tester) async {
12
+ // Create a Container widget using CSSColors.orange.
13
+ // #docregion Usage
14
+ final Container orange = Container (color: CSSColors .orange);
15
+ // #enddocregion Usage
16
+
17
+ // Ensure the color of the container is the expected one.
18
+ expect (orange.color, equals (const Color (0xFFFFA500 )));
19
+ });
20
+ }
Original file line number Diff line number Diff line change 5
5
6
6
# TODO(stuartmorgan): Remove everything from this list. See
7
7
# https://github.com/flutter/flutter/issues/102679
8
- - css_colors
9
8
- espresso
10
9
- extension_google_sign_in_as_googleapis_auth
11
10
- go_router_builder
You can’t perform that action at this time.
0 commit comments