diff --git a/android/.project b/android/.project
new file mode 100644
index 0000000..3964dd3
--- /dev/null
+++ b/android/.project
@@ -0,0 +1,17 @@
+
+
+ android
+ Project android created by Buildship.
+
+
+
+
+ org.eclipse.buildship.core.gradleprojectbuilder
+
+
+
+
+
+ org.eclipse.buildship.core.gradleprojectnature
+
+
diff --git a/android/.settings/org.eclipse.buildship.core.prefs b/android/.settings/org.eclipse.buildship.core.prefs
new file mode 100644
index 0000000..e889521
--- /dev/null
+++ b/android/.settings/org.eclipse.buildship.core.prefs
@@ -0,0 +1,2 @@
+connection.project.dir=
+eclipse.preferences.version=1
diff --git a/android/app/.classpath b/android/app/.classpath
new file mode 100644
index 0000000..4a04201
--- /dev/null
+++ b/android/app/.classpath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/android/app/.project b/android/app/.project
new file mode 100644
index 0000000..ac485d7
--- /dev/null
+++ b/android/app/.project
@@ -0,0 +1,23 @@
+
+
+ app
+ Project app created by Buildship.
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.buildship.core.gradleprojectbuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+ org.eclipse.buildship.core.gradleprojectnature
+
+
diff --git a/android/app/.settings/org.eclipse.buildship.core.prefs b/android/app/.settings/org.eclipse.buildship.core.prefs
new file mode 100644
index 0000000..b1886ad
--- /dev/null
+++ b/android/app/.settings/org.eclipse.buildship.core.prefs
@@ -0,0 +1,2 @@
+connection.project.dir=..
+eclipse.preferences.version=1
diff --git a/android/app/src/main/java/consulting/mabby/domore/MainActivity.java b/android/app/src/main/java/consulting/mabby/domore/MainActivity.java
new file mode 100644
index 0000000..13a2235
--- /dev/null
+++ b/android/app/src/main/java/consulting/mabby/domore/MainActivity.java
@@ -0,0 +1,13 @@
+package consulting.mabby.domore;
+
+import android.os.Bundle;
+import io.flutter.app.FlutterActivity;
+import io.flutter.plugins.GeneratedPluginRegistrant;
+
+public class MainActivity extends FlutterActivity {
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ GeneratedPluginRegistrant.registerWith(this);
+ }
+}
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index b437002..5780b7c 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -9,8 +9,7 @@
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
- 333E5D9D221F3E770064DFCF /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 333E5D9C221F3E770064DFCF /* GoogleService-Info.plist */; };
- 3383B9A7221F58CE0006D238 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3383B9A6221F58CE0006D238 /* GoogleService-Info.plist */; };
+ 333667AF222371A60086B018 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 333667AE222371A60086B018 /* GoogleService-Info.plist */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
@@ -44,8 +43,7 @@
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; };
- 333E5D9C221F3E770064DFCF /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "../../GoogleService-Info.plist"; sourceTree = ""; };
- 3383B9A6221F58CE0006D238 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; };
+ 333667AE222371A60086B018 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
4FBB470E4E7597A7A2ECCB3B /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -114,13 +112,12 @@
isa = PBXGroup;
children = (
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
- 333E5D9C221F3E770064DFCF /* GoogleService-Info.plist */,
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
+ 333667AE222371A60086B018 /* GoogleService-Info.plist */,
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
97C147021CF9000F007C117D /* Info.plist */,
- 3383B9A6221F58CE0006D238 /* GoogleService-Info.plist */,
97C146F11CF9000F007C117D /* Supporting Files */,
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
@@ -216,13 +213,12 @@
buildActionMask = 2147483647;
files = (
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
- 3383B9A7221F58CE0006D238 /* GoogleService-Info.plist in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
- 333E5D9D221F3E770064DFCF /* GoogleService-Info.plist in Resources */,
+ 333667AF222371A60086B018 /* GoogleService-Info.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/test/src/resources/firestore_provider_test.dart b/test/src/resources/firestore_provider_test.dart
index 3b56fdc..9122db5 100644
--- a/test/src/resources/firestore_provider_test.dart
+++ b/test/src/resources/firestore_provider_test.dart
@@ -53,7 +53,6 @@ main() {
final provider = FirestoreProvider(firestore);
when(firestore.collection('tasks')).thenReturn(collection);
-
provider.addTask(task);
verify(collection.add(task.toFirestoreMap()));
@@ -74,5 +73,20 @@ main() {
expectLater(provider.getTask('1'), emits(task));
});
+
+ test('should delete task from firestore', () {
+ final firestore = MockFirestore();
+ final collection = MockCollectionReference();
+ final document = MockDocumentReference();
+ final provider = FirestoreProvider(firestore);
+
+ when(firestore.collection('tasks')).thenReturn(collection);
+ when(collection.document(task.id)).thenReturn(document);
+ when(document.delete()).thenAnswer((_) => Future.value());
+
+ provider.deleteTask(task.id);
+
+ verify(document.delete());
+ });
});
}