Can I move the mouse pointer in flutter desktop - flutter

I am building a virtual mouse kind of app, so is there any way in flutter by which I can move the mouse pointer to a specific coordinate on the screen.
I know there is a Robot class in java which can do the exact thing, so is there something similar in Flutter(Dart)
Note: I am not referring to the MouseRegion Widget kind of stuff

There is no such functionality built into Flutter, but you could write a plugin that would do that.

Related

Detect device orientation in flame (flutter package)

I've been following the doodle dash tutorial for flame in flutter:
https://codelabs.developers.google.com/codelabs/flutter-flame-game#0
I'd like to modify it so that the user can tip the phone left and right to move dash, rather than having on-screen buttons. However, I can't find anything in the docs which refers to an OrientationDetector or anything like it. Is there something here that I'm missing, or is this missing from flame?
Thanks
Flame does not provide this from within the engine, to act upon such events you should use an external package like for example sensors_plus or any of the other packages that provide you with gyroscope data.

how to create a scrollView in Flutter Flame

I need a listView for my Game. Is there a simple way to create one? There are no tutorials for such a feature and I couldn't find anything in the documentation.
Flame doesn't provide their own widgets for these things, we rely on Flutters excellent widget system.
So you create the widget directly in Flutter and then you either put your GameWidget in a stack (or similar) and use Flutter's own Navigation to move between the widgets, or you use Flame's overlay system.
For using the overlays you add the overlays that you want to have accessible when you create the GameWidget and then you call game.overlays.add to render a specific widget, and game.overlays.remove to stop rendering it.

How to use textField in a Flame game?

I am developing a game with flame engine. I need to open a text input (textField, textEdit or whatever its name) and ask the user his/her input (player name) as a text in my flame game. How can I do that in flame?
There are two ways to go about doing this:
The first option is to build it yourself. This might allow for the most possible level of customization, and would involve creating a TextBoxComponent and listening to KeyboardEvents on your game. You would need to implement rendering and commands like moving the caret by yourself.
The easier option is to use the widgets overlay feature. Remember that the Flame game is just another widget in the tree, and you can compose widgets using the Flutter Stack widget. With widgets overlay you can more easily add a component that hovers on top of your flame game, that you can use to add your text input. I recommend building a simple Flutter Container with all the text input fields and labels you need and using a Widget Overlay to position that on top of your game. Please read the docs for Widget Overlay for more details. Also be sure to check out a list of all the other flame-provided widgets other than GameWidget that you might want to compose with your Flutter tree.

Keep container on top after dragging

I am migrating game from windows phone to flutter card game. I cannot find the way how to keep the card on the top after dragging.
Stack order is too complex and problematic for such simple action and would involve 4 player active, not active cards, cards on the table, combination sets re-arrangement :( In Windows phone there was a Rectangle with ZIndex which i could set to any rectangle on the screen.
I am missing something similar in flutter. I cannot believe that stack order is only way to solve this because it would make any game development impossible.
I am not using any game engine (maybe thats a problem) but i feel like i do not need it because it is not game-loop based game it is event based - click, drag etc.
Do you know any solution how i can achieve that?
There are 2 options -
1. Stack
Update the position of its children by mutating the List and calling setState or use Positioned.
2. Material
The Material widget has a property named elevation. Set it's value dynamically to achieve the effect

How to implement Material Speed Dial on Flutter?

Is there any native Flutter library for achieving Material Design Speed Dial?
I found only this FAB documentation, but it doesn't say anything about creating a menu out of it, though Material Design FAB documentation says at the top that FAB is supported in Flutter (it doesn't say how much it supports. Only that it supports, which would lead me to understand that it supports everything in the page).
Should I instead develop mine or look for third party libraries?
Nevermind. I'm creating my own Speed Dial. For now, it is part of a very simple project, but once I test it more and add animations, I'll share a final link.
It still don't have animations, because I'm using Visibility for showing or hiding the buttons, and it was tested only in Scaffold's FAB, placed on bottom right of screen, so no link for now, sorry. Less than an alpha right now (and I still need to study how one shares an API for adding to dependency).
I hope I'll be able to create a simple and light enough implementation. Easy to use and easy to understand if anybody wishes to take a look into the code later on. I've seen some implementations, but they are very complex and create (in my view) unnecessary extra widgets.
Some implementations I found:
https://flutterawesome.com/flutter-plugin-to-implement-a-material-design-speed-dial/
https://flutterawesome.com/flutter-floating-action-button-with-speed-dial/