master #81

Closed
malo wants to merge 322 commits from master into feat/bloc_layout/new-package
2 changed files with 73 additions and 0 deletions
Showing only changes of commit 4acab9a662 - Show all commits

View File

@ -0,0 +1,22 @@
// Copyright (C) 2023 WYATT GROUP
// Please see the AUTHORS file for details.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
export 'date_time_extension.dart';
export 'encoding.dart';
export 'iterable_extension.dart';
export 'num_extension.dart';
export 'object_extension.dart';
export 'string_extension.dart';

View File

@ -0,0 +1,51 @@
// Copyright (C) 2023 WYATT GROUP
// Please see the AUTHORS file for details.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
extension NumExtension on num? {
bool operator <(num? other) {
if (this == null || other == null) {
return false;
}
return this < other;
}
bool operator >(num? other) {
if (this == null || other == null) {
return false;
}
return this > other;
}
bool operator <=(num? other) {
if (this == null && other == null) {
return true;
}
if (this == null || other == null) {
return false;
}
return this <= other;
}
bool operator >=(num? other) {
if (this == null && other == null) {
return true;
}
if (this == null || other == null) {
return false;
}
return this >= other;
}
}