/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow strict-local * @format */ 'use strict'; const React = require('react'); const { Button, DeviceInfo, Modal, SafeAreaView, StyleSheet, Switch, Text, View, } = require('react-native'); class SafeAreaViewExample extends React.Component< {...}, {| modalVisible: boolean, emulateUnlessSupported: boolean, |}, > { state = { modalVisible: false, emulateUnlessSupported: true, }; _setModalVisible = visible => { this.setState({modalVisible: visible}); }; render() { return ( this._setModalVisible(false)} animationType="slide" supportedOrientations={['portrait', 'landscape']}>