integrate_platform

Last updated:

0 purchases

integrate_platform Image
integrate_platform Images
Add to Cart

Description:

integrate platform

Cross-platform [Platform] and File Management.
Features #

Use IntegratePlatform instead of Platform to get platform information in io and web.
Packaged path_provider (In web, you'll get null).
Packaged File Management. You can read and write a file in io and web.

Getting started #
To use this plugin, add integrate_platform as a dependency in your pubspec.yaml file.
dependencies:
integrate_platform: ^1.0.2
copied to clipboard
Usage #

Get platform information

// Get system version
bool operatingSystemVersion = IntegratePlatform.operatingSystemVersion;

// Get platform type
bool isDesktop = IntegratePlatform.isDesktop
copied to clipboard

Get path in need

String? path = IntegratePlatform.getCurrentDirectory()
copied to clipboard

Write and Read file

// Read file
final result = await IntegratePlatform.readFile();
if (result.success) {
data = result.content.toString();
}

// Write file
final result =
await IntegratePlatform.writeFile("hello world", "hello.txt");
path = result.path.toString();
copied to clipboard
The whole examples are in /example folder.

Additional information #
Thanks to:


path_provider


file_picker

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.