refactor: Move implies into moxlib
This commit is contained in:
parent
169457c9c9
commit
fc69261029
@ -35,6 +35,7 @@ import "package:get_it/get_it.dart";
|
|||||||
import "package:connectivity_plus/connectivity_plus.dart";
|
import "package:connectivity_plus/connectivity_plus.dart";
|
||||||
import "package:flutter_secure_storage/flutter_secure_storage.dart";
|
import "package:flutter_secure_storage/flutter_secure_storage.dart";
|
||||||
import "package:moxplatform/moxplatform.dart";
|
import "package:moxplatform/moxplatform.dart";
|
||||||
|
import "package:moxlib/moxlib.dart";
|
||||||
|
|
||||||
import "package:logging/logging.dart";
|
import "package:logging/logging.dart";
|
||||||
import "package:permission_handler/permission_handler.dart";
|
import "package:permission_handler/permission_handler.dart";
|
||||||
|
@ -134,11 +134,6 @@ T? firstNotNull<T>(List<T?> items) {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The mathematical a -> b
|
|
||||||
bool implies(bool a, bool b) {
|
|
||||||
return !a || b;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Attempt to guess a mimetype from its file extension
|
/// Attempt to guess a mimetype from its file extension
|
||||||
String? guessMimeTypeFromExtension(String ext) {
|
String? guessMimeTypeFromExtension(String ext) {
|
||||||
switch (ext) {
|
switch (ext) {
|
||||||
|
@ -668,28 +668,28 @@ packages:
|
|||||||
name: moxlib
|
name: moxlib
|
||||||
url: "https://pub.polynom.me"
|
url: "https://pub.polynom.me"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.1"
|
version: "0.1.3"
|
||||||
moxplatform:
|
moxplatform:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: moxplatform
|
name: moxplatform
|
||||||
url: "https://pub.polynom.me"
|
url: "https://pub.polynom.me"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.4"
|
version: "0.1.6"
|
||||||
moxplatform_android:
|
moxplatform_android:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: moxplatform_android
|
name: moxplatform_android
|
||||||
url: "https://pub.polynom.me"
|
url: "https://pub.polynom.me"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.4"
|
version: "0.1.6"
|
||||||
moxplatform_platform_interface:
|
moxplatform_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: moxplatform_platform_interface
|
name: moxplatform_platform_interface
|
||||||
url: "https://pub.polynom.me"
|
url: "https://pub.polynom.me"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.4"
|
version: "0.1.6"
|
||||||
moxxyv2_builders:
|
moxxyv2_builders:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -80,10 +80,10 @@ dependencies:
|
|||||||
version: 0.1.0
|
version: 0.1.0
|
||||||
moxlib:
|
moxlib:
|
||||||
hosted: https://pub.polynom.me
|
hosted: https://pub.polynom.me
|
||||||
version: 0.1.1
|
version: 0.1.3
|
||||||
moxplatform:
|
moxplatform:
|
||||||
hosted: https://pub.polynom.me
|
hosted: https://pub.polynom.me
|
||||||
version: 0.1.4
|
version: 0.1.6
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
#flutter_test:
|
#flutter_test:
|
||||||
|
@ -211,13 +211,4 @@ void main() {
|
|||||||
expect(firstNotNull([null, null, 2]), 2);
|
expect(firstNotNull([null, null, 2]), 2);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
group("implies", () {
|
|
||||||
test("Truth table test", () {
|
|
||||||
expect(implies(true, true), true);
|
|
||||||
expect(implies(true, false), false);
|
|
||||||
expect(implies(false, true), true);
|
|
||||||
expect(implies(false, false), true);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user