@string
Declares a named string value resource.
Declaration
<resources xmlns="https://xwidget.dev/values">
<string name="app_title">XWidget Demo App</string>
<string name="welcome_message">Welcome to XWidget!</string>
<string name="empty_state">No items found</string>
</resources>
| Attribute | Description | Required |
|---|---|---|
name |
Unique key for the value | Yes |
The string value is the text content of the element. Leading and trailing whitespace is preserved.
Fragment Usage
Reference with the @string/ directive:
Dart Usage
Throws an exception if the resource name is not found.
See Also
- Resources - Resource system overview