NativeTools class
Native methods shared by Android, iOS, macOS and HarmonyOS.
Constructors
- NativeTools()
-
Returns the shared NativeTools instance.
factory
Properties
-
activityResult
→ List<
AndroidActivityResultHandler> -
Activity result listeners. Only supported on Android.
final
-
getInstalledApps
→ Future<
List< AppPackageInfo> > -
Returns the apps installed on Android.
no setter
-
gpsStatus
→ Future<
bool> -
Whether GPS is enabled.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addKeyboardListener(
NativeKeyboardStatusCallback callback) → Future< bool> - Adds a keyboard status listener.
-
exitApp(
) → Future< bool?> - Exits the app.
-
getPackageInfo(
String packageName) → Future< AppPackageInfo?> -
Returns the package info of
packageName. -
installApk(
String path) → Future< bool> -
Installs the APK located at
path. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeKeyboardListener(
NativeKeyboardStatusCallback callback) → Future< bool> - Removes a keyboard status listener.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → NativeTools
-
The shared NativeTools instance.
final