touch_lock 0.0.4 touch_lock: ^0.0.4 copied to clipboard
A screen touch lock module for Flutter.It is a lock system for children. If you lock the screen, it will not be unlocked without marking the correct number.
import 'package:flutter/material.dart';
import 'package:touch_lock/touch_lock.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Touch Lock Demo',
home: MyHomePage(title: 'Touch Lock Demo'),
);
}
}
class MyHomePage extends StatefulWidget {
final String title;
MyHomePage({Key key, @required this.title}) : super(key: key);
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return TouchLock(
child: Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Container(),
),
);
}
}