copyWith method

TonWalletState copyWith({
  1. String? address,
  2. String? publicKey,
  3. int? gramAmount,
  4. bool? isBeingCreated,
  5. bool? isBackupEnabled,
  6. bool? canEnableBackup,
  7. bool? canExportPhrase,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

TonWalletState copyWith({
  String? address,
  String? publicKey,
  int? gramAmount,
  bool? isBeingCreated,
  bool? isBackupEnabled,
  bool? canEnableBackup,
  bool? canExportPhrase,
}) => TonWalletState(
  address: address ?? this.address,
  publicKey: publicKey ?? this.publicKey,
  gramAmount: gramAmount ?? this.gramAmount,
  isBeingCreated: isBeingCreated ?? this.isBeingCreated,
  isBackupEnabled: isBackupEnabled ?? this.isBackupEnabled,
  canEnableBackup: canEnableBackup ?? this.canEnableBackup,
  canExportPhrase: canExportPhrase ?? this.canExportPhrase,
);