Ionic 3 | Create Torch /Flashlight Application using Backlight Plugin Ionic Native 3.x

In this post, we will create Flashlight/ Torch app in Ionic 3 version using Ionic Native plugin Flashlight, the application will have a switch button to on/ off camera flashlight which can be used as a torch.

 

 

 

Let’s start…

Our complete app will look like this

Create an Ionic 3 App

Install FlashLight plugin in Application

 

Add this plugin in app’s module

 

Add On/Off HTML buttons in home.html

In home.ts add onTorch and offTorch events

Add some style for custom background and button styles in home.scss

Now your app in a real device to check.

Find source code on GitHub here

Thanks for visiting :) Let me know if you have some suggestions or feedback for this post in the comment section. Looking for any tutorial or demo on FreakyJolly, just drop me a message here

Leave a Reply

avatar
  Subscribe  
Notify of