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

x_Icon null safety compile warnings #26

Open
asdef opened this issue Aug 9, 2021 · 1 comment
Open

x_Icon null safety compile warnings #26

asdef opened this issue Aug 9, 2021 · 1 comment

Comments

@asdef
Copy link

asdef commented Aug 9, 2021

When x_icon ^0.0.5 is included in a project, when that project is compiled (discovered during unit test execution) it throws two warnings in icon.dart:

/home/asdef/.pub-cache/hosted/pub.dartlang.org/x_icon-0.0.5/lib/src/icon.dart:51:24: Warning: Operand of null-aware operation '!' has type 'ThemeData' which excludes null.
 - 'ThemeData' is from 'package:flutter/src/material/theme_data.dart' ('/flutter/flutter/packages/flutter/lib/src/material/theme_data.dart').
          style: Theme.of(context)!
                       ^
/home/asdef/.pub-cache/hosted/pub.dartlang.org/x_icon-0.0.5/lib/src/icon.dart:52:16: Warning: Operand of null-aware operation '!' has type 'TextTheme' which excludes null.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/flutter/flutter/packages/flutter/lib/src/material/text_theme.dart').
              .textTheme!
               ^

To Reproduce

  1. add x_icon to any flutter project
  2. compile any code in the project, it doesn't even need to use x_icon
  3. receive compile warnings

Expected behavior
no compile warnings.

Additional context
Flutter version: 2.2.3
dart version: 2.13.4

@asdef
Copy link
Author

asdef commented Aug 9, 2021

Created pull request: #27

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

1 participant