StripeConfig class
Represents the configuration for Stripe payment gateway.
This class encapsulates the publishable key and secret key required to interact with the Stripe API. It provides methods for converting between JSON and Dart objects for data persistence and serialization.
Important Security Note: The secretKey should be handled with extreme
care. Avoid exposing it in client-side code or storing it in version
control. Ideally, it should only be used on a secure server.
Constructors
- StripeConfig({required String publishableKey, required String secretKey})
- Creates a StripeConfig instance.
-
StripeConfig.fromJson(Map<
String, dynamic> json) -
Creates a StripeConfig instance from a JSON map.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- publishableKey → String
-
The Stripe publishable key.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secretKey → String
-
The Stripe secret key.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts this StripeConfig instance to a JSON map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited