Skip to content

Commit 17f0261

Browse files
SaadArdatiBirjuVachhani
authored andcommitted
Node Enabling #1
1 parent 4af6cd8 commit 17f0261

72 files changed

Lines changed: 121 additions & 9 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lib/src/api/mixins.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ abstract class DefaultShapeNode extends SceneNode
3939
super.outerBoxLocal,
4040
super.retainedOuterBoxLocal,
4141
super.visible,
42+
super.enabled,
4243
super.rotationDegrees,
4344
super.alignment,
4445
super.margin,
@@ -105,6 +106,7 @@ abstract class ParentNode extends DefaultShapeNode
105106
super.outerBoxLocal,
106107
super.retainedOuterBoxLocal,
107108
super.visible,
109+
super.enabled,
108110
super.rotationDegrees,
109111
super.alignment,
110112
super.margin,

lib/src/api/nodes/accordion_node.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class AccordionNode extends SceneNode
3030
super.outerBoxLocal,
3131
super.retainedOuterBoxLocal,
3232
super.visible,
33+
super.enabled,
3334
super.rotationDegrees,
3435
super.alignment,
3536
super.margin,

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

Lines changed: 2 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/app_bar_node.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class AppBarNode extends SceneNode
4747
super.retainedOuterBoxLocal,
4848
super.rotationDegrees,
4949
super.visible,
50+
super.enabled,
5051
super.alignment,
5152
super.padding,
5253
super.margin,

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

Lines changed: 2 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/auto_placeholder_node.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class AutoPlaceholderNode extends DefaultShapeNode
3636
super.retainedOuterBoxLocal,
3737
super.rotationDegrees,
3838
super.visible,
39+
super.enabled,
3940
double cornerSmoothing = 0,
4041
CornerRadius cornerRadius = CornerRadius.zero,
4142
super.alignment,

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

Lines changed: 2 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/base_node.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,11 @@ abstract class BaseNode
363363
/// parent.
364364
double? heightFactor;
365365

366+
/// Determines whether the node is enabled or not. When translating the node
367+
/// into a widget or code, this value is used to determine whether this node
368+
/// should be included and accounted for or not.
369+
bool enabled;
370+
366371
/// Whether the node is sized in fraction of the parent's size.
367372
bool get isFractionallySized => widthFactor != null || heightFactor != null;
368373

@@ -394,6 +399,7 @@ abstract class BaseNode
394399
this.parentID = '',
395400
this.widthFactor,
396401
this.heightFactor,
402+
this.enabled = true,
397403
Map<String, String>? variables,
398404
Map<String, List<String>>? multipleVariables,
399405
}) : _basicBoxLocal = basicBoxLocal,

lib/src/api/nodes/button_node.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ class ButtonNode extends SceneNode with CustomPropertiesMixin {
110110
super.outerBoxLocal,
111111
super.retainedOuterBoxLocal,
112112
super.visible,
113+
super.enabled,
113114
super.alignment,
114115
super.padding,
115116
super.margin,

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

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

0 commit comments

Comments
 (0)