55 * quick demo form, API list, and navigation to detail screens.
66 */
77import Ionicons from '@expo/vector-icons/Ionicons' ;
8+ import { useRouter } from 'expo-router' ;
89import React , { useCallback , useRef , useState } from 'react' ;
910import {
1011 Alert ,
1112 Platform ,
1213 StyleSheet ,
13- Switch ,
1414 Text ,
15- View ,
15+ View
1616} from 'react-native' ;
1717import { useSafeAreaInsets } from 'react-native-safe-area-context' ;
18- import { useRouter } from 'expo-router' ;
1918
20- import {
21- FieldForm ,
22- useKeyboardState ,
23- type FieldFormHandle ,
24- } from 'react-native-fieldflow' ;
2519import {
2620 ActionButton ,
2721 FeatureCard ,
@@ -34,6 +28,11 @@ import {
3428 ShowcaseRadius ,
3529 ShowcaseSpacing ,
3630} from '@/constants/showcase-theme' ;
31+ import {
32+ FieldForm ,
33+ useKeyboardState ,
34+ type FieldFormHandle ,
35+ } from '../../../packages/react-native-fieldflow/src' ;
3736
3837export default function HomeScreen ( ) {
3938 const router = useRouter ( ) ;
@@ -48,7 +47,9 @@ export default function HomeScreen() {
4847 // ── Feature toggles ────────────────────────────────
4948 const [ scrollEnabled , setScrollEnabled ] = useState ( true ) ;
5049 const [ avoidEnabled , setAvoidEnabled ] = useState ( true ) ;
50+ const [ autoScroll , setAutoScroll ] = useState ( true ) ;
5151 const [ chainEnabled , setChainEnabled ] = useState ( true ) ;
52+ const [ dismissOnTap , setDismissOnTap ] = useState ( true ) ;
5253
5354 const handleSubmit = useCallback ( ( ) => {
5455 setSubmitted ( true ) ;
@@ -63,6 +64,9 @@ export default function HomeScreen() {
6364 onSubmit = { handleSubmit }
6465 scrollable = { scrollEnabled }
6566 avoidKeyboard = { avoidEnabled }
67+ autoScroll = { autoScroll }
68+ chainEnabled = { chainEnabled }
69+ dismissKeyboardOnTap = { dismissOnTap }
6670 extraScrollPadding = { 100 }
6771 keyboardVerticalOffset = { 0 }
6872 scrollViewProps = { {
@@ -117,6 +121,20 @@ export default function HomeScreen() {
117121 toggleValue = { chainEnabled }
118122 onToggle = { setChainEnabled }
119123 />
124+ < FeatureCard
125+ icon = "color-filter-outline"
126+ title = "Auto Scroll"
127+ description = "Scroll to focused field"
128+ toggleValue = { autoScroll }
129+ onToggle = { setAutoScroll }
130+ />
131+ < FeatureCard
132+ icon = "hand-right-outline"
133+ title = "Tap to Dismiss"
134+ description = "Tap empty area to close"
135+ toggleValue = { dismissOnTap }
136+ onToggle = { setDismissOnTap }
137+ />
120138 </ View >
121139 </ View >
122140
0 commit comments