diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ca4a861 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,31 @@ + + +## Status + +**READY/IN DEVELOPMENT/HOLD** + +## Breaking Changes + +YES | NO + +## Description + + + +## Type of Change + + + +- [ ] โœจ New feature (non-breaking change which adds functionality) +- [ ] ๐Ÿ› ๏ธ Bug fix (non-breaking change which fixes an issue) +- [ ] โŒ Breaking change (fix or feature that would cause existing functionality to change) +- [ ] ๐Ÿงน Code refactor +- [ ] โœ… Build configuration change +- [ ] ๐Ÿ“ Documentation +- [ ] ๐Ÿ—‘๏ธ Chore diff --git a/.github/auto-asign.yml b/.github/auto-asign.yml new file mode 100644 index 0000000..bee00a4 --- /dev/null +++ b/.github/auto-asign.yml @@ -0,0 +1,14 @@ +name: Auto Assign +on: + issues: + types: [opened] + pull_request: + types: [opened] +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: wow-actions/auto-assign@v1 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CONFIG_FILE: .github/auto-assign.yml diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000..8ce9275 --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + - package-ecosystem: "pub" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..7e59fa1 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,13 @@ +name: no_screenshot + +on: [pull_request, push] + +jobs: + semantic-pull-request: + uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1 + + build: + uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1 + with: + flutter_channel: stable + flutter_version: 3.3.7 diff --git a/CHANGELOG.md b/CHANGELOG.md index dbd85dc..2254278 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,22 +1,32 @@ ## 0.0.1 + Package has 3 basic functionalities on android and IOS via method channel. - Disable screenshot support in app - Enable screenshot support in app - Toggle between enable and disable state -## 0.0.1+1 -Updated readme and added sample usage. +## 0.0.1+1 + +Updated readme and added sample usage. + +## 0.0.1+2 -## 0.0.1+2 - Adopted MIT license -## 0.0.1+3 -- Reverted to BSD 3 license +## 0.0.1+3 + +- Reverted to BSD 3 license - Added documentation - Made `NoScreenshot` class a singleton -## 0.0.1+4 -- Fixed issue #1[Crashes app when backgrounded on iOS](https://github.com/FlutterPlaza/no_screenshot/issues/1) +## 0.0.1+4 + +- Fixed issue #1[Crashes app when backgrounded on iOS](https://github.com/FlutterPlaza/no_screenshot/issues/1) + +## 0.0.1+5 + +- Fixed broken link from pub dev analyses + +## 0.0.1+6 -## 0.0.1+5 -- Fixed broken link from pub dev analyses \ No newline at end of file +- Removed the non implemented override functions in android life-cycle \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md new file mode 100644 index 0000000..c6b8fd1 --- /dev/null +++ b/CONTRIBUTORS.md @@ -0,0 +1,3 @@ +# Contributors + +- [Felix Junghans](https://github.com/felixjunghans) - Freelance software developer from the Stuttgart area. [Bio](http://felixjunghans.de/) diff --git a/README.md b/README.md index 315d30e..1d3ed0e 100644 --- a/README.md +++ b/README.md @@ -2,17 +2,17 @@ Flutter plugin to enable, disable or toggle screenshot support in your application. - ## Features - - Disables screenshot and screen recoding on Android and iOS - - Enables screenshot and screen recoding on Android and iOS - - Toggle screenshot and screen recoding on Android and iOS -## Getting started -If you want to prevent user from taking screenshot or recording of your app. You can turn off the screenshot support from the root `didChangeAppLifecycleState` method. +- Disables screenshot and screen recoding on Android and iOS +- Enables screenshot and screen recoding on Android and iOS +- Toggles screenshot and screen recoding on Android and iOS +## Getting started -```dart +If you want to prevent user from taking screenshot or recording of your app. You can turn off the screenshot support from the root `didChangeAppLifecycleState` method. + +```dart class _MyHomePageState extends State with WidgetsBindingObserver { final _noScreenshot = NoScreenshot(); @@ -53,12 +53,13 @@ If you want to prevent user from taking screenshot or recording of your app. You ``` ## Usage + Add `no_screenshot` to your `pubspec.yaml` dependencies -call the singleton `NoScreenshot.instance` anywhere you want to use it. +call the singleton `NoScreenshot.instance` anywhere you want to use it. For instance; -```dart +```dart class MyApp extends StatefulWidget { const MyApp({super.key}); diff --git a/android/src/main/kotlin/com/flutterplaza/no_screenshot/NoScreenshotPlugin.kt b/android/src/main/kotlin/com/flutterplaza/no_screenshot/NoScreenshotPlugin.kt index 3bcfc8c..57ee82a 100644 --- a/android/src/main/kotlin/com/flutterplaza/no_screenshot/NoScreenshotPlugin.kt +++ b/android/src/main/kotlin/com/flutterplaza/no_screenshot/NoScreenshotPlugin.kt @@ -86,14 +86,12 @@ class NoScreenshotPlugin : FlutterPlugin, MethodCallHandler, ActivityAware { activity = binding.activity } - override fun onDetachedFromActivityForConfigChanges() { - } + override fun onDetachedFromActivityForConfigChanges() {} override fun onReattachedToActivityForConfigChanges(binding: ActivityPluginBinding) { activity = binding.activity } - override fun onDetachedFromActivity() { - } + override fun onDetachedFromActivity() {} } diff --git a/example/pubspec.lock b/example/pubspec.lock index a16b3c4..712900e 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -101,7 +101,7 @@ packages: path: ".." relative: true source: path - version: "0.0.1+5" + version: "0.0.1+6" path: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index a58510f..c73bff9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,8 +1,8 @@ name: no_screenshot description: Flutter plugin to enable, disable or toggle screenshot support in your application. -version: 0.0.1+5 +version: 0.0.1+6 homepage: https://flutterplaza.com -repository: https://github.com/FlutterPlaza/no_screenshot/releases/tag/v0.0.1%2B5 +repository: https://github.com/FlutterPlaza/no_screenshot/releases/tag/v0.0.1%2B6 environment: sdk: '>=2.18.2 <3.0.0'