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

[Web Error]: Expected a value of type 'SkDeletable', but got one of type 'Null' #213

Open
romain-bajoit-iot-d opened this issue Apr 2, 2021 · 2 comments

Comments

@romain-bajoit-iot-d
Copy link

Cannot paint some neumorphic widgets.
Neumorphic of depth=0, disabled NeumorphicButton, pressed NeumorphicButton ...

Error
======== Exception caught by rendering library =====================================================
The following TypeErrorImpl was thrown during paint():
Expected a value of type 'SkDeletable', but got one of type 'Null'

The relevant error-causing widget was: 
AnimatedContainer file:///Users/romainbajoit/Documents/dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_neumorphic-3.1.0/lib/src/widget/container.dart:122:14
When the exception was thrown, this was the stack: 
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 236:49         throw_
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 84:3           castError
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/types.dart 266:34          as
lib/_engine/engine/canvaskit/skia_object_cache.dart 146:55                           new
lib/_engine/engine/canvaskit/mask_filter.dart 10:3                                   blur
...
The following RenderObject was being processed when the exception was fired: RenderDecoratedBox#532e5 relayoutBoundary=up5
...  parentData: <none> (can use size)
...  constraints: BoxConstraints(0.0<=w<=Infinity, 0.0<=h<=884.0)
...  size: Size(23.0, 16.0)
...  decoration: NeumorphicDecoration
...  configuration: ImageConfiguration(bundle: PlatformAssetBundle#bb91a(), devicePixelRatio: 2.0, locale: en_US, textDirection: TextDirection.ltr, platform: macOS)
RenderObject: RenderDecoratedBox#532e5 relayoutBoundary=up5
parentData: <none> (can use size)
constraints: BoxConstraints(0.0<=w<=Infinity, 0.0<=h<=884.0)
size: Size(23.0, 16.0)
decoration: NeumorphicDecoration
configuration: ImageConfiguration(bundle: PlatformAssetBundle#bb91a(), devicePixelRatio: 2.0, locale: en_US, textDirection: TextDirection.ltr, platform: macOS)
...  child: RenderPadding#4e4b6 relayoutBoundary=up6 NEEDS-PAINT
...    parentData: <none> (can use size)
...    constraints: BoxConstraints(0.0<=w<=Infinity, 0.0<=h<=884.0)
...    size: Size(23.0, 16.0)
...    padding: EdgeInsets.zero
...    textDirection: ltr
...    child: RenderClipPath#31c31 relayoutBoundary=up7 NEEDS-PAINT
...      parentData: offset=Offset(0.0, 0.0) (can use size)
...      constraints: BoxConstraints(0.0<=w<=Infinity, 0.0<=h<=884.0)
...      size: Size(23.0, 16.0)
...      child: RenderPadding#df819 relayoutBoundary=up8 NEEDS-PAINT
...        parentData: <none> (can use size)
...        constraints: BoxConstraints(0.0<=w<=Infinity, 0.0<=h<=884.0)
...        size: Size(23.0, 16.0)
...        padding: EdgeInsets.zero
...        textDirection: ltr
...        child: RenderParagraph#2ddeb relayoutBoundary=up9 NEEDS-PAINT
...          parentData: offset=Offset(0.0, 0.0) (can use size)
...          constraints: BoxConstraints(0.0<=w<=Infinity, 0.0<=h<=884.0)
...          size: Size(23.0, 16.0)
...          textAlign: start
...          textDirection: ltr
...          softWrap: wrapping at box width
...          overflow: clip
...          locale: en_US
...          maxLines: unlimited
====================================================================================================

======== Exception caught by rendering library =====================================================
Expected a value of type 'SkDeletable', but got one of type 'Null'
The relevant error-causing widget was: 
AnimatedContainer file:///Users/romainbajoit/Documents/dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_neumorphic-3.1.0/lib/src/widget/container.dart:122:14
====================================================================================================

Code to reproduce the error

The error is triggered on build for the Neumorpic. It is not displayed on screen.
The error is triggered when the button is pressed on.

import 'package:flutter_neumorphic/flutter_neumorphic.dart';

void main() => runApp(MainApp());

class MainApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return NeumorphicApp(
      title: 'abc',
      home: ABC(),
    );
  }
}

class ABC extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Row(
          children: [
            NeumorphicButton(
              child: Text('abc'),
              onPressed: () => print('a'),
            ),
            Neumorphic(
              child: Text('abc'),
              style: NeumorphicStyle(depth: 0.0),
            ),
          ],
        ),
      ),
    );
  }
}
Excecution environment

Executed with and without --no-sound-null-safety, it does not change the behavior

[✓] Flutter (Channel beta, 2.0.2, on macOS 11.0.1 20B29 darwin-x64, locale en-BE)
  • Flutter version 2.0.2 at /Users/romainbajoit/Documents/dev/flutter
  • Framework revision 8962f6dc68 (3 weeks ago), 2021-03-11 13:22:20 -0800
  • Engine revision 5d8bf811b3
  • Dart version 2.12.1

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
  • Android SDK at /Users/romainbajoit/Library/Android/sdk
  • Platform android-30, build-tools 30.0.1
  • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
  • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
  • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
  • Xcode at /Applications/Xcode.app/Contents/Developer
  • Xcode 12.4, Build version 12D4e
  • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
  • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
  • Android Studio at /Applications/Android Studio.app/Contents
  • Flutter plugin can be installed from:
    🔨 https://plugins.jetbrains.com/plugin/9212-flutter
  • Dart plugin can be installed from:
    🔨 https://plugins.jetbrains.com/plugin/6351-dart
  • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] IntelliJ IDEA Ultimate Edition (version 2020.2)
  • IntelliJ at /Applications/IntelliJ IDEA.app
  • Flutter plugin can be installed from:
    🔨 https://plugins.jetbrains.com/plugin/9212-flutter
  • Dart plugin version 202.6397.47

[✓] Connected device (1 available)
  • Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.114

• No issues found!
@ppshah2023
Copy link

ppshah2023 commented May 15, 2021

What is this problem with people closing their issues. I say this because the problem still remains. Specifically, the issue is still (to keep it brief) an issue.

@AryashDubey
Copy link

I also got this issue with the tab bar widget. Hope this issue resolves soon!

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

3 participants