zeba_books_offline_gatekeeper 0.0.1 copy "zeba_books_offline_gatekeeper: ^0.0.1" to clipboard
zeba_books_offline_gatekeeper: ^0.0.1 copied to clipboard

PlatformAndroid

Security and integrity suite for offline educational and proctoring apps providing lifecycle monitoring, screen protection, focus lock detection, encrypted storage, and offline enforcement.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:zeba_books_offline_gatekeeper/zeba_books_offline_gatekeeper.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {

  final session = GatekeeperSession();
  String status = "Waiting...";

  @override
  void initState() {
    super.initState();

    session.onViolation = (msg) {
      setState(() {
        status = "⚠️ $msg";
      });
    };
  }

  void startSession() async {
    await session.start();

    setState(() {
      status = "✅ Session Started";
    });
  }

  void stopSession() {
    session.stop();

    setState(() {
      status = "🛑 Session Stopped";
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text("Gatekeeper Test")),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [

              Text(status, style: const TextStyle(fontSize: 18)),

              const SizedBox(height: 30),

              ElevatedButton(
                onPressed: startSession,
                child: const Text("Start Secure Session"),
              ),

              ElevatedButton(
                onPressed: stopSession,
                child: const Text("Stop Session"),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
0
likes
120
points
104
downloads

Publisher

verified publisherzeba.academy

Weekly Downloads

Security and integrity suite for offline educational and proctoring apps providing lifecycle monitoring, screen protection, focus lock detection, encrypted storage, and offline enforcement.

Homepage

Topics

#security #proctoring #offline #education #flutter-plugin

Documentation

API reference

License

unknown (license)

Dependencies

connectivity_plus, cryptography, flutter, flutter_secure_storage, plugin_platform_interface

More

Packages that depend on zeba_books_offline_gatekeeper

Packages that implement zeba_books_offline_gatekeeper