Some checks failed
ci/woodpecker/push/bff Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/chain_gateway Pipeline was successful
ci/woodpecker/push/fx_ingestor Pipeline was successful
ci/woodpecker/push/frontend Pipeline was successful
ci/woodpecker/push/fx_oracle Pipeline was successful
ci/woodpecker/push/nats Pipeline was successful
ci/woodpecker/push/ledger Pipeline was successful
ci/woodpecker/push/notification Pipeline was successful
ci/woodpecker/push/payments_orchestrator Pipeline was successful
ci/woodpecker/push/bump_version Pipeline failed
39 lines
902 B
Dart
39 lines
902 B
Dart
import 'package:flutter/foundation.dart';
|
|
|
|
|
|
abstract class Describable {
|
|
String get name;
|
|
String? get description;
|
|
}
|
|
|
|
@immutable
|
|
class _DescribableImp implements Describable {
|
|
@override
|
|
final String name;
|
|
@override
|
|
final String? description;
|
|
|
|
const _DescribableImp({
|
|
required this.name,
|
|
required this.description,
|
|
});
|
|
}
|
|
|
|
Describable newDescribable({required String name, String? description}) =>
|
|
_DescribableImp(name: name, description: description);
|
|
|
|
|
|
extension DescribableCopier on Describable {
|
|
Describable copyWith({
|
|
String? name,
|
|
String? Function()? description,
|
|
}) => newDescribable(
|
|
name: name ?? this.name,
|
|
description: description != null ? description() : this.description,
|
|
);
|
|
}
|
|
|
|
Describable describableCopyWithOther(Describable current, Describable? other) => current.copyWith(
|
|
name: other?.name,
|
|
description: () => other?.description,
|
|
); |