Skip to content

Commit 604505b

Browse files
committed
Mark final
1 parent 0f76150 commit 604505b

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

lib/src/cache/exception.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import '../exception.dart';
22

33
/// An [Error] when detected the cache file has been modified when getting
44
/// online resource failed.
5-
class GitHubColourCacheChecksumMismatchedError extends AssertionError
5+
final class GitHubColourCacheChecksumMismatchedError extends AssertionError
66
implements GitHubColourLoadFailedError {
77
/// Construct an [Error] for checksum mismatched.
88
GitHubColourCacheChecksumMismatchedError()

lib/src/swatch.dart

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import 'package:flutter/services.dart';
55
import 'package:flutter/widgets.dart'
66
show Color, ColorSwatch, WidgetsFlutterBinding;
77
import 'package:http/http.dart' as http show get;
8-
import 'package:meta/meta.dart' show sealed;
98

109
import 'cache/cache.dart';
1110
import 'cache/exception.dart';
@@ -15,7 +14,7 @@ const String _src =
1514
"https://raw.githubusercontent.com/ozh/github-colors/master/colors.json";
1615

1716
/// An [Error] thrown when response unsuccessfully and no cache can be used.
18-
class GitHubColourHTTPLoadFailedError extends GitHubColourLoadFailedError {
17+
final class GitHubColourHTTPLoadFailedError extends GitHubColourLoadFailedError {
1918
/// HTTP response code when fetching colour data.
2019
final int responseCode;
2120

@@ -28,7 +27,7 @@ class GitHubColourHTTPLoadFailedError extends GitHubColourLoadFailedError {
2827
}
2928

3029
/// An [Error] thrown when no resources available to initalize [GitHubColour].
31-
class GitHubColourNoAvailableResourceError extends GitHubColourLoadFailedError {
30+
final class GitHubColourNoAvailableResourceError extends GitHubColourLoadFailedError {
3231
GitHubColourNoAvailableResourceError._();
3332

3433
@override
@@ -53,8 +52,7 @@ Map<String, Color> _colourReader(String json) =>
5352
///
5453
/// Since 2.0.0, [GitHubColour] implemented [ColorSwatch] that getting colour
5554
/// can be more convenience. And serval old API will be [Deprecated].
56-
@sealed
57-
class GitHubColour extends UnmodifiableMapBase<String, Color>
55+
final class GitHubColour extends UnmodifiableMapBase<String, Color>
5856
implements ColorSwatch<String> {
5957
static GitHubColour? _instance;
6058
final Map<String, Color> _githubLangColour;

0 commit comments

Comments
 (0)