Last updated:
0 purchases
hybrid core
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>
copied to clipboard
Or, run this command in your project folder.
flutter pub add hybrid_core
copied to clipboard
Topics #
OS #
Get the OS instance.
final os = OS.instance;
copied to clipboard
Check the OS type.
if (os is Android) {
...
} else if (os is iOS) {
...
} else if (os is macOS) {
...
} else if (os is Windows) {
...
} else if (os is Linux) {
...
} else {
throw TypeError();
}
copied to clipboard
3.Get the version.
// Android
final api = os.api;
// iOS and macOS
final version = os.version;
// Windows
final version = os.version;
copied to clipboard
4.Check version.
// Android
final atLeastAPI = os.atLeastAPI(33);
// iOS and macOS
final version = DarwinOSVersion.number(17.0);
final atLeastVersion = os.atLeastVersion(version);
// Windows
final isWindowsXPOrGreater = os.isWindowsXPOrGreater;
final isWindowsXPSP1OrGreater = os.isWindowsXPSP1OrGreater;
final isWindowsXPSP2OrGreater = os.isWindowsXPSP2OrGreater;
final isWindowsXPSP3OrGreater = os.isWindowsXPSP3OrGreater;
final isWindowsVistaOrGreater = os.isWindowsVistaOrGreater;
final isWindowsVistaSP1OrGreater = os.isWindowsVistaSP1OrGreater;
final isWindowsVistaSP2OrGreater = os.isWindowsVistaSP2OrGreater;
final isWindows7OrGreater = os.isWindows7OrGreater;
final isWindows7SP1OrGreater = os.isWindows7SP1OrGreater;
final isWindows8OrGreater = os.isWindows8OrGreater;
final isWindows8Point1OrGreater = os.isWindows8Point1OrGreater;
final isWindows10OrGreater = os.isWindows10OrGreater;
final isWindowsServer = os.isWindowsServer;
final isWindowsVersionOrGreater = os.isWindowsVersionOrGreater(
majorVersion: 10,
minorVersion: 0,
servicePackMajor: 0,
);
copied to clipboard
Render a widget to memory.
final memory = await renderWidgetToMemory(
context: context,
widget: widget,
size: size,
format: format,
);
copied to clipboard
Check the example to see how to use the corresponding API.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.