neckaros / secure_application

Secure your application from prying eyes
MIT License
103 stars 61 forks source link

Build warning on Flutter 3.0.0 #39

Closed gilescm closed 2 years ago

gilescm commented 2 years ago

When building an app with Flutter version 3.0.0 or above that uses the secure_application package I am seeing the warnings below. Could a new version on pub.dev be published that makes this package compatible with Flutter 3.0.0 please?

../../../../Library/flutter/.pub-cache/hosted/pub.dartlang.org/secure_application-3.8.0/lib/secure_application.dart:102:20: Warning: Operand of null-aware operation '!' has type
'WidgetsBinding' which excludes null.
 - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../../Library/flutter/packages/flutter/lib/src/widgets/binding.dart').
    WidgetsBinding.instance!.addObserver(this);
                   ^
../../../../Library/flutter/.pub-cache/hosted/pub.dartlang.org/secure_application-3.8.0/lib/secure_application.dart:112:20: Warning: Operand of null-aware operation '!' has type
'WidgetsBinding' which excludes null.
 - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../../Library/flutter/packages/flutter/lib/src/widgets/binding.dart').
    WidgetsBinding.instance!.removeObserver(this);
                   ^
../../../../Library/flutter/.pub-cache/hosted/pub.dartlang.org/secure_application-3.8.0/lib/secure_application.dart:134:30: Warning: Operand of null-aware operation '!' has type
'WidgetsBinding' which excludes null.
 - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../../Library/flutter/packages/flutter/lib/src/widgets/binding.dart').
              WidgetsBinding.instance!.addPostFrameCallback((_) {
                             ^
gilescm commented 2 years ago

This can be fixed with https://github.com/neckaros/secure_application/pull/34

andreykuzmenko commented 2 years ago

+1

neckaros commented 2 years ago

merged

neckaros commented 2 years ago

thanks for your help @gilescm !!