Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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/palette_generator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT
## 0.3.2

* Fix typos
* Fix `unnecessary_import` lint errors.

## 0.3.1
Expand Down
8 changes: 4 additions & 4 deletions packages/palette_generator/lib/palette_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import 'package:flutter/painting.dart';

/// A description of an encoded image.
///
/// Used in [PaletteGenerator.fromEncodedImage].
/// Used in [PaletteGenerator.fromByteData].
class EncodedImage {
/// Creates a description of an encoded image.
const EncodedImage(
Expand Down Expand Up @@ -98,12 +98,12 @@ class PaletteGenerator with Diagnosticable {
_selectSwatches();
}

// TODO(gspencergoog): remove `dart:ui` paragragh from [fromByteData] method when https://github.com/flutter/flutter/issues/10647 is resolved
// TODO(gspencergoog): remove `dart:ui` paragraph from [fromByteData] method when https://github.com/flutter/flutter/issues/10647 is resolved

/// Create a [PaletteGenerator] asynchronously from encoded image [ByteData],
/// width, and height. These parameters are packed in [EncodedImage].
///
/// The image encoding must be RGBA with 8-bit per channel, this corresponds to
/// The image encoding must be RGBA with 8 bits per channel, this corresponds to
/// [ImageByteFormat.rawRgba] or [ImageByteFormat.rawStraightRgba].
///
/// In contast with [fromImage] and [fromImageProvider] this method can be used
Expand Down Expand Up @@ -148,7 +148,7 @@ class PaletteGenerator with Diagnosticable {
encodedImage.byteData.lengthInBytes ~/ 4 ==
encodedImage.width * encodedImage.height,
"Image byte data doesn't match the image size, or has invalid encoding. "
'The encoding must be RGBA with 8 bit per channel.',
'The encoding must be RGBA with 8 bits per channel.',
);

final _ColorCutQuantizer quantizer = _ColorCutQuantizer(
Expand Down
2 changes: 1 addition & 1 deletion packages/palette_generator/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: palette_generator
description: Flutter package for generating palette colors from a source image.
repository: https://github.com/flutter/packages/tree/master/packages/palette_generator
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+palette_generator%22
version: 0.3.1
version: 0.3.2

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down