mirror of
https://github.com/linagora/tmail-flutter.git
synced 2026-12-06 08:06:47 +00:00
11 lines
234 B
Dart
11 lines
234 B
Dart
import 'package:dartz/dartz.dart';
|
|
|
|
mixin OptionParamMixin {
|
|
T? getOptionParam<T>(Option<T?>? option, T? defaultValue) {
|
|
if (option != null) {
|
|
return option.toNullable();
|
|
} else {
|
|
return defaultValue;
|
|
}
|
|
}
|
|
} |