Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slider Button throws an exception. #21

Closed
AliAAli1 opened this issue Jun 8, 2021 · 5 comments
Closed

Slider Button throws an exception. #21

AliAAli1 opened this issue Jun 8, 2021 · 5 comments

Comments

@AliAAli1
Copy link

AliAAli1 commented Jun 8, 2021

The following NoSuchMethodError was thrown during paint():
The method 'toPaint' was called on null.
Receiver: null
Tried calling: toPaint()

The relevant error-causing widget was
SliderButton
lib\components\sheets.dart:248
When the exception was thrown, this was the stack
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:54:5)
#1 _BoxDecorationPainter._paintShadows
package:flutter/…/painting/box_decoration.dart:436
#2 _BoxDecorationPainter.paint
package:flutter/…/painting/box_decoration.dart:482
#3 RenderDecoratedBox.paint
package:flutter/…/rendering/proxy_box.dart:2146
#4 RenderObject._paintWithContext
package:flutter/…/rendering/object.dart:2322
...

@lexprimost
Copy link

same issue here . did you find a solution ?

@lexprimost
Copy link

i wrapped it in a container and it works fine now

@tjmeal
Copy link

tjmeal commented Jul 20, 2021

Same problem, and wrapping into Container doesnt solve the problem for me. Is there any solution comming ?

@Hasilt
Copy link

Hasilt commented Aug 1, 2021

workaround is to add boxshadow to SliderButton.

@harmispatel
Copy link

harmispatel commented Aug 6, 2021

Do like this

Container( child: SliderButton( action: () { ///Do something here Navigator.of(context).pop(); }, label: Text( "Slide to cancel Event", style: TextStyle( color: Color(0xff4a4a4a), fontWeight: FontWeight.w500, fontSize: 17), ), icon: Text( "x", style: TextStyle( color: Colors.white, fontWeight: FontWeight.w400, fontSize: 44, ), ), boxShadow: BoxShadow( color: Theme.of(context).primaryColor, blurRadius: 2.0, spreadRadius: 2.0, offset: Offset.zero ), ), )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants