Skip to main content

WidgetsLocalizations

Trait WidgetsLocalizations 

Source
pub trait WidgetsLocalizations: 'static {
Show 17 methods // Required methods fn text_direction(&self) -> TextDirection; fn reorder_item_to_start(&self) -> String; fn reorder_item_to_end(&self) -> String; fn reorder_item_up(&self) -> String; fn reorder_item_down(&self) -> String; fn reorder_item_left(&self) -> String; fn reorder_item_right(&self) -> String; fn copy_button_label(&self) -> String; fn cut_button_label(&self) -> String; fn paste_button_label(&self) -> String; fn select_all_button_label(&self) -> String; fn look_up_button_label(&self) -> String; fn search_web_button_label(&self) -> String; fn share_button_label(&self) -> String; fn radio_button_unselected_label(&self) -> String; // Provided methods fn search_results_found(&self) -> String { ... } fn no_results_found(&self) -> String { ... }
}
Expand description

Interface for localized resource values for the lowest levels of the Flutter framework.

This class also maps locales to a specific Directionality using the text_direction property.

See also:

Required Methods§

Source

fn text_direction(&self) -> TextDirection

The reading direction for text in this locale.

Source

fn reorder_item_to_start(&self) -> String

The semantics label used for SliverReorderableList to reorder an item in the list to the start of the list.

Source

fn reorder_item_to_end(&self) -> String

The semantics label used for SliverReorderableList to reorder an item in the list to the end of the list.

Source

fn reorder_item_up(&self) -> String

The semantics label used for SliverReorderableList to reorder an item in the list one space up the list.

Source

fn reorder_item_down(&self) -> String

The semantics label used for SliverReorderableList to reorder an item in the list one space down the list.

Source

fn reorder_item_left(&self) -> String

The semantics label used for SliverReorderableList to reorder an item in the list one space left in the list.

Source

fn reorder_item_right(&self) -> String

The semantics label used for SliverReorderableList to reorder an item in the list one space right in the list.

Source

fn copy_button_label(&self) -> String

The label for the copy button on the text selection toolbar.

Source

fn cut_button_label(&self) -> String

The label for the cut button on the text selection toolbar.

Source

fn paste_button_label(&self) -> String

The label for the paste button on the text selection toolbar.

Source

fn select_all_button_label(&self) -> String

The label for the select all button on the text selection toolbar.

Source

fn look_up_button_label(&self) -> String

The label for the look up button on the text selection toolbar.

Source

fn search_web_button_label(&self) -> String

The label for the search web button on the text selection toolbar.

Source

fn share_button_label(&self) -> String

The label for the share button on the text selection toolbar.

Source

fn radio_button_unselected_label(&self) -> String

The semantics label used for a RadioGroup widget when the radio button is unselected.

Provided Methods§

Source

fn search_results_found(&self) -> String

Label for “search results found” announcement.

Source

fn no_results_found(&self) -> String

Label for “no results found” announcement.

Implementations§

Source§

impl dyn WidgetsLocalizations

Source

pub fn of(app: &mut App, context: BuildContext) -> Rc<dyn WidgetsLocalizations>

The WidgetsLocalizations from the closest Localizations instance that encloses the given context.

This method is just a convenient shorthand for: Localizations::of::<dyn WidgetsLocalizations>(app, context).

References to the localized resources defined by this class are typically written in terms of this method. For example:

<dyn WidgetsLocalizations>::of(app, context).reorder_item_up()

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§