How to solve this error "('HttpClient Function(SecurityContext)') isn't a valid override of 'HttpOverrides.createHttpClient'"

2,797

Change SecurityContext to SecurityContext?.

Share:
2,797
GPService
Author by

GPService

Updated on December 30, 2022

Comments

  • GPService
    GPService over 1 year

    I use flutter version 2.2.1

    File : Main.dart

    enter image description here

    This is message error enter image description here

    How to solve this error?

    • jamesdlin
      jamesdlin almost 3 years
      1. Don't post screenshots of code and messages; those cannot be searched. 2. As shown by the error message, HttpOverrides.createHttpClient takes a SecurityContext?, not a SecurityContext.
  • Admin
    Admin over 2 years
    As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.