Search code examples
flutterdartflutter-test

2 Errors affect app publishing in flutter?


I'm getting 2 errors even though App is working fine on simulator. Will these errors cause problem when publishing on google play store and ios App store?

First one:

 warning: The include file 'package:flutter_lints/flutter.yaml' in 'C:\Users\codingaccount\Desktop\myApp\analysis_options.yaml' can't be found when analyzing 'C:\Users\codingaccount\Desktop\myApp'. (include_file_not_found at [myApp] analysis_options.yaml:10)

Second one:

Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\contacts_service-0.6.3\android\src\main\java\flutter\plugins\contactsservice\contactsservice\ContactsServicePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

Solution

  • I think we should know why we are facing anything so this,

    The flutter_lints wouldn't work if you analysis_options.yaml contains

    include: package:lints/recommended.yaml
    
    linter:
      rules:
        - avoid_print
        - avoid_unnecessary_containers
        - avoid_web_libraries_in_flutter
        - no_logic_in_create_state
        - prefer_const_constructors
        - prefer_const_constructors_in_immutables
        - prefer_const_declarations
        - prefer_const_literals_to_create_immutables
        - sized_box_for_whitespace
        - use_full_hex_values_for_flutter_colors
        - use_key_in_widget_constructors
    

    Here is the link to discussion https://github.com/flutter/flutter/issues/86917