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

null-aware operator was used on non-null value in at_contacts_flutter and at_onboarding_flutter #408

Closed
yahu1031 opened this issue May 12, 2022 · 11 comments
Assignees
Labels
3 SP 3 Story Points - 1 Day Small bug Something isn't working

Comments

@yahu1031
Copy link
Member

Describe the bug
In at_contacts_flutter and at_onboarding_flutter has null-aware issue with WidgetsBinding.instance.

To Reproduce
Steps to reproduce the behavior:

  1. Install/Upgrade Flutter to 3.0.0
  2. Upgrade all you at packages
  3. Run any app.

Expected behavior
This Error/Warning is not expected

Logs

Launching lib/main.dart on iPhone 13 in debug mode...
Xcode build done.                                           37.4s
: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../../../Development/flutter/packages/flutter/lib/src/widgets/binding.dart').

            WidgetsBinding.instance!.addPostFrameCallback((Duration timeStamp) {
                           ^
: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../../../Development/flutter/packages/flutter/lib/src/widgets/binding.dart').
    WidgetsBinding.instance!.addPostFrameCallback((_) {
                   ^
: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../../../Development/flutter/packages/flutter/lib/src/widgets/binding.dart').
    WidgetsBinding.instance!.addPostFrameCallback((Duration timeStamp) {
                   ^
: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../../../Development/flutter/packages/flutter/lib/src/widgets/binding.dart').
    WidgetsBinding.instance!.addPostFrameCallback((timeStamp) async {
                   ^
: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../../../Development/flutter/packages/flutter/lib/src/widgets/binding.dart').
    WidgetsBinding.instance!.addPostFrameCallback((timeStamp) async {
                   ^
: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../../../Development/flutter/packages/flutter/lib/src/widgets/binding.dart').
    WidgetsBinding.instance?.addPostFrameCallback((timeStamp) async {
                   ^

Connecting to VM Service at ws://127.0.0.1:52300/lITl4cNAfHU=/ws
flutter: FINER|2022-05-12 22:34:53.334998|at_skeleton_app|Environment failed to load from .env:
flutter: SEVERE|2022-05-12 22:34:54.114698|AtClientService|Atsign not found
flutter: INFO|2022-05-12 22:34:54.205284|QR Scan|camera status => PermissionStatus.denied
flutter: INFO|2022-05-12 22:34:54.206357|QR Scan|storage status is PermissionStatus.granted

Screenshot 2022-05-12 at 10 38 48 PM

Smartphone (please complete the following information):

  • Device: iPhone12
  • OS: iOS15.4

Were you using an @‎application when the bug was found?

  • @dude
@yahu1031 yahu1031 added the bug Something isn't working label May 12, 2022
@sachins-geekyants sachins-geekyants added the 8 SP 8 Story Points - 5 Days Large label May 16, 2022
@yahu1031
Copy link
Member Author

@sachins-geekyants I don't think this takes 8SP. This is because of the Flutter 3.0 version. WidgetBinding.instance is not nullable anymore. Previously it used to be nullable. Not sure, Please LMK this is not what this issue is about.

@sachins-geekyants
Copy link
Contributor

sachins-geekyants commented May 25, 2022

Along with above mentioned WidgetsBinding.instance null aware issue we also have to apply lint rules in packages.

  • at_backupkey_flutter
  • at_chat_flutter
  • at_common_flutter
  • at_contacts_flutter
  • at_contacts_group_flutter
  • at_events_flutter
  • at_location_flutter
  • at_notify_flutter
  • at_onboarding_flutter
  • at_sync_ui_flutter
  • at_theme_flutter

@sachins-geekyants
Copy link
Contributor

null aware fix and linting have been applied to packages - need to test examples and deploy.
Moving to next sprint.

@sachins-geekyants sachins-geekyants added 3 SP 3 Story Points - 1 Day Small PR38 and removed 8 SP 8 Story Points - 5 Days Large labels May 30, 2022
@Pritam-deb Pritam-deb mentioned this issue May 30, 2022
@nitesh2599
Copy link
Contributor

nitesh2599 commented Jun 2, 2022

Packages testing and publishing:

  • at_backupkey_flutter
  • at_chat_flutter
  • at_common_flutter
  • at_contacts_flutter
  • at_contacts_group_flutter
  • at_events_flutter
  • at_location_flutter
  • at_notify_flutter
  • at_onboarding_flutter
  • at_sync_ui_flutter
  • at_theme_flutter

@nitesh2599 nitesh2599 mentioned this issue Jun 5, 2022
@nitesh2599
Copy link
Contributor

@yahu1031 We have removed the bang operator and published the packages.

@yahu1031
Copy link
Member Author

yahu1031 commented Jun 7, 2022

image
Recently go this from one of the interns. Could you please check this? @nitesh2599

@nitesh2599
Copy link
Contributor

@yahu1031 Can you ask for his flutter version ?

@yahu1031
Copy link
Member Author

yahu1031 commented Jun 8, 2022

2.10.3

@nitesh2599
Copy link
Contributor

This is a change made with respect to flutter 3.0 .

If he wants to use any flutter 2... versions, he should use previous versions of the package.

@sachins-geekyants
Copy link
Contributor

@yahu1031 Is the issue resolved? can we close this ticket?

@yahu1031
Copy link
Member Author

yes, I'm closing this as it was resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 SP 3 Story Points - 1 Day Small bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants