timer works fine, just it does not print same content every time

This commit is contained in:
open-trade 2020-11-17 12:41:23 +08:00
parent cc0139a85c
commit ced0457a2e

View File

@ -32,24 +32,34 @@ class _RemotePageState extends State<RemotePage> {
@override @override
void dispose() { void dispose() {
super.dispose(); super.dispose();
FFI.close();
_interval.cancel(); _interval.cancel();
dismissLoading(); dismissLoading();
FFI.close();
} }
void interval() { void interval() {
print(1); print(DateTime.now());
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
// Size size = MediaQueryData.fromWindow(ui.window).size; // Size size = MediaQueryData.fromWindow(ui.window).size;
// MediaQuery.of(context).size.height;
// https://stackoverflow.com/questions/46640116/make-flutter-application-fullscreen // https://stackoverflow.com/questions/46640116/make-flutter-application-fullscreen
SystemChrome.setEnabledSystemUIOverlays([]); SystemChrome.setEnabledSystemUIOverlays([]);
return FlutterEasyLoading( return FlutterEasyLoading(
child: GestureDetector(
child: CustomPaint( child: CustomPaint(
painter: new ImageEditor(image: null), painter: new ImageEditor(image: null),
)); ),
onPanStart: (DragDownDetails) {
print("onPanStart $DragDownDetails");
// hero.moveTo(DragDownDetails.globalPosition.dx, DragDownDetails.globalPosition.dy);
},
onPanUpdate: (DragDownDetails) {
print("onPanUpdate $DragDownDetails");
// hero.moveTo(DragDownDetails.globalPosition.dx, DragDownDetails.globalPosition.dy);
}));
} }
} }