Skip to content

Commit

Permalink
Simulator #10
Browse files Browse the repository at this point in the history
  • Loading branch information
SaadArdati committed Oct 15, 2024
1 parent b68503d commit 3f666b6
Show file tree
Hide file tree
Showing 16 changed files with 74 additions and 46 deletions.
12 changes: 12 additions & 0 deletions lib/src/api/models/brightness.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/// Defines an enum to represent the brightness of the app, in which the system
/// status bar and navigation bar will be colored accordingly.
enum BrightnessModel {
/// Light brightness.
light,

/// Dark brightness.
dark,

/// System brightness, which will be determined by the system.
system,
}
1 change: 1 addition & 0 deletions lib/src/api/models/models.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export 'box_constraints.dart';
export 'box_height_style.dart';
export 'box_width_style.dart';
export 'breakpoint.dart';
export 'brightness.dart';
export 'cloud_database_queries/query_filter.dart';
export 'color_rgb.dart';
export 'color_rgba.dart';
Expand Down
5 changes: 5 additions & 0 deletions lib/src/api/nodes/canvas_node.dart
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ class CanvasProperties with SerializableMixin, EquatableMixin {
/// Safe area properties.
SafeAreaModel safeArea;

/// The brightness of the system UI.
BrightnessModel brightness;

/// Whether this canvas is a scaffold. A scaffold can hold an app bar, drawer,
/// bottom navigation bar, and floating action button. If any of this is
/// present, the canvas is a scaffold.
Expand All @@ -193,6 +196,7 @@ class CanvasProperties with SerializableMixin, EquatableMixin {
this.topAppBarPlaceholderId,
this.floatingActionButton,
this.safeArea = const SafeAreaModel.all(true),
this.brightness = BrightnessModel.system,
});

@override
Expand All @@ -201,6 +205,7 @@ class CanvasProperties with SerializableMixin, EquatableMixin {
topAppBarPlaceholderId,
floatingActionButton,
safeArea,
brightness,
];

/// Creates a new [CanvasProperties] from a JSON data.
Expand Down
11 changes: 11 additions & 0 deletions lib/src/api/nodes/canvas_node.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/src/api/nodes/divider_node.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/src/api/nodes/embedded_video_node.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/src/api/nodes/external_component_node.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/src/api/nodes/icon_node.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/src/api/nodes/loading_indicator_node.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/src/api/nodes/navigation_bar_node.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions lib/src/api/nodes/page_view_node.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/src/api/nodes/placeholder_node.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/src/api/nodes/single_placeholder_node.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/src/api/nodes/slider_node.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 21 additions & 22 deletions lib/src/api/nodes/text_node.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/src/api/nodes/web_view_node.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3f666b6

Please sign in to comment.