Skip to content

Commit 3f666b6

Browse files
committed
Simulator #10
1 parent b68503d commit 3f666b6

16 files changed

+74
-46
lines changed

lib/src/api/models/brightness.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/// Defines an enum to represent the brightness of the app, in which the system
2+
/// status bar and navigation bar will be colored accordingly.
3+
enum BrightnessModel {
4+
/// Light brightness.
5+
light,
6+
7+
/// Dark brightness.
8+
dark,
9+
10+
/// System brightness, which will be determined by the system.
11+
system,
12+
}

lib/src/api/models/models.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export 'box_constraints.dart';
2020
export 'box_height_style.dart';
2121
export 'box_width_style.dart';
2222
export 'breakpoint.dart';
23+
export 'brightness.dart';
2324
export 'cloud_database_queries/query_filter.dart';
2425
export 'color_rgb.dart';
2526
export 'color_rgba.dart';

lib/src/api/nodes/canvas_node.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ class CanvasProperties with SerializableMixin, EquatableMixin {
178178
/// Safe area properties.
179179
SafeAreaModel safeArea;
180180

181+
/// The brightness of the system UI.
182+
BrightnessModel brightness;
183+
181184
/// Whether this canvas is a scaffold. A scaffold can hold an app bar, drawer,
182185
/// bottom navigation bar, and floating action button. If any of this is
183186
/// present, the canvas is a scaffold.
@@ -193,6 +196,7 @@ class CanvasProperties with SerializableMixin, EquatableMixin {
193196
this.topAppBarPlaceholderId,
194197
this.floatingActionButton,
195198
this.safeArea = const SafeAreaModel.all(true),
199+
this.brightness = BrightnessModel.system,
196200
});
197201

198202
@override
@@ -201,6 +205,7 @@ class CanvasProperties with SerializableMixin, EquatableMixin {
201205
topAppBarPlaceholderId,
202206
floatingActionButton,
203207
safeArea,
208+
brightness,
204209
];
205210

206211
/// Creates a new [CanvasProperties] from a JSON data.

lib/src/api/nodes/canvas_node.g.dart

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/api/nodes/divider_node.g.dart

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/api/nodes/embedded_video_node.g.dart

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/api/nodes/external_component_node.g.dart

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/api/nodes/icon_node.g.dart

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/api/nodes/loading_indicator_node.g.dart

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/api/nodes/navigation_bar_node.g.dart

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)