start mouse tool
This commit is contained in:
parent
7f9826a710
commit
ed3fd81ef7
@ -26,6 +26,7 @@ class _RemotePageState extends State<RemotePage> {
|
|||||||
double _xOffset = 0;
|
double _xOffset = 0;
|
||||||
double _yOffset = 0;
|
double _yOffset = 0;
|
||||||
double _scale = 1;
|
double _scale = 1;
|
||||||
|
bool _mouseTools = false;
|
||||||
final FocusNode _focusNode = FocusNode();
|
final FocusNode _focusNode = FocusNode();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -125,15 +126,6 @@ class _RemotePageState extends State<RemotePage> {
|
|||||||
SystemChannels.textInput
|
SystemChannels.textInput
|
||||||
.invokeMethod('TextInput.show');
|
.invokeMethod('TextInput.show');
|
||||||
}),
|
}),
|
||||||
Transform.rotate(
|
|
||||||
angle: 15 * math.pi / 180,
|
|
||||||
child: IconButton(
|
|
||||||
color: Colors.white,
|
|
||||||
icon: Icon(Icons.flash_on),
|
|
||||||
onPressed: () {
|
|
||||||
showActions(context);
|
|
||||||
},
|
|
||||||
)),
|
|
||||||
IconButton(
|
IconButton(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
icon: Icon(Icons.tv),
|
icon: Icon(Icons.tv),
|
||||||
@ -141,6 +133,22 @@ class _RemotePageState extends State<RemotePage> {
|
|||||||
showOptions(context);
|
showOptions(context);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
Container(
|
||||||
|
color: _mouseTools ? Colors.blue[500] : null,
|
||||||
|
child: IconButton(
|
||||||
|
color: Colors.white,
|
||||||
|
icon: Icon(Icons.mouse),
|
||||||
|
onPressed: () {
|
||||||
|
setState(() => _mouseTools = !_mouseTools);
|
||||||
|
},
|
||||||
|
)),
|
||||||
|
IconButton(
|
||||||
|
color: Colors.white,
|
||||||
|
icon: Icon(Icons.more_vert),
|
||||||
|
onPressed: () {
|
||||||
|
showActions(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
]),
|
]),
|
||||||
IconButton(
|
IconButton(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@ -176,6 +184,7 @@ class _RemotePageState extends State<RemotePage> {
|
|||||||
_scale = scale;
|
_scale = scale;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onScaleEnd: (_) {},
|
||||||
child: FlutterEasyLoading(
|
child: FlutterEasyLoading(
|
||||||
child: Container(
|
child: Container(
|
||||||
color: MyTheme.canvasColor,
|
color: MyTheme.canvasColor,
|
||||||
@ -404,8 +413,8 @@ void showOptions(BuildContext context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void showActions(BuildContext context) {
|
void showActions(BuildContext context) {
|
||||||
final size = MediaQueryData.fromWindow(ui.window).size;
|
final size = MediaQuery.of(context).size;
|
||||||
final x = 150.0;
|
final x = 120.0;
|
||||||
final y = size.height;
|
final y = size.height;
|
||||||
() async {
|
() async {
|
||||||
var value = await showMenu(
|
var value = await showMenu(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user