Skip to content

Commit

Permalink
Merge branch 'development' into refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
fonkamloic authored Jul 14, 2024
2 parents e8323dd + 406dacc commit 42dd858
Show file tree
Hide file tree
Showing 10 changed files with 105 additions and 25 deletions.
31 changes: 31 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
Thanks for contributing!
Provide a description of your changes below and a general summary in the title of your PR
Please look at the following checklist to ensure that your PR can be accepted quickly:
-->

## Status

**READY/IN DEVELOPMENT/HOLD**

## Breaking Changes

YES | NO

## Description

<!--- Describe your changes in detail -->

## Type of Change

<!--- Put an `x` in all the boxes that apply: -->

- [ ] ✨ 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
14 changes: 14 additions & 0 deletions .github/auto-asign.yml
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/"
schedule:
interval: "daily"
13 changes: 13 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -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
28 changes: 19 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
- Removed the non implemented override functions in android life-cycle
3 changes: 3 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Contributors

- [Felix Junghans](https://github.com/felixjunghans) - Freelance software developer from the Stuttgart area. [Bio](http://felixjunghans.de/)
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<MyHomePage> with WidgetsBindingObserver {
final _noScreenshot = NoScreenshot();
Expand Down Expand Up @@ -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});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}
}
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.1+5"
version: "0.0.1+6"
path:
dependency: transitive
description:
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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'
Expand Down

0 comments on commit 42dd858

Please sign in to comment.