© Fu Cheng 2019
F. ChengFlutter Recipeshttps://doi.org/10.1007/978-1-4842-4982-6_12

12. Platform Integration

Fu Cheng1 
Sandringham, Auckland, New Zealand

In mobile apps, it’s common to integrate with the native platform. You can write platform-specific code to use native platform API. There are a large number of plugins to perform different tasks.

12.1 Reading and Writing Files


You want to read and write files.


Use File API.


In mobile apps, you may need to save files on the device. The dart:io library provides files API to read and write files. File class has methods to read content, write content, and query metadata of files. Operations with file system can be synchronous or asynchronous. Most of these operations ...

Get Flutter Recipes: Mobile Development Solutions for iOS and Android now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.