1.0.3 • Published 3 years ago

@mertozyilmazz/react-native-flash v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

react-native-flash

Simple API to turn on and off flash in react native

npm version npm downloads

Installation

npm install @mertozyilmazz/react-native-flash
or
yarn add @mertozyilmazz/react-native-flash

Usage

In your *.js:

	import Flash from '@mertozyilmazz/react-native-flash'

	Flash.turnOnFlash() // turn on flash

	Flash.turnOffFlash() // turn off flash

	/*Has flash checks if the phone has flash available.
		Since all communication between react native and native modules is asychrounous, it takes a success callback, and failure callback. atm both callbacks are necessary.

		*/
	Flash.hasFlash(function(){
		Flash.turnOnFlash()
	},function(){
		alert("You do not have flash")
	})
})
1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago