MidtransConfig class

Represents the configuration settings for the Midtrans Flutter SDK.

This class contains parameters such as client key, merchant base URL, language, color theme, and log enabling status.

Annotations

Constructors

MidtransConfig({required String clientKey, required String merchantBaseUrl, String language = 'id', ColorTheme? colorTheme, bool enableLog = true})
Constructs a MidtransConfig instance.
MidtransConfig.fromJson(Map<String, dynamic> json)
Creates a MidtransConfig instance from a JSON map.
factory

Properties

clientKey String
The client key obtained from Midtrans.
final
colorTheme ColorTheme?
The color theme for customizing the payment UI.
final
enableLog bool
A flag indicating whether logging is enabled or not (default is true).
final
hashCode int
The hash code for this object.
no setterinherited
language String
The language code used for localization (default is 'id' for Indonesian).
final
merchantBaseUrl String
The base URL of the merchant's server.
final
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
toJson() Map<String, dynamic>
Converts this MidtransConfig instance to a JSON map.
toString() String
A string representation of this object.
inherited

Operators

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