Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions package/lib/src/controls/create_control.dart
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,9 @@ Widget _offsetControl(
}
: null,
child: widget);
} else if (offsetDetails != null) {
return FractionalTranslation(
translation: Offset(offsetDetails.x, offsetDetails.y), child: widget);
}
return widget;
}
Expand Down
4 changes: 2 additions & 2 deletions package/lib/src/utils/transforms.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import 'dart:convert';

import 'alignment.dart';
import 'package:flutter/material.dart';

import '../models/control.dart';
import 'alignment.dart';
import 'numbers.dart';

RotationDetails? parseRotate(Control control, String propName) {
Expand Down Expand Up @@ -50,7 +50,7 @@ ScaleDetails scaleFromJSON(dynamic json) {
OffsetDetails? parseOffset(Control control, String propName) {
var v = control.attrString(propName, null);
if (v == null) {
return OffsetDetails(x: 0, y: 0);
return null;
}

final j1 = json.decode(v);
Expand Down