new scale mode
This commit is contained in:
parent
d73d3166d3
commit
479b8303d7
@ -44,6 +44,7 @@ class FfiModel with ChangeNotifier {
|
|||||||
if (k == 'name') return;
|
if (k == 'name') return;
|
||||||
_permissions[k] = v == 'true';
|
_permissions[k] = v == 'true';
|
||||||
});
|
});
|
||||||
|
print('$_permissions');
|
||||||
}
|
}
|
||||||
|
|
||||||
void clear() {
|
void clear() {
|
||||||
|
@ -26,7 +26,6 @@ class _RemotePageState extends State<RemotePage> {
|
|||||||
Timer _interval;
|
Timer _interval;
|
||||||
bool _showBar = true;
|
bool _showBar = true;
|
||||||
double _bottom = 0;
|
double _bottom = 0;
|
||||||
bool _pan = false;
|
|
||||||
var _scaleMode = false;
|
var _scaleMode = false;
|
||||||
final FocusNode _focusNode = FocusNode();
|
final FocusNode _focusNode = FocusNode();
|
||||||
|
|
||||||
@ -143,15 +142,6 @@ class _RemotePageState extends State<RemotePage> {
|
|||||||
showOptions(context);
|
showOptions(context);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
Container(
|
|
||||||
color: _pan ? Colors.blue[500] : null,
|
|
||||||
child: IconButton(
|
|
||||||
color: Colors.white,
|
|
||||||
icon: Icon(Icons.pan_tool),
|
|
||||||
onPressed: () {
|
|
||||||
setState(() => _pan = !_pan);
|
|
||||||
},
|
|
||||||
))
|
|
||||||
]),
|
]),
|
||||||
IconButton(
|
IconButton(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@ -238,19 +228,22 @@ class _RemotePageState extends State<RemotePage> {
|
|||||||
y = details.globalPosition.dy;
|
y = details.globalPosition.dy;
|
||||||
}
|
}
|
||||||
..onLongPress = () {
|
..onLongPress = () {
|
||||||
print('long press');
|
|
||||||
() async {
|
() async {
|
||||||
await showMenu(
|
print('long press: $x $y');
|
||||||
|
var value = await showMenu(
|
||||||
context: context,
|
context: context,
|
||||||
position: RelativeRect.fromLTRB(x, y, 0, 0),
|
position:
|
||||||
|
RelativeRect.fromLTRB(x + 20, y + 20, x + 20, y + 20),
|
||||||
items: [
|
items: [
|
||||||
PopupMenuItem<String>(
|
PopupMenuItem<String>(
|
||||||
child: const Text('Doge'), value: 'Doge'),
|
child: Text(_scaleMode ? 'Pan Mode' : 'Scale Mode'),
|
||||||
PopupMenuItem<String>(
|
value: 'mode'),
|
||||||
child: const Text('Lion'), value: 'Lion'),
|
|
||||||
],
|
],
|
||||||
elevation: 8.0,
|
elevation: 8.0,
|
||||||
);
|
);
|
||||||
|
if (value == 'mode') {
|
||||||
|
setState(() => _scaleMode = !_scaleMode);
|
||||||
|
}
|
||||||
}();
|
}();
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user