Skip to content

Commit

Permalink
Fix some error (#167)
Browse files Browse the repository at this point in the history
* pubspec: Use double quotation instead of single.

* api: Sort import.

* api, event: Remove unused asset which never has null.
  • Loading branch information
ryojiro authored Apr 2, 2023
1 parent 67b2e21 commit f66bba5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
8 changes: 3 additions & 5 deletions lib/src/api.dart
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import 'dart:async';
import 'dart:io';
import 'package:flutter/services.dart';

import 'package:flutter/material.dart'
show
AlertDialog,
BuildContext,
FlatButton,
Navigator,
Text,
TextButton,
Widget,
showDialog;
import 'package:flutter/services.dart' show MethodChannel;
import 'package:flutter/services.dart' show MethodCall, MethodChannel;

import 'actions.dart';
import 'event.dart';
Expand Down Expand Up @@ -181,8 +180,7 @@ class FlutterCallkeep extends EventManager {
if (resp != null) {
var uuids = <String>[];
resp.forEach((element) {
if (element != null && element is String)
uuids.add(element);
if (element is String) uuids.add(element);
});
return uuids;
}
Expand Down
3 changes: 0 additions & 3 deletions lib/src/event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ class EventManager {
/// -- do something here
/// });
void on<T extends EventType>(T eventType, void Function(T event) listener) {
assert(listener != null, 'Null listener');
assert(eventType != null, 'Null eventType');
_addListener(eventType.runtimeType, listener);
}

Expand All @@ -53,7 +51,6 @@ class EventManager {
/// all the methods that call it enforce the types!!!!
void _addListener(Type runtimeType, dynamic listener) {
assert(listener != null, 'Null listener');
assert(runtimeType != null, 'Null runtimeType');
try {
var targets = listeners[runtimeType];
if (targets == null) {
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ version: 0.3.3
homepage: https://github.com/flutter-webrtc/callkeep

environment:
sdk: '>=2.12.0 <3.0.0'
flutter: '>=1.22.0'
sdk: ">=2.12.0 <3.0.0"
flutter: ">=1.22.0"

dependencies:
flutter:
Expand Down

0 comments on commit f66bba5

Please sign in to comment.