Skip to content

Commit

Permalink
Refactor method
Browse files Browse the repository at this point in the history
  • Loading branch information
KristijanMitrik committed Dec 17, 2024
1 parent 4db828b commit b79d5ba
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions windows/wireguard_dart_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,8 @@ void WireguardDartPlugin::HandleMethodCall(const flutter::MethodCall<flutter::En

if (call.method_name() == "checkTunnelConfiguration") {
auto tunnel_service = this->tunnel_service_.get();
if (tunnel_service == nullptr) {
result->Success(flutter::EncodableValue(false));
} else {
result->Success(flutter::EncodableValue(true));
}
result->Success(flutter::EncodableValue(tunnel_service != nullptr));
return;
}

if (call.method_name() == "nativeInit") {
Expand Down

0 comments on commit b79d5ba

Please sign in to comment.