chore(repo): move files to new repo name

This commit is contained in:
Daniel Sogl
2021-09-27 17:07:03 +02:00
parent 3ae573b632
commit 15c441cc2a
246 changed files with 484 additions and 523 deletions
@@ -0,0 +1,77 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
/**
* @name Flashlight
* @description This plugin allows you to switch the flashlight / torch of the device on and off.
*
* Requires Cordova plugin: `cordova-plugin-flashlight`. For more info, please see the [Flashlight plugin docs](https://github.com/EddyVerbruggen/Flashlight-PhoneGap-Plugin).
*
* @usage
* ```typescript
* import { Flashlight } from '@awesome-cordova-plugins/flashlight/ngx';
*
* constructor(private flashlight: Flashlight) { }
*
* ...
*
* this.flashlight.switchOn();
*
* ```
*/
@Plugin({
pluginName: 'Flashlight',
plugin: 'cordova-plugin-flashlight',
pluginRef: 'window.plugins.flashlight',
repo: 'https://github.com/EddyVerbruggen/Flashlight-PhoneGap-Plugin',
platforms: ['Android', 'iOS', 'Windows Phone 8'],
})
@Injectable()
export class Flashlight extends IonicNativePlugin {
/**
* Checks if the flashlight is available
* @returns {Promise<boolean>} Returns a promise that resolves with a boolean stating if the flashlight is available.
*/
@Cordova()
available(): Promise<boolean> {
return;
}
/**
* Switches the flashlight on
* @returns {Promise<boolean>}
*/
@Cordova()
switchOn(): Promise<boolean> {
return;
}
/**
* Switches the flashlight off
* @returns {Promise<boolean>}
*/
@Cordova()
switchOff(): Promise<boolean> {
return;
}
/**
* Toggles the flashlight
* @returns {Promise<any>}
*/
@Cordova()
toggle(): Promise<any> {
return;
}
/**
* Checks if the flashlight is turned on.
* @returns {boolean}
*/
@Cordova({
sync: true,
})
isSwitchedOn(): boolean {
return;
}
}