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:

import 'package:world_countries/world_countries.dart';

void main() {
  final languageTileTheme = LanguageTileThemeData(
    itemBuilder: (props, defaultTile) => defaultTile,
  );
  assert(languageTileTheme.itemBuilder != null);
}

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

Inheritance

Constructors

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

Properties

hashCode → int
The hash code for this object.
no setterinherited
itemBuilder → Widget? Function(ItemProperties<NaturalLanguage>, IsoTile<NaturalLanguage>)?
A builder function that takes ItemProperties and a default tile widget, and returns a widget for the tile.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → Object
The extension's type.
no setterinherited

Methods

copyWith({Widget? itemBuilder(ItemProperties<NaturalLanguage>, IsoTile<NaturalLanguage>)?}) → 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