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

Example does not build #1893

Closed
WorikQCI opened this issue Jul 12, 2023 · 2 comments
Closed

Example does not build #1893

WorikQCI opened this issue Jul 12, 2023 · 2 comments

Comments

@WorikQCI
Copy link

WorikQCI commented Jul 12, 2023

Package

http2_adapter

Version

2.3.0

Output of flutter doctor -v

import 'package:dio_http2_adapter/dio_http2_adapter.dart';
:
:
dio.options
      ..connectTimeout = const Duration(seconds: 50)
      ..receiveTimeout = const Duration(seconds: 50)
      ..validateStatus = (int? status) {
        return status != null && status > 0;
      }
      ..headers = headers
      ..httpClientAdapter = Http2Adapter(
        ConnectionManager(idleTimeout: const Duration(seconds: 10)),
      );

Get error:

 "The setter 'httpClientAdapter' isn't defined for the type 'BaseOptions'.\nTry importing the library that defines 'httpClientAdapter', correcting the name to the name of an existing setter, or defining a setter or field named 'httpClientAdapter'.",

Dart Version

No response

Steps to Reproduce

Above

Expected Result

????

Actual Result

????

@WorikQCI WorikQCI added h: need triage This issue needs to be categorized s: bug Something isn't working labels Jul 12, 2023
@AlexV525
Copy link
Member

Your cascade notation is targeting the options, not dio.

@AlexV525 AlexV525 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 12, 2023
@AlexV525 AlexV525 added i: out of support and removed h: need triage This issue needs to be categorized s: bug Something isn't working labels Jul 12, 2023
@WorikQCI
Copy link
Author

Your cascade notation is targeting the options, not dio.

I foolishly did not include my source. Damn.

My memory tells me I copied that code from an example, but that is useless without a reference to it.

Sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants