Skip to content

Commit

Permalink
💾 Feat: Toast text native function added.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dynesshely committed Mar 29, 2023
1 parent 055d48d commit ecfd92b
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -20,9 +20,14 @@ class MainActivity : FlutterActivity() {
channel = MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL)
channel.setMethodCallHandler { call, result ->
if (call.method == "getMAC") {
var mac = getMacAddress();
result.success(mac);
var mac = getMacAddress()
result.success(mac)
}

if (call.method == "toastText") {
var text = call.argument("text")
Toast.makeText(this, mac, Toast.LENGTH_LONG).show()
result.success()
}
}
}
Expand Down

0 comments on commit ecfd92b

Please sign in to comment.