onSaved that takes a callback and executes
when the form is saved. A

The following example shows how Form.save() and formKey
(which is a GlobalKey), are used to save the form on submit.

Platform-specific code

When building a cross-platform app, you want to re-use as much code as
possible across platforms. However, scenarios might arise where it
makes sense for the code to be different depending on the OS.
This requires a separate implementation by declaring a specific platform.

In React Native, the following implementation would be used:

// React Native

if

Platform

OS

===

ios

return

iOS

else

if

Platform

OS

===

android

return

android

else

return