PaymentSheetGooglePay class abstract
Parameters related to the Payment sheet Google Pay config.
- Available extensions
- Annotations
-
- @freezed
Constructors
- PaymentSheetGooglePay({required String merchantCountryCode, String? currencyCode, @Default.new(false) bool testEnv, String? label, String? amount, @JsonKey.new(toJson: PaymentSheetGooglePay.platformButtonTypeToJson) PlatformButtonType? buttonType})
-
constfactory
-
PaymentSheetGooglePay.fromJson(Map<
String, dynamic> json) -
factory
Properties
- amount → String?
-
An optional amount to display for setup intents. Google Pay may or may not display this amount depending on its own internal logic. Defaults to 0 if none is provided.
no setterinherited
-
The Google Pay button type to use. Set to "Pay" by default.
no setterinherited
-
copyWith
→ $PaymentSheetGooglePayCopyWith<
PaymentSheetGooglePay> -
Create a copy of PaymentSheetGooglePay
with the given fields replaced by the non-null parameter values.
no setterinherited
- currencyCode → String?
-
The three-letter ISO 4217 alphabetic currency code, e.g. "USD" or "EUR". Required in order to support Google Pay when processing a Setup Intent.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- label → String?
-
An optional label to display with the amount. Google Pay may or may not display this label depending on its own internal logic. Defaults to a generic label if none is provided.
no setterinherited
- merchantCountryCode → String
-
The two-letter ISO 3166 code of the country of your business, e.g. "US"
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- testEnv → bool
-
Whether or not to use the google pay test environment. Set to
trueuntil you have applied for and been granted access to the Production environment.no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_PaymentSheetGooglePay value)) → TResult -
Available on PaymentSheetGooglePay, provided by the PaymentSheetGooglePayPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_PaymentSheetGooglePay value)?) → TResult? -
Available on PaymentSheetGooglePay, provided by the PaymentSheetGooglePayPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_PaymentSheetGooglePay value)?, {required TResult orElse()}) → TResult -
Available on PaymentSheetGooglePay, provided by the PaymentSheetGooglePayPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(String merchantCountryCode, String? currencyCode, bool testEnv, String? label, String? amount, PlatformButtonType? buttonType)?, {required TResult orElse()}) → TResult -
Available on PaymentSheetGooglePay, provided by the PaymentSheetGooglePayPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this PaymentSheetGooglePay to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(String merchantCountryCode, String? currencyCode, bool testEnv, String? label, String? amount, PlatformButtonType? buttonType)) → TResult -
Available on PaymentSheetGooglePay, provided by the PaymentSheetGooglePayPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String merchantCountryCode, String? currencyCode, bool testEnv, String? label, String? amount, PlatformButtonType? buttonType)?) → TResult? -
Available on PaymentSheetGooglePay, provided by the PaymentSheetGooglePayPatterns extension
A variant ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
platformButtonTypeToJson(
PlatformButtonType? type) → int?