What is android ems equivalent in flutter? - dart

I want to prevent Text widget width changing when text changes, in android i used ems but it does not exist in flutter, of course i can wrap Text widget with SizedBox widget, but there might be a better way..

Related

Need Help in grouping widgets together for ios

I have created some widgets for ios. We have some small widgets and some medium sized widgets.
What we need to achieve is that, when we add small widget, only small widgets appear in the list when you edit widget. And when you edit a medium widget, only medium widgets show in the list.
As of now all widget from the shows in the list while editing widget.
Not sure how to achieve this, looking for help.

Flutter Vertical Drawer

I'm new to flutter, and after doing some searching, can't find a widget similar to the Drawer for the top of the page coming down, instead of the left or right side of the page coming out. Is there such a widget or a way to create one?
Not an easy task, but Flutter is open source. You can create your own version of Scaffold and Drawer with a vertical orientation. Just copy and modify the source code.
As of this date the Drawer widget doesn't support this, and there is no 'Vertical Drawer' widget in the Flutter widget catalog.
Thankfully, Akshath Jain created a nice SlidingUpPanel widget which does the trick nicely. For my use case I just needed it to slide from the bottom. I haven't tested it myself, but there is a slideDirection property which you can set to SlideDirection.DOWN and it should do what you're asking for.

How to expand iOS Today Widget by default?

I'm setting [self.extensionContext setWidgetLargestAvailableDisplayMode:NCWidgetDisplayModeExpanded] in viewDidLoad and, as expected, I'm getting the "show more" button that toggles between compact and expanded widget mode.
When the widget starts, it's always in compact mode by default. How can I change that and make widget be in expanded mode when it starts?
It is impossible.
A widget should not take over the screen by default. It defeats the purpose of a widget. You should make the content you want to display to user minimum and small (like a brief info), and user should be able to expand to view more details. This is how Widget works as intended.

is possible to create a text with click action (like a Action link ) in blackberry mainscreen?

This is seems like a pretty simple question. Is it possible to set a custom action for a text link (those blue texts that are underlined) inside mainscreen in blackberry. In other words, is it possible to have a handler do something on an event like feildchangelistner on the text?
thanks
Yes, the various fields that display text are children of the class field
As you can see from the doc you can override navigationClick, unclick. You may also set the font as one that is underlined and override the default color in paint. You will also need to code touch events if you are supporting the older touchscreen devices (Storms OS5 and below)
I would advise against doing any of this because RIM provide a class that seems to fit your exact needs in the advanced UI pack. Take a look at HyperlinkButtonField

Mozilla "Jetpack" Add-On: Anchor Panel to Widget

I'm making a Jetpack extension in which a widget opens a panel. Clicking the widget opens the panel as expected (anchored in the lower-right corner to the widget). But if I call widget.panel.show() from my code, the panel opens detached from the widget, centered in the screen, floating in space.
In short, how can I fix this?
Can I simulate a click event on the widget (somehow) instead of calling widget.panel.show()?
Can I force the panel to anchor to the widget?
This question has a solution that worked in the previous Jetpack API, but I can't translate to the new interface:
Using positioning 'Panel' in new Jetpack API
panel.show(require("tab-browser").activeTab.ownerDocument.getElementById('widget:yourAddonId#package.json-yourWidgetId'));
Works for me with Addon SDK 1.8.1
Where:
yourAddonId#package.json - your addon id from package.json
yourWidgetId - your widget id
panel.show(widget)
isn't working?

Resources