Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
pingbird committed Oct 5, 2023
1 parent c961ee7 commit 2e9e945
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 2,183 deletions.
8 changes: 2 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ orbs:
aws-s3: circleci/aws-s3@3.0

commands:
install_dart:
install_flutter:
steps:
- run:
name: "Install Flutter"
Expand Down Expand Up @@ -54,17 +54,13 @@ commands:

jobs:
linux_tests:
environment: &dart_version
DART_VERSION: "2.19.0"
DART_RELEASE: "stable"
docker:
- image: cimg/base:stable
steps:
- install_dart
- install_flutter
- test_all

build_website:
environment: *dart_version
docker:
- image: cimg/python:3.9
steps:
Expand Down
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"dart.flutterSdkPath": "C:\\Users\\ping\\.puro\\envs\\beta\\flutter",
"dart.sdkPath": "C:\\Users\\ping\\.puro\\envs\\beta\\flutter\\bin\\cache\\dart-sdk"
"dart.flutterSdkPath": "C:\\Users\\ping\\.puro\\envs\\stable\\flutter",
"dart.sdkPath": "C:\\Users\\ping\\.puro\\envs\\stable\\flutter\\bin\\cache\\dart-sdk"
}
4 changes: 4 additions & 0 deletions boxy/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [2.1.1]
* Added the `Scale` widget which scales its child by a given factor while preserving relative size unlike `Transform`.
* Added the `RedirectPointer` widget which allows you to hit test a child widget even if it overpaints its parent.

## [2.1.0]
* Support for Flutter 3.13

Expand Down
2 changes: 1 addition & 1 deletion boxy/lib/src/boxy/custom_boxy_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ class BoxyId<T extends Object> extends ParentDataWidget<BaseBoxyParentData> {
void applyParentData(RenderObject renderObject) {
assert(renderObject.parentData is BaseBoxyParentData);
final parentData = renderObject.parentData! as BaseBoxyParentData;
final parent = renderObject.parent! as RenderObject;
final parent = renderObject.parent!;
final dynamic oldUserData = parentData.userData;
if (id != parentData.id) {
parentData.id = id;
Expand Down
21 changes: 20 additions & 1 deletion boxy/lib/src/redirect_pointer.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';

/// Redirects pointer events to widgets anywhere else in the tree.
///
/// This is useful for widgets that overflow their parent such as from a
/// [Transform] and would otherwise not receive pointer events.
///
/// To use this widget, give the child you would like to receive pointer events
/// a [GlobalKey] and pass it to the [above] or [below] parameter.
///
/// Note that the RedirectPointer widget needs to encompass the entire widget
/// that should receive pointer events, we recommend wrapping the body of the
/// [Scaffold] so that it can receive pointer events for the whole screen.
///
/// You may also want to wrap the targets in an [IgnorePointer] so they aren't
/// hit tested more than once.
///
/// Hit testing is performed in the following order:
/// 1. The [above] widgets in reverse.
/// 2. The child.
/// 3. The [below] widgets in reverse.
class RedirectPointer extends SingleChildRenderObjectWidget {
const RedirectPointer({
super.key,
Expand Down
4 changes: 4 additions & 0 deletions boxy/lib/src/scale.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import 'package:flutter/material.dart';

import '../boxy.dart';

/// Scales its child by a given factor.
///
/// Unlike [Transform], this widget will pass adjusted constraints to its child
/// so that it can be laid out at the correct size without overflowing.
class Scale extends StatelessWidget {
const Scale({
super.key,
Expand Down
2 changes: 1 addition & 1 deletion boxy/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: boxy
description: Overcome limitations of built-in layouts, advanced flex, custom multi-child layouts, slivers, and more!
version: 2.1.0
version: 2.1.1
homepage: https://github.com/pingbird/boxy
documentation: https://boxy.wiki

Expand Down
2 changes: 1 addition & 1 deletion boxy/test/layers_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void main() {
OpacityLayer getLayer() {
final rootLayer =
// ignore: invalid_use_of_protected_member
RendererBinding.instance.renderView.layer! as TransformLayer;
RendererBinding.instance.renderViews.single.layer! as TransformLayer;
final pictureLayer = rootLayer.firstChild! as PictureLayer;
return pictureLayer.nextSibling! as OpacityLayer;
}
Expand Down
Loading

0 comments on commit 2e9e945

Please sign in to comment.