added reanimated in toggleSwitch

This commit is contained in:
Sadaqat Ali 2022-09-27 21:50:52 +05:00
parent 68e942ac88
commit 685376fe87

View File

@ -1,5 +1,6 @@
import React, { PureComponent } from 'react';
import { View, TouchableOpacity, Animated, NativeModules } from 'react-native';
import { View, TouchableOpacity, NativeModules } from 'react-native';
import Animated, { Easing } from 'react-native-reanimated';
// Constants
@ -97,7 +98,7 @@ class ToggleSwitchView extends PureComponent {
Animated.timing(this.offsetX, {
toValue,
duration,
useNativeDriver: true,
easing: Easing.inOut(Easing.ease),
}).start();
};