I'm trying to make my first app and I have a problem:
I made a gridview of longpress draggable widget who can be deleted when I move them on the corresponding drag target.
Everything works well when I create these widget as statelesswidget.
The problem is that when I try to put these widget in Stateful widget it doesn't work well..
The choosen widget isn't removed correctly
Does someone already had this problem?
(Sorry for my Bad english)
Thanks
Related
I have developed an application in Flutter Dart and used an Expanded widget in my application but wherever I used expanded widget, it destroyed my UI and converted that List into an infinite list with no data on it.
Please let me know that reason why does this occur and the potential solution.
Thank you everyone in advance
You can use the expanded widget inside the column and row. Sometimes with use of an expanded widget with the wrong widget will give the error in release mode while it is working in the debug mode.
Make sure you are using the expanded widget inside the column or row and that column and row should not be inside the scroll view or other scrollable widgets.
If still not clear then update the question with the widget hierarchy.
I was wondering if it's possible to wrap a widget in the widget tree at runtime with another widget?
An example of this would be you a TextField on screen, when I tap on it I wrap a container around it and re-render the widget tree. This is not for in production use and will only be for debug use so no need to worry about the optimisation of the flutter tree.
Any example of this would be highly appreciated.
In my app I have two widgets which I can drag and drop to each other. When the widget is dragged above another widget there is a motion revealer, which indicates that a widget is dragged over another one. This works fine.
Now I want to style the motion revealer differently, depending on which widget is currently dragged.
Is there a way to get the type information of the dragged widget during the drag_motion callback?
Is there a way to detect if a widget is on screen/seen anywhere on the app. For example in a TabBar or a PageView.
I already know that I could use the widget's build method to detect this, but this results in some really weird behavior where sometimes the widget has already been built and when the user navigates to the screen nothing happens.
So is there any way to do this with an entire app?
Maybe you can try using widget key like a Global Key
final key = GlobalKey();
and they passes it to the widget you want to know the state
I have problem with widgets in CKEditor 4.3. How to allow widget insert other widget?
For example:
First widget has title and content. Second widget has left panel and right panel. How I can put second widget into first widget?
Thanks!
It's not possible yet. We had to block possibility to nest widgets while working on first Widget System implementation in CKEditor 4.3.
I reported a ticket for this feature. However, it may take a few major releases to remove this limitation, since it's a very complex thing.
Edit: Since CKEditor 4.5.0 Beta it is possible to nest widgets. If you want to test it quickly please check CKEditor 4.5 insert widget into other widget.