LangIconWithToolTip class
Icon representing the language (with tooltip).
It will search icon, in this order:
- in
Locale.flag
, - in languageToCountry,
- or if useEmoji will search emoji,
- or if useNLettersInsteadOfIcon will just show letters.
For special values like showOtherLocales and systemLocale there are exist special values in languageToCountry map.
You can use LocaleManager.reassignFlags or languageToCountry to change global defaults.
Or just provide your own child widget.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- LangIconWithToolTip
Constructors
- LangIconWithToolTip({Key? key, String? langCode, String toolTipPrefix = '', double? radius, int useNLettersInsteadOfIcon = 0, ShapeBorder? shape = const CircleBorder(eccentricity: 0), Widget? child, LocaleName? localeNameFlag, bool useEmoji = false, MultiLangCountries multiLangCountries = MultiLangCountries.auto, bool multiLangForceAll = false, double specialFlagsPadding = 3.5, MultiLangBuilder? multiLangWidget})
-
const
- LangIconWithToolTip.forIconBuilder(LocaleName? localeNameFlag, bool _, {Key? key, String toolTipPrefix = '', double? radius, int useNLettersInsteadOfIcon = 0, ShapeBorder? shape = const CircleBorder(eccentricity: 0), Widget? child, String? langCode, bool useEmoji = false, MultiLangCountries multiLangCountries = MultiLangCountries.auto, bool multiLangForceAll = false, double specialFlagsPadding = 3.5, MultiLangBuilder? multiLangWidget})
-
Just a shortcut to use as tear-off in builders of
widgets that generate lists of elements.
const
Properties
- child → Widget?
-
OPTIONAL: your custom widget here,
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- langCode → String?
-
Have no effect if localeNameFlag is provided.
final
- localeNameFlag → LocaleName?
-
An entry of SupportedLocaleNames.
final
- multiLangCountries → MultiLangCountries
-
How to display Locales for countries with multiple languages:
final
- multiLangForceAll → bool
-
Force all Locales to be displayed as MultiLangCountries.
final
- multiLangWidget → MultiLangBuilder?
-
Custom builder function to display Locales for countries with multiple languages,
final
- radius → double?
-
Radius (Size) of icon.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shape → ShapeBorder?
-
Clip the flag by ShapeBorder, default: CircleBorder.
final
- specialFlagsPadding → double
-
Padding for special icons (systemLocale, showOtherLocales).
final
- toolTipPrefix → String
-
Prefix for Tooltip.
final
- useEmoji → bool
-
Use Emoji instead of svg flag.
final
- useNLettersInsteadOfIcon → int
-
If zero - used Icon, otherwise first N letters of language code.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of
DiagnosticsNode
objects describing this node's children.inherited -
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
fittedFlag(
Widget? flag, String locCode, List lang) → FittedBox - Wrap flag with required widgets.
-
getFlag(
) → Widget? - Get flag for this widget
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited