Skip to content

A Flutter package for blocking the app's screen view by blurring it when the app is in the background.

License

Notifications You must be signed in to change notification settings

AslamThachapalli/shield_view

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Flutter package for blocking the app's screen view by blurring it when the app is in the background.

Usage

Import the package as:

import 'package:shield_view/shield_view.dart';

If you want to blur the whole app while it is in the background:

MaterialApp(
  title: 'Flutter Demo',
  theme: ThemeData(
    colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
    useMaterial3: true,
  ),
  builder: (context, child) {
  // Wrapping with ShieldView like this will Shield the whole app.
  return ShieldView(child: child!);
  },
  home: const HomePage(),
)

If you want to blur any specific page, just wrap the page with ShieldView.

ShieldView(child: HomePage());

About

A Flutter package for blocking the app's screen view by blurring it when the app is in the background.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published