/** * Copyright (c) Meta Platforms, Inc. and 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, Text, View, } = require('react-native'); class SafeAreaViewExample extends React.Component< {...}, {| modalVisible: boolean, |}, > { state: {modalVisible: boolean} = { modalVisible: false, }; _setModalVisible = (visible: boolean) => { this.setState({modalVisible: visible}); }; render(): React.Node { return ( this._setModalVisible(false)} animationType="slide" supportedOrientations={['portrait', 'landscape']}>