Skip to content

Commit e72f4ed

Browse files
fix: color scope sorting
1 parent 25727d6 commit e72f4ed

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

configurator/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: configurator
22
description: A new Flutter package project.
3-
version: 1.0.7
3+
version: 1.0.8
44
homepage:
55

66
environment:
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_foundation","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"path_provider_android","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_android-2.2.4/","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_foundation","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_windows-2.2.1/","native_build":false,"dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2024-05-22 13:55:56.785757","version":"3.19.0"}
1+
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_foundation","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"path_provider_android","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_android-2.2.4/","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_foundation","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_windows-2.2.1/","native_build":false,"dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2024-06-16 00:15:17.530993","version":"3.19.0"}

configurator_flutter/lib/src/extensions/config_theme.dart

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ typedef ThemeExtensionBuilder = ThemeExtension Function( Configuration );
77

88
extension ThemeF on Configuration {
99

10+
List<ConfigScope> get _scopesSorted =>
11+
scopes.sorted((a, b) => a.weight.compareTo(b.weight));
12+
1013
ThemeData buildTheme({
1114
ThemeData? baseTheme,
1215
List<ThemeExtension> extensions = const [],
@@ -21,7 +24,7 @@ extension ThemeF on Configuration {
2124
}
2225

2326
Color colorValue( String id ) {
24-
String? colorValue = scopes.reversed.firstWhereOrNull( ( s ) {
27+
String? colorValue = _scopesSorted.reversed.firstWhereOrNull( ( s ) {
2528
return s.colors.containsKey( id );
2629
})?.colors[ id ];
2730

configurator_flutter/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: configurator_flutter
22
description: A new Flutter package project.
3-
version: 1.0.7
3+
version: 1.0.8
44
homepage:
55

66
environment:
@@ -31,7 +31,7 @@ dependencies:
3131
git:
3232
url: [email protected]:camrongiuliani/configurator.git
3333
path: configurator
34-
ref: 1.0.7
34+
ref: 1.0.8
3535

3636
dev_dependencies:
3737
flutter_test:

0 commit comments

Comments
 (0)