bazookon / giphy_get

Flutter plugin
MIT License
27 stars 67 forks source link

null-aware operation Warnings #27

Closed mashegoindustries closed 2 years ago

mashegoindustries commented 2 years ago

I just upgraded to latest version and I am suddenly getting the warnings below

../../../../.pub-cache/hosted/pub.dartlang.org/giphy_get-3.0.4/lib/src/views/tab/giphy_tab_detail.dart:238:22: Warning: Operand of null-aware operation '!' has type 'List' which excludes null.

rlee1990 commented 2 years ago

I got the same issue.

armandojimenez commented 2 years ago

Same issue here...

bazookon commented 2 years ago

WIP

bazookon commented 2 years ago

Can you post your flutter doctor please @rlee1990 @mashegoindustries

rlee1990 commented 2 years ago

@bazookon

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.10.2, on macOS 12.2.1 21D62 darwin-arm, locale
    en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.1)
[✓] VS Code (version 1.64.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

• No issues found!
pburel commented 2 years ago

Raygun found: Message: Null check operator used on a null value _GiphyTabDetailState._loadMore in package:giphy_get/src/views/tab/giphy_tab_detail.dart:213 _GiphyTabDetailState._scrollListener in package:giphy_get/src/views/tab/giphy_tab_detail.dart:251 ChangeNotifier.notifyListeners in package:flutter/src/foundation/change_notifier.dart:308 ChangeNotifier.notifyListeners in package:flutter/src/foundation/change_notifier.dart:308 ScrollPosition.notifyListeners in package:flutter/src/widgets/scroll_position.dart:969 ScrollPosition.setPixels in package:flutter/src/widgets/scroll_position.dart:278 ScrollPositionWithSingleContext.setPixels in package:flutter/src/widgets/scroll_position_with_single_context.dart:82 BallisticScrollActivity.applyMoveTo in package:flutter/src/widgets/scroll_activity.dart:566

rlee1990 commented 2 years ago

@bazookon was this fixed with the newest update?

pburel commented 2 years ago

sorry no.

_AssertionError._doThrowNew in dart:core-patch/errors_patch.dart:51 _AssertionError._throwNew in dart:core-patch/errors_patch.dart:40 ScrollController.position in package:flutter/src/widgets/scroll_controller.dart:108 _DraggableScrollableSheetScrollController.position in package:flutter/src/widgets/draggable_scrollable_sheet.dart:725 _GiphyTabDetailState._scrollListener in package:giphy_get/src/views/tab/giphy_tab_detail.dart:250 ChangeNotifier.notifyListeners in package:flutter/src/foundation/change_notifier.dart:308 ChangeNotifier.notifyListeners in package:flutter/src/foundation/change_notifier.dart:308

════════ Exception caught by foundation library ════════════════════════════════ ScrollController attached to multiple scroll views. 'package:flutter[/src/widgets/scroll_controller.dart]()': package:flutter/…/widgets/scroll_controller.dart:1 Failed assertion: line 108 pos 12: '_positions.length == 1'

════════════════════════════════════════════════════════════════════════════════

pburel commented 2 years ago

_GiphyTabDetailState._scrollListener in package:giphy_get/src/views/tab/giphy_tab_detail.dart:250 correcting with 'positions.last' ..... if ((widget.scrollController.positions.last.extentAfter

bazookon commented 2 years ago

@pburel thanks