Skip to content

Commit

Permalink
- Remove Log.d()
Browse files Browse the repository at this point in the history
- Fix plugin example page
  • Loading branch information
skanderhamdi committed Feb 7, 2024
1 parent 13fcac6 commit 585ce94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class ScreenProtectionPlugin: FlutterPlugin, ActivityAware {

override fun onAttachedToActivity(binding: ActivityPluginBinding) {
activity = binding.activity as FlutterActivity
Log.d(TAG, "onAttachedToActivity: channel.setMethodCallHandler")
channel.setMethodCallHandler { call, result ->
when(call.method) {
"secureScreen" -> {
Expand Down
8 changes: 4 additions & 4 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class _MyAppState extends State<MyApp> {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
title: const Text('Flutter Screen Protection'),
),
body: Center(
child: Column(
Expand All @@ -56,18 +56,18 @@ class _MyAppState extends State<MyApp> {
children: [
Text('Screen Protection state: ${screenProtectionState.name}\n'),
const SizedBox(height: 20),
const Text('Try making Screenshot or Screen record'),
const SizedBox(height: 20),
TextButton(
style: TextButton.styleFrom(
backgroundColor: Colors.blue,
padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 25)
),
onPressed: () async {
print("tapped");
await screenProtectionPlugin.toggleScreenSecurity();
init();
print("end tapped");
},
child: Text("Toggle Screen Protection", style: TextStyle(color: Colors.white))
child: const Text("Toggle Screen Protection", style: TextStyle(color: Colors.white))
)
]
)
Expand Down

0 comments on commit 585ce94

Please sign in to comment.