LanguageTileThemeData class final

A theme extension data class that holds theme data for language tiles.

This class is specific to tiles that display natural language data and it extends BaseTileThemeData with a specified type of NaturalLanguage. It capitalizes on the base class's ability to customize the appearance and interaction of tiles within the app's theme.

Usage: To utilize this theme data, provide a builder function that knows how to render a tile given NaturalLanguage item properties.

Example:

final languageTileThemeData = LanguageTileThemeData(
  builder: (itemProperties, {isDense}) => MyLanguageTile(
    title: itemProperties.item.translations.first.common,
    isDense: isDense,
  ),
);

The MyLanguageTile is a hypothetical widget that uses the provided NaturalLanguage properties to build a UI component representing a language.

Inheritance

Constructors

LanguageTileThemeData({Widget builder(ItemProperties<NaturalLanguage> itemProperties, {bool? isDense})?})
Constructs a LanguageTileThemeData with an optional builder function.
const

Properties

builder → (Widget Function(ItemProperties<NaturalLanguage> itemProperties, {bool? isDense})?)
A builder function that takes ItemProperties and an optional density flag, and returns a widget for the tile.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type Object
The extension's type.
no setterinherited

Methods

copyWith({Widget builder(ItemProperties<NaturalLanguage> itemProperties, {bool? isDense})?}) → BaseTileThemeData<NaturalLanguage>
Creates a copy of this theme extension with the given fields replaced by the non-null parameter values.
inherited
lerp(covariant ThemeExtension<BaseTileThemeData<NaturalLanguage>>? other, double t) → BaseTileThemeData<NaturalLanguage>
Linearly interpolate with another ThemeExtension object.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited