Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'overflow' is deprecated and shouldn't be used. Use clipBehavior instead

I need an overflowed widget using clip behavior and I have no idea how to do that?

 child: Row(
    children: [
        Stack(
            children: [],
        overflow: Overflow.clip,
                                  ) 

enter image description here

like image 283
Namsrai Khatanbaatar Avatar asked Mar 29 '21 09:03

Namsrai Khatanbaatar


People also ask

What is the use of clipBehavior in Flutter?

The clipBehavior property is new and you'll see it a lot in the Material Widgets because of the breaking change discussed a few months ago. With this change Flutter apps are 30% faster, but part of this breaking change is that it disabled the automatic call to saveLayer , and it exposes a clipBehavior property.

How do you clip a container in Flutter?

You can use CustomPaint to draw a round rectangle and ClipRect to only render its half to be a "notch." CustomPaintNotch paints a round rectangle at the edge of the top-center part of the Container widget. Since ClipRect was used, paint beyond the area won't be rendered. This will be the notch of the rectangle.

Is Stack Overflow overflow deprecated?

Use clipBehavior instead - Stack Overflow 'overflow' is deprecated and shouldn't be used. Use clipBehavior instead I need an overflowed widget using clip behavior and I have no idea how to do that? child: Row ( children: [ Stack ( children: [], overflow: Overflow.clip, )

Does the quick-fix to migrate to clipbehaviour work with overflow arguments?

However the quick-fix to migrate to clipBehaviour appears only for a and c. It does not appear when overflow is the only argument and there is a trailing comma. @bwilkerson I presume this is an analyzer issue and not a bug in the fix data (I couldn't see anything obvious in the YAML that seems like it should be able to influence this).

Is 'overflow' deprecated in Salesforce?

'overflow' is deprecated and shouldn't be used. Use clipBehavior instead I need an overflowed widget using clip behavior and I have no idea how to do that?

Is 'overflow' deprecated in flutter?

'overflow' is deprecated and shouldn't be used. Use clipBehavior instead. See the migration guide in flutter.dev/go/clip-behavior. This feature was deprecated after v1.22.0-12.0.pre..


Video Answer


2 Answers

Use clipBehavior like this:

Stack(
  clipBehavior: Clip.none, // This is what you need. 
  children: [],
)
like image 95
CopsOnRoad Avatar answered Oct 27 '22 09:10

CopsOnRoad


Use

clipBehavior: Clip.none,

Instead of

overflow: Overflow.clip,

overflow is deprecated since flutter 2.10.

like image 44
Adie RT Avatar answered Oct 27 '22 09:10

Adie RT