hybrid_core 0.0.1
hybrid_core: ^0.0.1 copied to clipboard
The core library of the Hybrid SDK.
hybrid_core #
The core library of the Hybrid SDK.
Getting Started #
Add hybrid_core
as a dependency in your pubspec.yaml file.
dependencies:
hybrid_core: ^<latest-version>
Or, run this command in your project folder.
flutter pub add hybrid_core
Features #
Feature | Android | iOS | macOS |
---|---|---|---|
OS | 🙆 | 🙆 | 🙆 |
Topics #
OS #
- Get the
OS
instance.
final os = OS();
- Check the OS type.
if (os is AndroidOS) {
...
} else if (os is iOS) {
...
} else if (os is macOS) {
...
} else {
throw TypeError();
}
3.Get the version.
// AndroidOS
final api = os.api;
// iOS and macOS
final version = os.versioin;
4.Check version.
// AndroidOS
final atLeastAPI = os.atLeastAPI(33);
// iOS and macOS
final version = DarwinOSVersion.number(17.0);
final atLeastVersion = os.atLeastVersion(version);
Check the example
to see how to use the corresponding API.