Skip to content

Instantly share code, notes, and snippets.

@mrgulshanyadav
Last active May 12, 2020 09:26
Show Gist options
  • Save mrgulshanyadav/58116147233f21ff6d038796a96c1d3f to your computer and use it in GitHub Desktop.
Save mrgulshanyadav/58116147233f21ff6d038796a96c1d3f to your computer and use it in GitHub Desktop.
class MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
Future<void> secureScreen() async {
await FlutterWindowManager.addFlags(FlutterWindowManager.FLAG_SECURE);
}
@override
void initState() {
secureScreen();
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Secure App Example'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'This page is secured',
),
],
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment