• Eric Seidel's avatar
    Focus support. · 4da27671
    Eric Seidel authored
    This patch provides a class to manage focus, Focus, and a class to
    manage ownership of the keyboard, KeyboardHandle.
    
    Inherited (in widgets.dart) is adjusted to support subclasses that
    need to copy state from instance to instance.
    
    A GlobalKey key type is introduced that is basically the same as
    UniqueKey. Component classes that need a globally-unique key can
    specify that their 'key' constructor argument is a GlobalKey.
    
    Focus
    -----
    
    You can use `Focus.at(this)` to determine if you, a Component, are
    currently focused.
    
    You can use `Focus.moveTo(this)` to take the focus or give it to a
    particular component.
    
    For this to work, there has to be a Focus class in the widget
    hierarchy.
    
    Currently, there can only be one Focus class, because nested scopes
    aren't supported. We should add support for that in a future patch.
    See issue #229.
    
    KeyboardHandle
    --------------
    
    Instead of directly interacting with the keyboard service, you now ask
    for a KeyboardHandle using `_keyboard.show(client)`. This returns a
    KeyboardHandle class. On that class, you can call `handle.release()`
    when you want to hide the keyboard. If `handle.attached` is still
    true, and you need to reshow the keyboard after the user hid it, then
    you can can `handle.showByRequest()`.
    
    The point of this is that the `keyboard.show()` method maintains the
    invariant that only one KeyboardHandle is live at a time.
    
    There are some issues with the keyboard service that I filed as a
    result of doing this patch: #226 #227
    4da27671
Name
Last commit
Last update
..
README.md Loading commit data...
animated_component.dart Loading commit data...
animated_container.dart Loading commit data...
basic.dart Loading commit data...
block_viewport.dart Loading commit data...
button_base.dart Loading commit data...
card.dart Loading commit data...
checkbox.dart Loading commit data...
default_text_style.dart Loading commit data...
dialog.dart Loading commit data...
dismissable.dart Loading commit data...
drawer.dart Loading commit data...
drawer_divider.dart Loading commit data...
drawer_header.dart Loading commit data...
drawer_item.dart Loading commit data...
fixed_height_scrollable.dart Loading commit data...
flat_button.dart Loading commit data...
floating_action_button.dart Loading commit data...
focus.dart Loading commit data...
icon.dart Loading commit data...
icon_button.dart Loading commit data...
ink_well.dart Loading commit data...
material.dart Loading commit data...
material_button.dart Loading commit data...
modal_overlay.dart Loading commit data...
navigator.dart Loading commit data...
popup_menu.dart Loading commit data...
popup_menu_item.dart Loading commit data...
radio.dart Loading commit data...
raised_button.dart Loading commit data...
scaffold.dart Loading commit data...
scrollable.dart Loading commit data...
scrollable_list.dart Loading commit data...
scrollable_viewport.dart Loading commit data...
snack_bar.dart Loading commit data...
switch.dart Loading commit data...
tabs.dart Loading commit data...
task_description.dart Loading commit data...
theme.dart Loading commit data...
toggleable.dart Loading commit data...
tool_bar.dart Loading commit data...
variable_height_scrollable.dart Loading commit data...
widget.dart Loading commit data...