Skip to content

Commit

Permalink
fix pub analysis error
Browse files Browse the repository at this point in the history
  • Loading branch information
hackware1993 committed May 22, 2022
1 parent 554e3d4 commit c1e44ce
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v1.6.1-stable

fix pub analysis error.

# v1.6.0-stable

add open grammar support.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,12 @@ dependencies:
flutter_constraintlayout:
git:
url: 'https://github.com/hackware1993/Flutter-ConstraintLayout.git'
ref: 'v1.6.0-stable'
ref: 'v1.6.1-stable'
```
```yaml
dependencies:
flutter_constraintlayout: ^1.6.0-stable
flutter_constraintlayout: ^1.6.1-stable
```
```dart
Expand Down
4 changes: 2 additions & 2 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,12 +283,12 @@ dependencies:
flutter_constraintlayout:
git:
url: 'https://github.com/hackware1993/Flutter-ConstraintLayout.git'
ref: 'v1.6.0-stable'
ref: 'v1.6.1-stable'
```
```yaml
dependencies:
flutter_constraintlayout: ^1.6.0-stable
flutter_constraintlayout: ^1.6.1-stable
```
```dart
Expand Down
4 changes: 3 additions & 1 deletion lib/src/extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,21 @@ class OffBuildWidget extends StatelessWidget {
int get hashCode => id.hashCode;
}

/// Provide open grammar
class MultiChildWidgetContext {
static MultiChildWidgetContext? currentContext;
List<Widget> contextChildren = [];
}

/// Provide open grammar
extension MultiChildWidgetChildExt on Widget {
Widget enter() {
MultiChildWidgetContext.currentContext?.contextChildren.add(this);
return this;
}
}

/// Provide open grammar
extension ConstraintLayoutExt on MultiChildRenderObjectWidget {
Widget open(void Function() block) {
MultiChildWidgetContext? temp = MultiChildWidgetContext.currentContext;
Expand Down Expand Up @@ -98,7 +101,6 @@ extension ConstraintLayoutExt on MultiChildRenderObjectWidget {
alignment: stack.alignment,
textDirection: stack.textDirection,
fit: stack.fit,
overflow: stack.overflow,
clipBehavior: stack.clipBehavior,
children: context.contextChildren);
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_constraintlayout
description: A super powerful Stack, build flexible layouts with constraints. Similar to ConstraintLayout for Android and AutoLayout for iOS.
version: 1.6.0-stable
version: 1.6.1-stable
anthor: hackware
homepage: https://github.com/hackware1993/Flutter-ConstraintLayout

Expand Down

0 comments on commit c1e44ce

Please sign in to comment.