Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
Fixed UUID generation and json serialization (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-015 committed Oct 5, 2020
1 parent c9c8200 commit cc8e01f
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 7 deletions.
4 changes: 4 additions & 0 deletions lib/interpret_and_optimize/entities/inherited_text.g.dart

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

2 changes: 1 addition & 1 deletion lib/interpret_and_optimize/entities/layouts/row.g.dart

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

2 changes: 1 addition & 1 deletion lib/interpret_and_optimize/entities/layouts/stack.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class PBIntermediateStackLayout extends PBLayoutIntermediateNode {
List<PBIntermediateNode> children, PBContext currentContext) {
/// The width of this stack must be the full width of the Scaffold or Artboard. As discussed, at some point we can change this but for now, this makes the most sense.
var stack =
PBIntermediateStackLayout(UUID: Uuid().v4(), currentContext: currentContext);
PBIntermediateStackLayout(Uuid().v4(), currentContext: currentContext);
stack.prototypeNode = prototypeNode;
children.forEach((child) => stack.addChild(child));
return stack;
Expand Down
2 changes: 1 addition & 1 deletion lib/interpret_and_optimize/entities/layouts/stack.g.dart

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

Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@ class PBLayoutGenerationService implements PBGenerationService {
Map<String, PBLayoutIntermediateNode> layoutHandlers = {
'column': PBIntermediateColumnLayout(
currentContext: currentContext, UUID: Uuid().v4()),
'row': PBIntermediateRowLayout(currentContext: currentContext, UUID: Uuid().v4()),
'stack': PBIntermediateStackLayout(currentContext: currentContext, UUID: Uuid().v4()),
'row':
PBIntermediateRowLayout(Uuid().v4(), currentContext: currentContext),
'stack': PBIntermediateStackLayout(Uuid().v4(),
currentContext: currentContext),
};

for (var layoutType in currentContext.configuration.layoutPrecedence ?? ['column']) {
for (var layoutType
in currentContext.configuration.layoutPrecedence ?? ['column']) {
layoutType = layoutType.toLowerCase();
if (layoutHandlers.containsKey(layoutType)) {
_availableLayouts.add(layoutHandlers[layoutType]);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ environment:
dependencies:
archive: ^2.0.11
json_serializable: ^3.5.0
# build_runner: ^1.10.0
build_runner: ^1.10.0
mockito: ^4.1.1
hex: ^0.1.2
build: ^1.3.0
Expand Down

0 comments on commit cc8e01f

Please sign in to comment.