Skip to content

Commit 96e128a

Browse files
init
1 parent c8b944d commit 96e128a

File tree

6 files changed

+118
-68
lines changed

6 files changed

+118
-68
lines changed

.circleci/config.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,17 @@ jobs:
307307
- setup_flutter
308308
- run:
309309
name: Check Package Score
310-
command: melos score
311-
- run: melos dryPublish
310+
command: melos score --no-select
311+
- run: melos dryPublish --no-select
312+
313+
release_instabug_private_views_plugin:
314+
executor: flutter-executor
315+
steps:
316+
- advanced-checkout/shallow-checkout
317+
- setup_flutter
318+
- run: chmod +x packages/instabug_private_views/release.sh
319+
- run: ./packages/instabug_private_views/release.sh
320+
312321

313322
release_instabug_flutter:
314323
macos:
@@ -388,6 +397,20 @@ workflows:
388397
filters:
389398
branches:
390399
only: master
400+
- hold_release_instabug_private_views_plugin:
401+
type: approval
402+
requires:
403+
- test_flutter-stable
404+
filters:
405+
branches:
406+
only: master
407+
- release_instabug_private_views_plugin:
408+
requires:
409+
- hold_release_instabug_private_views_plugin
410+
- verify_pub
411+
filters:
412+
branches:
413+
only: master
391414
- release_instabug_flutter:
392415
requires:
393416
- hold_release_instabug_flutter
Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,21 @@
1-
TODO: Add your license here.
1+
MIT License
2+
3+
Copyright (c) Instabug
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

packages/instabug_private_views/README.md

Lines changed: 56 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,62 @@
22

33
An add-on for the Instabug Flutter SDK that provides private views support in screen.
44

5-
## Getting Started
5+
[![Twitter](https://img.shields.io/badge/[email protected])](https://twitter.com/Instabug)
66

7-
This project is a starting point for a Flutter
8-
[plug-in package](https://flutter.dev/to/develop-plugins),
9-
a specialized package that includes platform-specific implementation code for
10-
Android and/or iOS.
7+
An add-on for the [Instabug Flutter SDK](https://github.com/Instabug/Instabug-Flutter) hat provides private views support in screenshot capturing [Flutter Private views](https://pub.dev/packages/).
118

12-
For help getting started with Flutter development, view the
13-
[online documentation](https://docs.flutter.dev), which offers tutorials,
14-
samples, guidance on mobile development, and a full API reference.
9+
## Installation
1510

11+
1. Add `instabug_private_views` to your `pubspec.yaml` file.
12+
13+
```yaml
14+
dependencies:
15+
instabug_private_views:
16+
```
17+
18+
2. Install the package by running the following command.
19+
20+
```sh
21+
flutter pub get
22+
```
23+
24+
## Usage
25+
26+
1. enable `PrivateViews` after `init` the SDK:
27+
28+
29+
```dart
30+
31+
void main() {
32+
33+
Instabug.init(
34+
token: 'App token',
35+
invocationEvents: [InvocationEvent.floatingButton],
36+
);
37+
38+
ReproSteps.enablePrivateViews();
39+
40+
runApp(MyApp());
41+
42+
}
43+
```
44+
45+
2. Wrap the view you want to mask with `InstabugPrivateView`:
46+
47+
```dart
48+
InstabugPrivateView(
49+
child: const Text(
50+
'Private TextView',
51+
style: TextStyle(fontSize: 18),
52+
textAlign: TextAlign.center,
53+
),
54+
),
55+
```
56+
57+
you can use `InstabugSliverPrivateView` if you want to wrap Sliver widget
58+
```dart
59+
InstabugSliverPrivateView(
60+
sliver: SliverToBoxAdapter(
61+
child: /// child
62+
)),
63+
```

packages/instabug_private_views/example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ packages:
109109
path: ".."
110110
relative: true
111111
source: path
112-
version: "0.0.1"
112+
version: "1.0.0"
113113
leak_tracker:
114114
dependency: transitive
115115
description:
Lines changed: 2 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: instabug_private_views
2-
description: "An add-on for the Instabug Flutter SDK that provides private views support in screen."
3-
version: 0.0.1
2+
description: "An add-on for the Instabug Flutter SDK that provides private views support in screen capturing."
3+
version: 1.0.0
44
homepage: https://www.instabug.com
55

66
environment:
@@ -24,57 +24,3 @@ dev_dependencies:
2424
pana: ^0.21.0
2525
# pigeon v3.0.0 is needed for running Flutter 2 tests on CI
2626
pigeon: '>=3.0.0 <=10.1.5'
27-
28-
# For information on the generic Dart part of this file, see the
29-
# following page: https://dart.dev/tools/pub/pubspec
30-
31-
# The following section is specific to Flutter packages.
32-
flutter:
33-
# This section identifies this Flutter project as a plugin project.
34-
# The 'pluginClass' specifies the class (in Java, Kotlin, Swift, Objective-C, etc.)
35-
# which should be registered in the plugin registry. This is required for
36-
# using method channels.
37-
# The Android 'package' specifies package in which the registered class is.
38-
# This is required for using method channels on Android.
39-
# The 'ffiPlugin' specifies that native code should be built and bundled.
40-
# This is required for using `dart:ffi`.
41-
# All these are used by the tooling to maintain consistency when
42-
# adding or updating assets for this project.
43-
plugin:
44-
platforms:
45-
android:
46-
package: com.instabug.instabug_private_views
47-
pluginClass: InstabugPrivateViewsPlugin
48-
ios:
49-
pluginClass: InstabugPrivateViewsPlugin
50-
51-
# To add assets to your plugin package, add an assets section, like this:
52-
# assets:
53-
# - images/a_dot_burr.jpeg
54-
# - images/a_dot_ham.jpeg
55-
#
56-
# For details regarding assets in packages, see
57-
# https://flutter.dev/to/asset-from-package
58-
#
59-
# An image asset can refer to one or more resolution-specific "variants", see
60-
# https://flutter.dev/to/resolution-aware-images
61-
62-
# To add custom fonts to your plugin package, add a fonts section here,
63-
# in this "flutter" section. Each entry in this list should have a
64-
# "family" key with the font family name, and a "fonts" key with a
65-
# list giving the asset and other descriptors for the font. For
66-
# example:
67-
# fonts:
68-
# - family: Schyler
69-
# fonts:
70-
# - asset: fonts/Schyler-Regular.ttf
71-
# - asset: fonts/Schyler-Italic.ttf
72-
# style: italic
73-
# - family: Trajan Pro
74-
# fonts:
75-
# - asset: fonts/TrajanPro.ttf
76-
# - asset: fonts/TrajanPro_Bold.ttf
77-
# weight: 700
78-
#
79-
# For details regarding fonts in packages, see
80-
# https://flutter.dev/to/font-from-package
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/sh
2+
VERSION=$(egrep -o "version: ([0-9]-*.*)+[0-9]" pubspec.yaml | cut -d ":" -f 2)
3+
if [ ! "${VERSION}" ] || [ -z "${VERSION}" ];then
4+
echo "Instabug: err: Version Number not found."
5+
exit 1
6+
else
7+
mkdir -p $HOME/.config/dart
8+
cat <<EOF > $HOME/.config/dart/pub-credentials.json
9+
${PUB_CREDENTIALS}
10+
11+
EOF
12+
flutter packages pub publish -f
13+
fi

0 commit comments

Comments
 (0)