Git Product home page Git Product logo

Comments (3)

RaashVision avatar RaashVision commented on July 19, 2024 1

I have checked the package, replace few lines of code of oveflow with clip behaviour and I able to run the code. below is the changes I made.

class Stack extends widget.Stack {
  /// Create stack instance
 	 Stack({
   	 widget.Key key,
    	AlignmentGeometry alignment = AlignmentDirectional.topStart,
    TextDirection textDirection,
    StackFit fit = StackFit.loose,
    //Overflow overflow = Overflow.clip,
    Clip clipBehavior = Clip.antiAlias,
    List<widget.Widget> children = const <widget.Widget>[],
  }) : super(
            key: key,
            alignment: alignment,
            textDirection: textDirection,
            fit: fit,
            clipBehavior: clipBehavior,
            // overflow: overflow,
            children: children);

  @override
  RenderStack createRenderObject(widget.BuildContext context) {
    return _RenderStack(
      alignment: alignment,
      textDirection: textDirection ?? widget.Directionality.of(context),
      fit: fit,
      clipBehavior: clipBehavior,
      // overflow: overflow,
    );
  }
}

/// Enable overflow hitTest
class _RenderStack extends RenderStack {
  _RenderStack({
    List<RenderBox> children,
    AlignmentGeometry alignment = AlignmentDirectional.topStart,
    TextDirection textDirection,
    StackFit fit = StackFit.loose,
    Clip clipBehavior = Clip.antiAlias,
  }) : super(
          children: children,
          alignment: alignment,
          textDirection: textDirection,
          fit: fit,
          clipBehavior: clipBehavior,
        );

  @override
  bool hitTest(BoxHitTestResult result, {Offset position}) {
    if (clipBehavior == Clip.antiAliasWithSaveLayer ||
        size.contains(position)) {
      if (hitTestChildren(result, position: position) ||
          hitTestSelf(position)) {
        result.add(BoxHitTestEntry(this, position));
        return true;
      }
    }
    return false;
  }
}

```

I might wrong . Just my 2cent. I hope this might help you.

from convex_bottom_bar.

avenwu avatar avenwu commented on July 19, 2024

This breaking changes is a known issue.


Attention
If you are using flutter dev/beta channel, such as flutter v1.20, there can be compile error. Please use v2.2.4-flutter-1.20


Also I noticed that the v1.20 has been release into stable channel. We will merge the fixed branch into master soon

from convex_bottom_bar.

RaashVision avatar RaashVision commented on July 19, 2024

Noted @avenwu

from convex_bottom_bar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.