diff --git a/analysis_options.yaml b/analysis_options.yaml index 6f71e31c..3a1f08c9 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -29,7 +29,6 @@ linter: - valid_regexps - void_checks # - always_put_required_named_parameters_first # we prefer having parameters in the same order as fields https://github.com/flutter/flutter/issues/10219 - - always_require_non_null_named_parameters - always_specify_types - annotate_overrides - prefer_single_quotes @@ -63,4 +62,5 @@ analyzer: exclude: - lib/src/grammar_parser.dart - - tool/* \ No newline at end of file + - tool/* + - test/* \ No newline at end of file diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 748cafc6..5ac266a0 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -25,6 +25,7 @@ dependencies: path: ../ shared_preferences: ^2.2.0 permission_handler: ^11.1.0 + flutter_webrtc: ^0.10.4 dev_dependencies: flutter_test: diff --git a/lib/sip_ua.dart b/lib/sip_ua.dart index 03d5fc00..64d80491 100644 --- a/lib/sip_ua.dart +++ b/lib/sip_ua.dart @@ -1,4 +1,3 @@ -/// only expose the bare minimum of internals required export 'src/enum_helper.dart'; export 'src/sip_ua_helper.dart'; export 'src/transport_type.dart'; diff --git a/lib/src/config.dart b/lib/src/config.dart index 15256a5d..88d0541a 100644 --- a/lib/src/config.dart +++ b/lib/src/config.dart @@ -238,8 +238,8 @@ class Checks { dst!.registrar_server = parsed; } }, - 'register_extra_headers': (src, dst) { - var register_extra_headers = src?.register_extra_headers; + 'register_extra_headers': (Settings src, Settings? dst) { + List? register_extra_headers = src.register_extra_headers; if (register_extra_headers == null) return; dst?.register_extra_headers = register_extra_headers; }, diff --git a/lib/src/logger.dart b/lib/src/logger.dart index d991b757..d8989695 100644 --- a/lib/src/logger.dart +++ b/lib/src/logger.dart @@ -28,7 +28,7 @@ class MyLogPrinter extends LogPrinter { MyLogPrinter(this.currentWorkingDirectory); static final Map levelColors = { - Level.verbose: AnsiColor.fg(AnsiColor.grey(0.5)), + Level.trace: AnsiColor.fg(AnsiColor.grey(0.5)), Level.debug: AnsiColor.none(), Level.info: AnsiColor.fg(12), Level.warning: AnsiColor.fg(208), diff --git a/lib/src/sip_ua_helper.dart b/lib/src/sip_ua_helper.dart index 2ec1e5fe..9b2b9005 100644 --- a/lib/src/sip_ua_helper.dart +++ b/lib/src/sip_ua_helper.dart @@ -686,7 +686,7 @@ class RegisterParams { /// Allow extra headers and Contact Params to be sent on REGISTER /// Mainly used for RFC8599 Support /// https://github.com/cloudwebrtc/dart-sip-ua/issues/89 - List extraHeaders = []; + List extraHeaders = []; Map extraContactUriParams = {}; } diff --git a/lib/src/transports/tcp_socket.dart b/lib/src/transports/tcp_socket.dart index a786a6e6..d172fcf8 100644 --- a/lib/src/transports/tcp_socket.dart +++ b/lib/src/transports/tcp_socket.dart @@ -169,11 +169,11 @@ class SIPUATcpSocket extends SIPUASocketInterface { @override bool isConnecting() { - // TODO: implement isConnecting + // TODO(cloudwebrtc): implement isConnecting throw UnimplementedError(); } @override - // TODO: implement url + // TODO(cloudwebrtc): implement url String? get url => throw UnimplementedError(); } diff --git a/lib/src/ua.dart b/lib/src/ua.dart index 9b213b32..36eddc94 100644 --- a/lib/src/ua.dart +++ b/lib/src/ua.dart @@ -660,7 +660,8 @@ class UA extends EventManager { return; } } else if (method == SipMethod.SUBSCRIBE) { - if (listeners['newSubscribe']?.length == 0) { + // ignore: collection_methods_unrelated_type + if (listeners['newSubscribe'] == null) { request.reply(405); return; diff --git a/pubspec.yaml b/pubspec.yaml index 73eb5e6a..ac0d57f2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -21,6 +21,6 @@ dependencies: dev_dependencies: - lints: ^3.0.0 import_sorter: ^4.6.0 + lints: ^3.0.0 test: any