react native magic flashlight
1.0.0
Eine einfache Bibliothek zum Ein- oder Ausschalten von Blitz auf Android/iOS -Gerät.
npm install react-native-magic-flashlight import {
toggleFlash ,
isFlashOn ,
hasFlash ,
} from 'react-native-magic-flashlight' ;
// ...
function deviceHasFlash ( ) {
hasFlash (
( ) => console . log ( 'Has Flash' ) ,
( ) => console . log ( 'No Flash' )
) ;
}
function turnOn ( ) {
toggleFlash (
true ,
( ) => console . log ( 'Success' ) ,
( ) => console . log ( 'Error' )
) ;
}
function flashIsOn ( ) {
const result = isFlashOn ( ( on ) => on ) ;
console . log ( result ) ;
} Weitere Informationen finden Sie im beitragenden Leitfaden, um zu erfahren, wie Sie zum Repository und den Entwicklungsworkflow beitragen.
MIT
Erstellt von Marco Almeida