gesture_recognition 1.0.1 gesture_recognition: ^1.0.1 copied to clipboard
a gesture recognition verification lock
import 'package:flutter/material.dart';
import 'demo/setting_page.dart';
import 'demo/verify_page.dart';
void main() => runApp(MainPage());
class MainPage extends StatelessWidget {
void _routeToPage(BuildContext context,Widget page) {
Navigator.of(context).push(
MaterialPageRoute(builder: (context){
return page;
})
);
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: Text("Gesture Recoginition"),),
body: Builder(
builder: (context) {
return Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
MaterialButton(
child: Container(
height: 60,
child: Center(
child: Text(
"Setting Gesture",
style: TextStyle(fontSize: 20,color: Colors.black),
),
),
),
onPressed: () => _routeToPage(context,SettingPage())
),
MaterialButton(
child: Container(
height: 60,
child: Center(
child: Text(
"Verification Gesture",
style: TextStyle(fontSize: 20,color: Colors.black),
),
),
),
onPressed: () => _routeToPage(context,VerifyPage())
),
],
),
);
}
),
),
);
}
}