Skip to content

Commit

Permalink
🎨 Make VerboseLogMethodChannel
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 committed Dec 28, 2024
1 parent 3da6fad commit 417f31f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/src/internal/plugin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ class PMMethodChannel extends MethodChannel {
if (arguments is! Map) {
return super.invokeMethod<T>(method, arguments);
}
final cancelToken = arguments[PMConstants.cancelTokenKey];
if (cancelToken == null) {
arguments[PMConstants.cancelTokenKey] = PMCancelToken().key;
}
arguments.putIfAbsent(
PMConstants.cancelTokenKey,
() => PMCancelToken().key,
);
return super.invokeMethod<T>(method, arguments);
}
}

class VerboseLogMethodChannel extends MethodChannel {
class VerboseLogMethodChannel extends PMMethodChannel {
VerboseLogMethodChannel({
required String name,
required this.logFilePath,
Expand Down

0 comments on commit 417f31f

Please sign in to comment.