Skip to content

Commit

Permalink
fix analyzer.
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwebrtc committed May 8, 2024
1 parent b2fab26 commit 3f2be15
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -63,4 +62,5 @@ analyzer:

exclude:
- lib/src/grammar_parser.dart
- tool/*
- tool/*
- test/*
1 change: 1 addition & 0 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion lib/sip_ua.dart
Original file line number Diff line number Diff line change
@@ -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';
4 changes: 2 additions & 2 deletions lib/src/config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>? register_extra_headers = src.register_extra_headers;
if (register_extra_headers == null) return;
dst?.register_extra_headers = register_extra_headers;
},
Expand Down
2 changes: 1 addition & 1 deletion lib/src/logger.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class MyLogPrinter extends LogPrinter {
MyLogPrinter(this.currentWorkingDirectory);

static final Map<Level, AnsiColor> levelColors = <Level, AnsiColor>{
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),
Expand Down
2 changes: 1 addition & 1 deletion lib/src/sip_ua_helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> extraHeaders = [];
List<String> extraHeaders = <String>[];
Map<String, dynamic> extraContactUriParams = <String, dynamic>{};
}

Expand Down
4 changes: 2 additions & 2 deletions lib/src/transports/tcp_socket.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
3 changes: 2 additions & 1 deletion lib/src/ua.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ dependencies:


dev_dependencies:
lints: ^3.0.0
import_sorter: ^4.6.0
lints: ^3.0.0
test: any

0 comments on commit 3f2be15

Please sign in to comment.