Skip to content

Commit 981a115

Browse files
author
cgiuliani
committed
fix: make config scope constant
1 parent 99f3910 commit 981a115

File tree

4 files changed

+19
-29
lines changed

4 files changed

+19
-29
lines changed

configurator/lib/src/scopes/scope.dart

+15-25
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,21 @@ import 'package:configurator/configurator.dart';
44
abstract class ConfigScope {
55
abstract final String name;
66

7-
List<String> get partFiles => [];
8-
9-
int get weight;
10-
11-
Map<String, bool> get flags;
12-
13-
Map<String, dynamic> get images;
14-
15-
Map<String, dynamic> get misc;
16-
17-
Map<String, String> get colors;
18-
19-
Map<String, double> get sizes;
20-
21-
Map<String, double> get padding;
22-
23-
Map<String, double> get margins;
24-
25-
Map<String, double> get radius => {};
26-
27-
Map<String, dynamic> get textStyles => {};
28-
29-
Map<int, String?> get routes;
30-
31-
Map<String, Map<String, String>> get translations;
7+
const ConfigScope();
8+
9+
final List<String> partFiles = const [];
10+
final int weight = 0;
11+
final Map<String, bool> flags = const {};
12+
final Map<String, dynamic> images = const {};
13+
final Map<String, dynamic> misc = const {};
14+
final Map<String, String> colors = const {};
15+
final Map<String, double> sizes = const {};
16+
final Map<String, double> padding = const {};
17+
final Map<String, double> margins = const {};
18+
final Map<String, double> radius = const {};
19+
final Map<String, dynamic> textStyles = const {};
20+
final Map<int, String?> routes = const {};
21+
final Map<String, Map<String, String>> translations = const {};
3222

3323
static ConfigScope empty({required String name}) {
3424
return ProxyScope(name: name);

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: 0.0.32
3+
version: 0.0.33
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.2.3/","native_build":true,"dependencies":[]}],"android":[{"name":"path_provider_android","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_android-2.0.27/","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_foundation","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_foundation-2.2.3/","native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_linux-2.1.11/","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_windows-2.1.7/","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":"2023-06-16 10:17:46.416385","version":"3.7.9"}
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.2.3/","native_build":true,"dependencies":[]}],"android":[{"name":"path_provider_android","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_android-2.0.27/","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_foundation","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_foundation-2.2.3/","native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_linux-2.1.11/","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_windows-2.1.7/","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":"2023-06-16 11:11:09.163631","version":"3.7.9"}

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: 0.0.32
3+
version: 0.0.33
44
homepage:
55

66
environment:
@@ -30,7 +30,7 @@ dependencies:
3030
git:
3131
url: [email protected]:camrongiuliani/configurator.git
3232
path: configurator
33-
ref: 0.0.32
33+
ref: 0.0.33
3434

3535
dev_dependencies:
3636
flutter_test:

0 commit comments

Comments
 (0)