搜尋套件、儲存庫與 APP 分類

secure_app_switcher 封面
套件詳情v1.0.0

secure_app_switcher

在應用切換器或工作列中對應用螢幕套用安全遮蔽效果。

AndroidiOS
近 30 天下載
774
喜歡數
37
Pub 分數
150

安裝套件

flutter pub add secure_app_switcher

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

secure_app_switcher 套件透過在裝置的應用切換器或工作清單中對應用程式螢幕預覽套用遮罩效果,增強應用隱私。這可防止使用者在滑動瀏覽開啟的應用時看見敏感內容,在 Android 與 iOS 裝置上提供額外的安全層。此套件可輕鬆整合至 Flutter 應用程式,設定極少,確保應用程式的視覺狀態在多工處理期間保持隱藏。對於處理機密資料的應用(如銀行、醫療或通訊平台)特別實用。

適用情境

  • 保護應用切換器中的敏感UI預覽
  • 保護金融或醫療應用
  • 防止意外暴露私有內容
  • 在多使用者環境中增強隱私
  • 遵守數據保護法規

主要特色

  • 在任務切換器中預覽遮蔽應用
  • 跨平台支援(Android 與 iOS)
  • 所需設定最少
  • 無執行時效能影響
  • 無需修改應用邏輯即可運作

適合對象

  • 注重隱私的應用程式
  • 處理個人或機密資料的應用程式
  • 開發人員優先考慮使用者安全
  • 企業級移動應用
  • 需要增強隱私控制的Flutter專案

使用建議

  • 需要平台特定的權限
  • 可能不適用於所有設備製造商
  • 僅限視覺遮蔽,不支援完整應用隔離
  • 不會影響在切換器外部拍攝的截圖
  • 取決於作業系統層級的行為,可能會有所不同

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

secure_app_switcher

Apply a safe masking effect to the app screen on the app switcher or task list.

Functions can be enabled/disabled within any process. It also provides a mechanism for switching functions on a screen-by-screen basis.

The effect is different for iOS and Android.

Usage

Use functions within arbitrary processing
import 'package:secure_app_switcher/secure_app_switcher.dart';

// ON
SecureAppSwitcher.on();

// OFF
SecureAppSwitcher.off();
Use functions on specific screens

It is necessary to set secureAppSwitcherRouteObserver to switch the function at the time of screen transition.

Wrap the target screen widget with MaterialPageRoute and SecureAppSwitcherPage.

  • secureAppSwitcherRouteObserver
@override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Secure App Switcher',
      onGenerateRoute: generateRoute,
      navigatorObservers: [secureAppSwitcherRouteObserver], // add
      initialRoute: '/',
    );
  }
  • SecureAppSwitcherPage, MaterialPageRoute
// Example: Case where the function is enabled on screen A

Route<dynamic> generateRoute(RouteSettings settings) {
  switch (settings.name) {
    case "/":
      return MaterialPageRoute(builder: (context) {
        return const HomeScreen();
      });    
    case "/screenA":
      return MaterialPageRoute(builder: (context) {
        return const SecureAppSwitcherPage( // add
          style: SecureMaskStyle.dark,
          child: ScreenA(),
        );
      });
  }
}

iOS

For iOS, you can specify the type of mask effect.

SecureAppSwitcher.on(iosStyle: SecureMaskStyle.blurLight);
  • Types of mask effects
Light Dark BlurLight BlurDark

Android

FLAG_SECURE of WindowManager LayoutParams is used.

WindowManager.LayoutParams | Android Developers

switching apps screenshot disabled
  • The type of mask effect cannot be specified like iOS.
  • In Android 11 or later, the mask effect is reflected by switching other apps once according to the specifications of Android OS.
  • Taking screenshots is not allowed when the feature is enabled.

Features and bugs

Please file feature requests and bugs on the issue tracker.

所屬分類

依賴

依賴清單 1 項

  • plugin_platform_interface^2.0.2

原始碼儲存庫

使用此套件的專案