FlavorConfig class

A configuration class for the flavor.

This class is used to configure the flavor of the app.

You can configure the flavor of the app by passing the following parameters:

  • flavorName: The name of the flavor.
  • bannerEnabled: Determines if the banner should be shown.
  • bannerColor: The color of the banner if enabled.
  • textColor: The color of the text inside the banner if enabled.
  • values: The values that belong to the flavor.

Constructors

FlavorConfig({required String flavorName, required Map<String, dynamic> values, bool bannerEnabled = true, Color bannerColor = Colors.pink, Color textColor = Colors.white})
The factory constructor for the FlavorConfig.
factory

Properties

bannerColor Color
The color of the banner if enabled.
final
bannerEnabled bool
Determines if the banner should be shown.
final
flavorName String
Creates a FlavorConfig instance. The name of the flavor.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
textColor Color
The color of the text inside the banner if enabled.
final
values Map<String, dynamic>
The values that belong to the flavor.
final

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 Properties

instance FlavorConfig
Gets the instance of the FlavorConfig.
no setter

Static Methods

getBannerColor() Color
Gets the color of the banner if enabled.
getFlavorName() String
Gets the name of the flavor.
getTextColor() Color
Gets the color of the text inside the banner if enabled.
getValue(String key) → dynamic
Gets a value given a key.
getValues() Map<String, dynamic>
Gets the values that belong to the flavor.
isBannerEnabled() bool
Returns true if the banner will be shown.