move EasyLoading up
This commit is contained in:
parent
6bb2434b9d
commit
4698ac925b
@ -169,148 +169,147 @@ class _RemotePageState extends State<RemotePage> {
|
|||||||
close();
|
close();
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
child: Scaffold(
|
child: FlutterEasyLoading(
|
||||||
floatingActionButton: _showBar
|
child: Scaffold(
|
||||||
? null
|
backgroundColor: MyTheme.canvasColor,
|
||||||
: FloatingActionButton(
|
floatingActionButton: _showBar
|
||||||
mini: true,
|
? null
|
||||||
child: Icon(Icons.expand_less),
|
: FloatingActionButton(
|
||||||
backgroundColor: MyTheme.accent50,
|
mini: true,
|
||||||
onPressed: () {
|
child: Icon(Icons.expand_less),
|
||||||
setState(() => _showBar = !_showBar);
|
backgroundColor: MyTheme.accent50,
|
||||||
}),
|
onPressed: () {
|
||||||
bottomNavigationBar: _showBar && FFI.ffiModel.pi.displays != null
|
setState(() => _showBar = !_showBar);
|
||||||
? BottomAppBar(
|
}),
|
||||||
elevation: 10,
|
bottomNavigationBar: _showBar && FFI.ffiModel.pi.displays != null
|
||||||
color: MyTheme.accent,
|
? BottomAppBar(
|
||||||
child: Row(
|
elevation: 10,
|
||||||
mainAxisSize: MainAxisSize.max,
|
color: MyTheme.accent,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
child: Row(
|
||||||
children: <Widget>[
|
mainAxisSize: MainAxisSize.max,
|
||||||
Row(children: [
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
IconButton(
|
children: <Widget>[
|
||||||
color: Colors.white,
|
Row(children: [
|
||||||
icon: Icon(Icons.clear),
|
IconButton(
|
||||||
onPressed: () {
|
|
||||||
close();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
IconButton(
|
|
||||||
color: Colors.white,
|
|
||||||
icon: Icon(Icons.keyboard),
|
|
||||||
onPressed: openKeyboard),
|
|
||||||
IconButton(
|
|
||||||
color: Colors.white,
|
|
||||||
icon: Icon(Icons.tv),
|
|
||||||
onPressed: () {
|
|
||||||
setState(() => _showEdit = false);
|
|
||||||
showOptions(context);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
color: _mouseTools ? Colors.blue[500] : null,
|
|
||||||
child: IconButton(
|
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
icon: Icon(Icons.mouse),
|
icon: Icon(Icons.clear),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
setState(() {
|
close();
|
||||||
_mouseTools = !_mouseTools;
|
|
||||||
resetTool();
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
)),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
icon: Icon(Icons.more_vert),
|
icon: Icon(Icons.keyboard),
|
||||||
onPressed: () {
|
onPressed: openKeyboard),
|
||||||
setState(() => _showEdit = false);
|
IconButton(
|
||||||
showActions(context);
|
color: Colors.white,
|
||||||
},
|
icon: Icon(Icons.tv),
|
||||||
),
|
onPressed: () {
|
||||||
]),
|
setState(() => _showEdit = false);
|
||||||
IconButton(
|
showOptions(context);
|
||||||
color: Colors.white,
|
},
|
||||||
icon: Icon(Icons.expand_more),
|
),
|
||||||
onPressed: () {
|
Container(
|
||||||
setState(() => _showBar = !_showBar);
|
color: _mouseTools ? Colors.blue[500] : null,
|
||||||
}),
|
child: IconButton(
|
||||||
],
|
color: Colors.white,
|
||||||
),
|
icon: Icon(Icons.mouse),
|
||||||
)
|
onPressed: () {
|
||||||
: null,
|
setState(() {
|
||||||
body: GestureDetector(
|
_mouseTools = !_mouseTools;
|
||||||
onTap: () {
|
resetTool();
|
||||||
if (_drag || _scroll) return;
|
});
|
||||||
FFI.tap(_right);
|
},
|
||||||
},
|
)),
|
||||||
onLongPressStart: (_) {
|
IconButton(
|
||||||
if (_drag) {
|
color: Colors.white,
|
||||||
// case: to show password on windows
|
icon: Icon(Icons.more_vert),
|
||||||
FFI.sendMouse('down', 'left');
|
onPressed: () {
|
||||||
}
|
setState(() => _showEdit = false);
|
||||||
},
|
showActions(context);
|
||||||
onLongPressEnd: (_) {
|
},
|
||||||
if (_drag) {
|
),
|
||||||
FFI.sendMouse('up', 'left');
|
]),
|
||||||
}
|
IconButton(
|
||||||
},
|
color: Colors.white,
|
||||||
onScaleStart: (details) {
|
icon: Icon(Icons.expand_more),
|
||||||
_scale = 1;
|
onPressed: () {
|
||||||
_xOffset = details.focalPoint.dx;
|
setState(() => _showBar = !_showBar);
|
||||||
_yOffset = details.focalPoint.dy;
|
}),
|
||||||
if (_drag) {
|
],
|
||||||
FFI.sendMouse('down', 'left');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onScaleUpdate: (details) {
|
|
||||||
var scale = details.scale;
|
|
||||||
if (scale == 1) {
|
|
||||||
var x = details.focalPoint.dx;
|
|
||||||
var y = details.focalPoint.dy;
|
|
||||||
var dx = x - _xOffset;
|
|
||||||
var dy = y - _yOffset;
|
|
||||||
if (_scroll) {
|
|
||||||
FFI.scroll(-dy);
|
|
||||||
} else {
|
|
||||||
FFI.cursorModel.updatePan(dx, dy);
|
|
||||||
}
|
|
||||||
_xOffset = x;
|
|
||||||
_yOffset = y;
|
|
||||||
} else if (!_drag && !_scroll) {
|
|
||||||
FFI.canvasModel.updateScale(scale / _scale);
|
|
||||||
_scale = scale;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onScaleEnd: (_) {
|
|
||||||
if (_drag) {
|
|
||||||
FFI.sendMouse('up', 'left');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
child: FlutterEasyLoading(
|
|
||||||
child: Container(
|
|
||||||
color: MyTheme.canvasColor,
|
|
||||||
child: Stack(children: [
|
|
||||||
ImagePaint(),
|
|
||||||
CursorPaint(),
|
|
||||||
getHelpTools(),
|
|
||||||
SizedBox(
|
|
||||||
width: 0,
|
|
||||||
height: 0,
|
|
||||||
child: !_showEdit
|
|
||||||
? Container()
|
|
||||||
: TextFormField(
|
|
||||||
textInputAction: TextInputAction.newline,
|
|
||||||
autocorrect: false,
|
|
||||||
enableSuggestions: false,
|
|
||||||
focusNode: _focusNode,
|
|
||||||
maxLines: null,
|
|
||||||
initialValue:
|
|
||||||
_value, // trick way to make backspace work always
|
|
||||||
keyboardType: TextInputType.multiline,
|
|
||||||
onChanged: handleInput,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
])),
|
)
|
||||||
|
: null,
|
||||||
|
body: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
if (_drag || _scroll) return;
|
||||||
|
FFI.tap(_right);
|
||||||
|
},
|
||||||
|
onLongPressStart: (_) {
|
||||||
|
if (_drag) {
|
||||||
|
// case: to show password on windows
|
||||||
|
FFI.sendMouse('down', 'left');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLongPressEnd: (_) {
|
||||||
|
if (_drag) {
|
||||||
|
FFI.sendMouse('up', 'left');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onScaleStart: (details) {
|
||||||
|
_scale = 1;
|
||||||
|
_xOffset = details.focalPoint.dx;
|
||||||
|
_yOffset = details.focalPoint.dy;
|
||||||
|
if (_drag) {
|
||||||
|
FFI.sendMouse('down', 'left');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onScaleUpdate: (details) {
|
||||||
|
var scale = details.scale;
|
||||||
|
if (scale == 1) {
|
||||||
|
var x = details.focalPoint.dx;
|
||||||
|
var y = details.focalPoint.dy;
|
||||||
|
var dx = x - _xOffset;
|
||||||
|
var dy = y - _yOffset;
|
||||||
|
if (_scroll) {
|
||||||
|
FFI.scroll(-dy);
|
||||||
|
} else {
|
||||||
|
FFI.cursorModel.updatePan(dx, dy);
|
||||||
|
}
|
||||||
|
_xOffset = x;
|
||||||
|
_yOffset = y;
|
||||||
|
} else if (!_drag && !_scroll) {
|
||||||
|
FFI.canvasModel.updateScale(scale / _scale);
|
||||||
|
_scale = scale;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onScaleEnd: (_) {
|
||||||
|
if (_drag) {
|
||||||
|
FFI.sendMouse('up', 'left');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Stack(children: [
|
||||||
|
ImagePaint(),
|
||||||
|
CursorPaint(),
|
||||||
|
getHelpTools(),
|
||||||
|
SizedBox(
|
||||||
|
width: 0,
|
||||||
|
height: 0,
|
||||||
|
child: !_showEdit
|
||||||
|
? Container()
|
||||||
|
: TextFormField(
|
||||||
|
textInputAction: TextInputAction.newline,
|
||||||
|
autocorrect: false,
|
||||||
|
enableSuggestions: false,
|
||||||
|
focusNode: _focusNode,
|
||||||
|
maxLines: null,
|
||||||
|
initialValue:
|
||||||
|
_value, // trick way to make backspace work always
|
||||||
|
keyboardType: TextInputType.multiline,
|
||||||
|
onChanged: handleInput,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]),
|
||||||
)),
|
)),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user