Skip to content

Commit 3f2be15

Browse files
committed
fix analyzer.
1 parent b2fab26 commit 3f2be15

9 files changed

+12
-11
lines changed

analysis_options.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ linter:
2929
- valid_regexps
3030
- void_checks
3131
# - always_put_required_named_parameters_first # we prefer having parameters in the same order as fields https://github.com/flutter/flutter/issues/10219
32-
- always_require_non_null_named_parameters
3332
- always_specify_types
3433
- annotate_overrides
3534
- prefer_single_quotes
@@ -63,4 +62,5 @@ analyzer:
6362

6463
exclude:
6564
- lib/src/grammar_parser.dart
66-
- tool/*
65+
- tool/*
66+
- test/*

example/pubspec.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ dependencies:
2525
path: ../
2626
shared_preferences: ^2.2.0
2727
permission_handler: ^11.1.0
28+
flutter_webrtc: ^0.10.4
2829

2930
dev_dependencies:
3031
flutter_test:

lib/sip_ua.dart

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// only expose the bare minimum of internals required
21
export 'src/enum_helper.dart';
32
export 'src/sip_ua_helper.dart';
43
export 'src/transport_type.dart';

lib/src/config.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ class Checks {
238238
dst!.registrar_server = parsed;
239239
}
240240
},
241-
'register_extra_headers': (src, dst) {
242-
var register_extra_headers = src?.register_extra_headers;
241+
'register_extra_headers': (Settings src, Settings? dst) {
242+
List<String>? register_extra_headers = src.register_extra_headers;
243243
if (register_extra_headers == null) return;
244244
dst?.register_extra_headers = register_extra_headers;
245245
},

lib/src/logger.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class MyLogPrinter extends LogPrinter {
2828
MyLogPrinter(this.currentWorkingDirectory);
2929

3030
static final Map<Level, AnsiColor> levelColors = <Level, AnsiColor>{
31-
Level.verbose: AnsiColor.fg(AnsiColor.grey(0.5)),
31+
Level.trace: AnsiColor.fg(AnsiColor.grey(0.5)),
3232
Level.debug: AnsiColor.none(),
3333
Level.info: AnsiColor.fg(12),
3434
Level.warning: AnsiColor.fg(208),

lib/src/sip_ua_helper.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ class RegisterParams {
686686
/// Allow extra headers and Contact Params to be sent on REGISTER
687687
/// Mainly used for RFC8599 Support
688688
/// https://github.com/cloudwebrtc/dart-sip-ua/issues/89
689-
List<String> extraHeaders = [];
689+
List<String> extraHeaders = <String>[];
690690
Map<String, dynamic> extraContactUriParams = <String, dynamic>{};
691691
}
692692

lib/src/transports/tcp_socket.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,11 @@ class SIPUATcpSocket extends SIPUASocketInterface {
169169

170170
@override
171171
bool isConnecting() {
172-
// TODO: implement isConnecting
172+
// TODO(cloudwebrtc): implement isConnecting
173173
throw UnimplementedError();
174174
}
175175

176176
@override
177-
// TODO: implement url
177+
// TODO(cloudwebrtc): implement url
178178
String? get url => throw UnimplementedError();
179179
}

lib/src/ua.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,8 @@ class UA extends EventManager {
660660
return;
661661
}
662662
} else if (method == SipMethod.SUBSCRIBE) {
663-
if (listeners['newSubscribe']?.length == 0) {
663+
// ignore: collection_methods_unrelated_type
664+
if (listeners['newSubscribe'] == null) {
664665
request.reply(405);
665666

666667
return;

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ dependencies:
2121

2222

2323
dev_dependencies:
24-
lints: ^3.0.0
2524
import_sorter: ^4.6.0
25+
lints: ^3.0.0
2626
test: any

0 commit comments

Comments
 (0)