Skip to content

stretchy_header.dart:208:22: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null #18

@Varuhoord

Description

@Varuhoord

Using stretchy_header: ^2.0.0 with a flutter project
Just running the app

Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...
Running Gradle task 'assembleDebug'...
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Installing build\app\outputs\flutter-apk\app.apk...
Debug service listening on ws://127.0.0.1:52648/4rKioPesLg8=/ws
Syncing files to device sdk gphone64 x86 64...
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/stretchy_header-2.0.0/lib/stretchy_header.dart:208:22: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.

  • 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter/packages/flutter/lib/src/widgets/binding.dart').
    WidgetsBinding.instance!.addPostFrameCallback(_onLayoutDone);
    ^
    /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/stretchy_header-2.0.0/lib/stretchy_header.dart:218:22: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
  • 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter/packages/flutter/lib/src/widgets/binding.dart').
    WidgetsBinding.instance!.addPostFrameCallback(_onLayoutDone);
    ^
    W/Parcel ( 6383): Expecting binder but got null!
    D/EGL_emulation( 6383): app_time_stats: avg=712.17ms min=34.27ms max=1934.67ms count=3
    D/EGL_emulation( 6383): app_time_stats: avg=22.46ms min=5.75ms max=152.90ms count=34

Also on your github main page for stretchy_header ( https://github.com/diegoveloper/flutter_stretchy_header/ ) , your instructions are to use version 1.0.8 ?

"Getting started
You should ensure that you add the router as a dependency in your flutter project.

dependencies:
stretchy_header: "^1.0.8" " ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions