FlagThemeData class

A class that defines the theme data for a flag, including its aspect ratio, decoration, padding, and dimensions.

This class extends ThemeExtension to allow for easy theming and customization of flags. It also implements DecoratedFlagInterface to provide a consistent interface for decorated flags.

Inheritance
Implemented types
Available extensions
Annotations

Constructors

FlagThemeData({double? aspectRatio, BoxDecoration? decoration, DecorationPosition? decorationPosition, EdgeInsetsGeometry? padding, double? height, double? width, Widget? child})
Creates a new instance of FlagThemeData.
const
FlagThemeData.small({double? aspectRatio, BoxDecoration? decoration = const BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(4))), DecorationPosition? decorationPosition, EdgeInsetsGeometry? padding, double? height = 18, double? width, Widget? child})
Creates a new instance of FlagThemeData with pre-defined default values for small flags with rounded corners.
const

Properties

aspectRatio double?
The aspect ratio of the flag, calculated based on the specified aspect ratio or the dimensions of the flag.
no setteroverride
calculatedAspectRatio double?

Available on DecoratedFlagInterface, provided by the DecoratedFlagInterfaceExtension extension

The calculated aspect ratio of the flag based on its width and height.
no setter
child Widget?
A widget to display in the foreground of the flag.
final
decoration BoxDecoration?
The decoration of the flag.
final
decorationPosition DecorationPosition?
The position of the decoration.
final
hashCode int
The hash code for this object.
no setteroverride
height double?
The height of the flag.
final
padding EdgeInsetsGeometry?
The padding around the flag.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
specifiedAspectRatio double?
The specified aspect ratio of the flag.
no setter
type Object
The extension's type.
no setterinherited
width double?
The width of the flag.
final

Methods

copyWith({double? aspectRatio, BoxDecoration? decoration, DecorationPosition? decorationPosition, EdgeInsetsGeometry? padding, double? height, double? width, Widget? child}) FlagThemeData
Creates a copy of this FlagThemeData but with the given fields replaced with the new values.
override
lerp(covariant ThemeExtension<FlagThemeData>? other, double t) FlagThemeData
Linearly interpolate with another ThemeExtension object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override
toThemeData({Widget? child}) FlagThemeData

Available on DecoratedFlagInterface, provided by the DecoratedFlagInterfaceExtension extension

Converts this DecoratedFlagInterface to a FlagThemeData instance.

Operators

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