Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/css_colors/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## NEXT
## 1.1.4

* Updates minimum supported SDK version to Flutter 3.10/Dart 3.0.
* Improves README example and updates it to use code excerpts.

## 1.1.3

Expand Down
4 changes: 3 additions & 1 deletion packages/css_colors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ from `dart:ui`, which means they're useful for Flutter apps.
Import
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The entire "Import" section, including the excerpt, can be removed; the installation tab on pub.dev has that information now, so we are removing it from READMEs.

------

<?code-excerpt "test/css_colors_test.dart (Import)"?>
```dart
import 'package:css_colors/css_colors.dart';
```

Use
---

<?code-excerpt "test/css_colors_test.dart (Usage)"?>
```dart
new Container(color: CSSColors.orange)
final Container orange = Container(color: CSSColors.orange);
```
4 changes: 3 additions & 1 deletion packages/css_colors/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: css_colors
description: Defines constant dart:ui Color objects for CSS colors (for use in Flutter code).
repository: https://github.com/flutter/packages/tree/main/packages/css_colors
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+css_colors%22
version: 1.1.3
version: 1.1.4

environment:
sdk: ">=3.0.0 <4.0.0"
Expand All @@ -11,6 +11,8 @@ environment:
dependencies:
flutter:
sdk: flutter
flutter_test:
sdk: flutter

topics:
- color
Expand Down
22 changes: 22 additions & 0 deletions packages/css_colors/test/css_colors_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright 2013 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.

// #docregion Import
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And then these can be removed as well.

import 'package:css_colors/css_colors.dart';
// #enddocregion Import
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
testWidgets('CSSColors.orange should be correct',
(WidgetTester tester) async {
// Create a Container widget using CSSColors.orange.
// #docregion Usage
final Container orange = Container(color: CSSColors.orange);
// #enddocregion Usage

// Ensure the color of the container is the expected one.
expect(orange.color, equals(const Color(0xFFFFA500)));
});
}
1 change: 0 additions & 1 deletion script/configs/temp_exclude_excerpt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

# TODO(stuartmorgan): Remove everything from this list. See
# https://github.com/flutter/flutter/issues/102679
- css_colors
- espresso
- extension_google_sign_in_as_googleapis_auth
- flutter_image
Expand Down