ThemeEncoder class
Encoder capable of converting Flutter Theme related classes and enums into JSON compatible values.
Unless otherwise stated, each function will return null
when given an
input of null
.
- Annotations
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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
Static Methods
-
encodeAlignment(
Alignment? value) → String? -
Encodes the given
value
to an String representation of the Alignment. Supported values are: -
encodeAppBarTheme(
AppBarTheme? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON representation. -
encodeAutovalidateMode(
AutovalidateMode? value) → String? -
Encodes the given
value
to a String. Supported values are: -
encodeAxis(
Axis? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeBlendMode(
BlendMode? value) → String? -
encodes the given
value
to an BlendMode. Supported values are: -
encodeBorderRadius(
BorderRadius? value) → Map< String, dynamic> ? -
Encodes the given
value
into a JSON representation. -
encodeBorderSide(
BorderSide? value) → Map< String, dynamic> ? -
Encodes the given
value
into a JSON representation. -
encodeBorderStyle(
BorderStyle? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeBottomAppBarTheme(
BottomAppBarTheme? value) → Map< String, dynamic> ? -
Encodes the given
value
into a JSON representation. - Encodes the given BottomNavigationBarThemeData to a JSON compatible map.
-
Encodes the given
value
to the String representation. Supported values are: -
encodeBottomSheetThemeData(
BottomSheetThemeData? value) → Map< String, dynamic> ? -
Encodes the given
value
into a JSON representation. -
encodeBoxBorder(
Border? value) → Map< String, dynamic> ? -
Encodes the given
value
into a JSON compatible map. This produces a Map in the following format: -
encodeBoxConstraints(
BoxConstraints? value) → Map< String, dynamic> ? -
Encodes the given
value
into a JSON compatible map. This produces a Map in the following format: -
encodeBoxDecoration(
BoxDecoration? value) → Map< String, dynamic> ? -
Encodes the given
value
into a JSON compatible map. This produces a Map in the following format: -
encodeBoxFit(
BoxFit? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeBoxShadow(
dynamic value) → Map< String, dynamic> ? -
Encodes the given
value
into a JSON compatible map. This produces a Map in the following format: -
encodeBoxShape(
BoxShape? value) → String? -
Encodes the given
value
to a BoxShape. Supported values are: -
encodeBrightness(
Brightness? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeButtonBarLayoutBehavior(
ButtonBarLayoutBehavior? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeButtonBarThemeData(
ButtonBarThemeData? value) → Map< String, dynamic> ? -
Encodes the given
value
into a JSON representation. -
encodeButtonStyle(
ButtonStyle? value) → Map< String, dynamic> ? -
Encodes the given
value
into a JSON representation. -
encodeButtonTextTheme(
ButtonTextTheme? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeButtonThemeData(
ButtonThemeData? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON representation. -
encodeCardTheme(
CardTheme? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON representation. -
encodeCheckboxThemeData(
CheckboxThemeData? value, {bool validate = true}) → Map< String, dynamic> ? - Encodes the given CheckboxThemeData to a JSON representation.
-
encodeChipThemeData(
ChipThemeData? value) → Map< String, dynamic> ? -
Encodes the given
value
into a JSON representation. -
encodeClip(
Clip? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeColor(
Color? value) → String? -
Encodes the given
value
to the String representation. This will always use a hash encoded 8 digit string: "#aarrbbgg" format. -
encodeColorScheme(
ColorScheme? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON representation. -
encodeCrossAxisAlignment(
CrossAxisAlignment? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeCrossFadeState(
CrossFadeState? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeCupertinoTextThemeData(
CupertinoTextThemeData? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON representation. -
encodeCupertinoThemeData(
dynamic value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON representation. -
encodeDataTableThemeData(
DataTableThemeData? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON representation. -
encodeDecorationImage(
DecorationImage? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON representation. -
encodeDecorationPosition(
DecorationPosition? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeDialogTheme(
DialogTheme? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON representation. -
encodeDividerThemeData(
DividerThemeData? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON representation. -
encodeDragStartBehavior(
DragStartBehavior? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeEdgeInsetsGeometry(
EdgeInsets? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON compatible Map. The returned result will always have the following format: -
encodeElevatedButtonThemeData(
ElevatedButtonThemeData? value) → Map< String, dynamic> ? -
Encodes the given
value
into a JSON representation. -
encodeFilterQuality(
FilterQuality? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeFlexFit(
FlexFit? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeFloatingActionButtonAnimator(
FloatingActionButtonAnimator? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeFloatingActionButtonLocation(
FloatingActionButtonLocation? value) → String? -
Encodes the
value
to a String. Supported values are: -
encodeFloatingActionButtonThemeData(
FloatingActionButtonThemeData? value) → Map< String, dynamic> ? -
Encodes the given
value
into a JSON representation. -
encodeFloatingLabelBehavior(
FloatingLabelBehavior? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeFontFeature(
FontFeature? value) → Map< String, dynamic> ? -
Encodes the given
value
into a JSON representation. -
encodeFontStyle(
FontStyle? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeFontWeight(
FontWeight? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeGradient(
Gradient? value) → Map< String, dynamic> ? -
Encodes the given
value
to the String representation. This only supports the following Gradient subclasses: -
encodeGradientTransform(
GradientTransform? value) → Map< String, dynamic> ? -
Encodes the given
value
to the String representation. This only supports the following GradientTransform subclasses: -
encodeHitTestBehavior(
HitTestBehavior? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeIconData(
IconData? value) → Map< String, dynamic> ? -
Encodes the given
value
to the JSON representation. -
encodeIconThemeData(
IconThemeData? value) → Map< String, dynamic> ? -
Encodes the given
value
into a JSON representation. -
encodeImageProvider(
ImageProvider< Object> ? value, {bool validate = true}) → Map<String, dynamic> ? -
Encodes the given
value
to an JSON value. This expects a specific "type" attribute to be one of: -
encodeImageRepeat(
ImageRepeat? value) → String? -
Encodes the given
value
into a String representation. Supported values are: -
encodeInputBorder(
InputBorder? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON representation. This only supports the following subclasses: -
encodeInputDecorationTheme(
InputDecorationTheme? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON representation. -
encodeInteractiveInkFeatureFactory(
InteractiveInkFeatureFactory? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeLocale(
Locale? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON representation. -
encodeMainAxisAlignment(
MainAxisAlignment? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeMainAxisSize(
MainAxisSize? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeMaterialBannerThemeData(
MaterialBannerThemeData? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON representation. -
encodeMaterialColor(
MaterialColor? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON representation. -
encodeMaterialStatePropertyBorderSide(
MaterialStateProperty< BorderSide?> ? value, {bool validate = true}) → Map<String, dynamic> ? -
Encodes the
value
into a JSON representation. -
encodeMaterialStatePropertyColor(
MaterialStateProperty< Color?> ? value, {bool validate = true}) → Map<String, dynamic> ? -
Encodes the
value
into a JSON representation. -
encodeMaterialStatePropertyDouble(
MaterialStateProperty< double?> ? value, {bool validate = true}) → Map<String, dynamic> ? -
Encodes the
value
into a JSON representation. -
encodeMaterialStatePropertyEdgeInsetsGeometry(
MaterialStateProperty< EdgeInsetsGeometry?> ? value, {bool validate = true}) → Map<String, dynamic> ? -
Encodes the
value
into a JSON representation. -
encodeMaterialStatePropertyMouseCursor(
MaterialStateProperty< MouseCursor?> ? value, {bool validate = true}) → Map<String, dynamic> ? -
Encodes the
value
into a JSON representation. -
encodeMaterialStatePropertyOutlinedBorder(
MaterialStateProperty< OutlinedBorder?> ? value, {bool validate = true}) → Map<String, dynamic> ? -
Encodes the
value
into a JSON representation. -
encodeMaterialStatePropertySize(
MaterialStateProperty< Size?> ? value, {bool validate = true}) → Map<String, dynamic> ? -
Encodes the
value
into a JSON representation. -
encodeMaterialStatePropertyTextStyle(
MaterialStateProperty< TextStyle?> ? value, {bool validate = true}) → Map<String, dynamic> ? -
Encodes the
value
into a JSON representation. -
encodeMaterialTapTargetSize(
MaterialTapTargetSize? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeMaterialType(
MaterialType? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeMatrix4(
Matrix4? value) → List< double> ? -
Encodes the
value
to a Matrix4. This will encode thevalue
into a 16 element List ofdouble
. -
encodeMaxLengthEnforcement(
MaxLengthEnforcement? value, {bool validate = true}) → String? -
Encodes the
value
to a MaxLengthEnforcement. Supported values are: -
encodeMouseCursor(
MouseCursor? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON representation. There will be a "type" attribute that is one of: -
Encodes the given
value
to the String representation. Supported values are: -
Encodes the given
value
to a JSON representation. -
encodeNotchedShape(
NotchedShape? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeOffset(
Offset? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON representation. -
encodeOrdinalSortKey(
OrdinalSortKey? value) → Map< String, dynamic> ? - Encodes the given OrdinalSortKey to a JSON representation. This produces the given the following structure:
-
encodeOutlinedBorder(
ShapeBorder? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON compatible Map. The value structure returned the type of the OutlinedBorder passed in. -
encodeOutlinedButtonThemeData(
OutlinedButtonThemeData? value) → Map< String, dynamic> ? -
Encodes the given
value
into a JSON representation. -
encodeOverflow(
dynamic value) → String? -
Encodes the
value
to a String. Supported values are: -
encodePageTransitionsBuilder(
PageTransitionsBuilder? value) → String? -
Encodes the
value
to a String. Supported values are: -
encodePageTransitionsTheme(
PageTransitionsTheme? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON representation -
encodePopupMenuThemeData(
PopupMenuThemeData? value) → Map< String, dynamic> ? -
Encodes the
value
to a JSON representation. -
encodeRadioThemeData(
RadioThemeData? value, {bool validate = true}) → Map< String, dynamic> ? - Encodes the given RadioThemeData to a JSON representation.
-
encodeRadius(
Radius? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON compatible map. -
encodeRangeSliderThumbShape(
RoundRangeSliderThumbShape? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON representation. This only supports the following subclasses: -
encodeRangeSliderTickMarkShape(
RangeSliderTickMarkShape? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON representation. This only supports the following subclasses: -
encodeRangeSliderTrackShape(
RangeSliderTrackShape? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeRangeSliderValueIndicatorShape(
RangeSliderValueIndicatorShape? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeRect(
Rect? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON compatible Map. -
encodeScrollbarThemeData(
ScrollbarThemeData? value) → Map< String, dynamic> ? - Encodes the given ScrollbarThemeData to the JSON representation. This produces the following structure:
-
encodeScrollPhysics(
ScrollPhysics? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON compatible Map. -
encodeScrollViewKeyboardDismissBehavior(
ScrollViewKeyboardDismissBehavior? value) → String? -
Encodes the
value
to a String. Supported values are: -
encodeSemanticsTag(
SemanticsTag? value) → Map< String, dynamic> ? - Encodes the given SemanticsTag to a JSON representation. This produces the given the following structure:
-
encodeShadow(
Shadow? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON compatible Map. -
encodeShapeBorder(
ShapeBorder? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON compatible Map. The value structure returned the type of the ShapeBorder passed in. -
encodeShowValueIndicator(
ShowValueIndicator? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeSize(
Size? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON compatible Map. -
encodeSliderComponentShape(
SliderComponentShape? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeSliderThemeData(
SliderThemeData? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON representation. -
encodeSliderTickMarkShape(
SliderTickMarkShape? value, {bool validate = true}) → String? - Encodes the SliderTickMarkShape to a String. Supported values are:
-
encodeSliderTrackShape(
SliderTrackShape? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON representation. This only supports encoding the following subclasses: -
encodeSmartDashesType(
SmartDashesType? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeSmartQuotesType(
SmartQuotesType? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeSnackBarBehavior(
SnackBarBehavior? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeSnackBarThemeData(
SnackBarThemeData? value) → Map< String, dynamic> ? -
Encodes the given
value
to the JSON representation. -
encodeStackFit(
StackFit? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeStrutStyle(
StrutStyle? value) → Map< String, dynamic> ? -
Encodes the given
value
to the JSON representation. -
encodeSystemUiOverlayStyle(
SystemUiOverlayStyle? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeTabBarIndicatorSize(
TabBarIndicatorSize? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeTabBarTheme(
TabBarTheme? value) → Map< String, dynamic> ? -
Encodes the given
value
to the JSON representation. -
encodeTargetPlatform(
TargetPlatform? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeTextAlign(
TextAlign? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeTextAlignVertical(
TextAlignVertical? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeTextBaseline(
TextBaseline? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeTextButtonThemeData(
TextButtonThemeData? value) → Map< String, dynamic> ? -
Encodes the given
value
into a JSON representation. -
encodeTextCapitalization(
TextCapitalization? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeTextDecoration(
TextDecoration? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeTextDecorationStyle(
TextDecorationStyle? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeTextDirection(
TextDirection? value) → String? -
Encodes the
value
into a String representation. Supported values are: -
encodeTextHeightBehavior(
TextHeightBehavior? value) → Map< String, dynamic> ? -
Encodes the given
value
to the JSON representation. -
encodeTextInputAction(
TextInputAction? value) → String? -
Encodes the
value
into a String representation. Supported values are: -
encodeTextInputType(
TextInputType? value) → String? -
Encodes the
value
into a String representation. Supported values are: -
encodeTextOverflow(
TextOverflow? value) → String? -
Encodes the
value
into a String representation. Supported values are: -
encodeTextSelectionThemeData(
TextSelectionThemeData? value) → Map< String, dynamic> ? -
Encodes a given
value
into a JSON compatible Map structure. This will return the following structure: -
encodeTextStyle(
TextStyle? value) → Map< String, dynamic> ? -
Encodes a given
value
into a JSON compatible Map structure. This will return the following structure: -
encodeTextTheme(
TextTheme? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON compatible Map. The returned Map will have the following structure: -
encodeTextWidthBasis(
TextWidthBasis? value) → String? -
Encodes the
value
into a String representation. Supported values are: -
encodeThemeData(
ThemeData? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON compatible Map. The returned Map will have the following structure: -
encodeTileMode(
TileMode? value) → String? -
Encodes the
value
to a TileMode. Supported values are: -
encodeTimePickerThemeData(
TimePickerThemeData? value) → Map< String, dynamic> ? -
encodes the given
value
to a TimePickerThemeData. This expects thevalue
to have the following structure: -
encodeToggleButtonsThemeData(
ToggleButtonsThemeData? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON compatible Map. The returned returned value will have the following structure. -
encodeToolbarOptions(
ToolbarOptions? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON compatible Map. The returned returned value will have the following structure. -
encodeTooltipThemeData(
TooltipThemeData? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON compatible Map. The returned returned value will have the following structure. -
encodeTypography(
Typography? value) → Map< String, dynamic> ? -
Encodes the given
value
to a JSON compatible Map. The returned returned value will have the following structure. -
encodeVerticalDirection(
VerticalDirection? value) → String? -
Encodes the given
value
to the String representation. Supported values are: -
encodeVisualDensity(
VisualDensity? value) → String? -
Encodes the given
value
to the String representation. Supported values are: