diff --git a/.gitignore b/.gitignore
index 01301aa..b537a1a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,9 +31,10 @@ migrate_working_dir/
.pub-cache/
.pub/
/build/
-
-# Web related
-lib/generated_plugin_registrant.dart
+generated_plugin_registrant.cc
+generated_plugin_registrant.h
+generated_plugins.cmake
+GeneratedPluginRegistrant.swift
# Symbolication related
app.*.symbols
@@ -46,4 +47,4 @@ app.*.map.json
/android/app/profile
/android/app/release
-constants.dart
\ No newline at end of file
+constants.dart
diff --git a/README.md b/README.md
index d68e46f..0164cab 100644
--- a/README.md
+++ b/README.md
@@ -16,12 +16,13 @@ Note: If you setup Appwrite on your local machine, you will need to create a pub
We need to make a few configuration changes to your Appwrite server.
-1. Add a new Flutter App (Android or iOS or both) in Appwrite:
+1. Add a new Flutter App in Appwrite:

1. Android - `io.appwrite.demo_todo_with_flutter`
2. iOS/Mac OS - `io.appwrite.demoTodoWithFlutter`
+ 3. Linux - `demo_todo_with_flutter`
2. Create a project in the Appwrite Console with id `demo-todos`.
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 7fba2ae..ddc8990 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -31,4 +31,5 @@
android:name="flutterEmbedding"
android:value="2" />
+
diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist
index 8d4492f..9625e10 100644
--- a/ios/Flutter/AppFrameworkInfo.plist
+++ b/ios/Flutter/AppFrameworkInfo.plist
@@ -21,6 +21,6 @@
CFBundleVersion
1.0
MinimumOSVersion
- 9.0
+ 11.0
diff --git a/ios/Podfile b/ios/Podfile
index 1e8c3c9..88359b2 100644
--- a/ios/Podfile
+++ b/ios/Podfile
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
-# platform :ios, '9.0'
+# platform :ios, '11.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index 3249311..3c01f72 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -1,25 +1,45 @@
PODS:
+ - connectivity_plus (0.0.1):
+ - Flutter
+ - ReachabilitySwift
- device_info_plus (0.0.1):
- Flutter
- Flutter (1.0.0)
- flutter_web_auth_2 (1.1.1):
- Flutter
+ - FMDB (2.7.5):
+ - FMDB/standard (= 2.7.5)
+ - FMDB/standard (2.7.5)
- package_info_plus (0.4.5):
- Flutter
- - path_provider_ios (0.0.1):
+ - path_provider_foundation (0.0.1):
+ - Flutter
+ - FlutterMacOS
+ - ReachabilitySwift (5.0.0)
+ - sqflite (0.0.2):
- Flutter
+ - FMDB (>= 2.7.5)
- url_launcher_ios (0.0.1):
- Flutter
DEPENDENCIES:
+ - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- Flutter (from `Flutter`)
- flutter_web_auth_2 (from `.symlinks/plugins/flutter_web_auth_2/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
+ - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`)
+ - sqflite (from `.symlinks/plugins/sqflite/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
+SPEC REPOS:
+ trunk:
+ - FMDB
+ - ReachabilitySwift
+
EXTERNAL SOURCES:
+ connectivity_plus:
+ :path: ".symlinks/plugins/connectivity_plus/ios"
device_info_plus:
:path: ".symlinks/plugins/device_info_plus/ios"
Flutter:
@@ -28,19 +48,25 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_web_auth_2/ios"
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
- path_provider_ios:
- :path: ".symlinks/plugins/path_provider_ios/ios"
+ path_provider_foundation:
+ :path: ".symlinks/plugins/path_provider_foundation/ios"
+ sqflite:
+ :path: ".symlinks/plugins/sqflite/ios"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
SPEC CHECKSUMS:
+ connectivity_plus: 413a8857dd5d9f1c399a39130850d02fe0feaf7e
device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
- Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
+ Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_web_auth_2: a1bc00762c408a8f80b72a538cd7ff5b601c3e71
+ FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
- path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
+ path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9
+ ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
+ sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de
-PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
+PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
COCOAPODS: 1.11.3
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 6a5c858..7ccbf64 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -340,7 +340,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -417,7 +417,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -466,7 +466,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
diff --git a/lib/entities/todo.dart b/lib/entities/todo.dart
index 51256fb..9f25000 100644
--- a/lib/entities/todo.dart
+++ b/lib/entities/todo.dart
@@ -23,7 +23,7 @@ class Todo {
factory Todo.fromMap(Map json) => Todo(
content: json["content"],
- isComplete: json["isComplete"],
+ isComplete: json["isComplete"] ?? false,
id: json["\u0024id"],
createdAt: DateTime.parse(json["\u0024createdAt"]),
updatedAt: DateTime.parse(json["\u0024updatedAt"]),
diff --git a/lib/routes/landing.dart b/lib/routes/landing.dart
index 0671308..a2a6734 100644
--- a/lib/routes/landing.dart
+++ b/lib/routes/landing.dart
@@ -1,8 +1,13 @@
+import 'package:appwrite/appwrite.dart';
+import 'package:demo_todo_with_flutter/utilities.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
+import '../services/appwrite.dart';
+import '../services/auth.dart';
import '../widgets/animated_icon_button.dart';
import 'auth.dart';
+import 'todos.dart';
class Landing extends StatelessWidget {
const Landing({Key? key}) : super(key: key);
@@ -92,10 +97,25 @@ class Landing extends StatelessWidget {
),
const SizedBox(height: spacing),
ElevatedButton(
- onPressed: () {
- Navigator.push(
- context,
- MaterialPageRoute(builder: (context) => const Auth()),
+ onPressed: () async {
+ final navigator = Navigator.of(context);
+ final messenger = ScaffoldMessenger.of(context);
+ await Appwrite.instance.initialize();
+ final authService = AuthService();
+ Widget nextRoute = const Auth();
+
+ try {
+ await authService.getUser();
+ nextRoute = const Todos();
+ } on AppwriteException catch (e) {
+ if (e.code == 0) {
+ messenger.showSnackBar(createErrorSnackBar(e.message));
+ return;
+ }
+ }
+
+ navigator.push(
+ MaterialPageRoute(builder: (context) => nextRoute),
);
},
child: const Text('Get Started'),
diff --git a/lib/routes/todos.dart b/lib/routes/todos.dart
index 238f8f9..786d941 100644
--- a/lib/routes/todos.dart
+++ b/lib/routes/todos.dart
@@ -1,3 +1,4 @@
+import 'package:appwrite/appwrite.dart';
import 'package:demo_todo_with_flutter/utilities.dart';
import 'package:flutter/material.dart';
@@ -48,19 +49,19 @@ class _TodosState extends State {
void submitTodo() async {
if (inputController.text.isEmpty || isLoading) return;
final messenger = ScaffoldMessenger.of(context);
- try {
- final newTodo = await todosService.create(content: inputController.text);
- inputController.text = '';
- setState(() {
- todos.add(newTodo);
- });
- } catch (e) {
+ final newTodo = Todo(
+ content: inputController.text,
+ id: ID.unique(),
+ );
+ todosService.create(todo: newTodo).catchError((e) {
messenger.showSnackBar(createErrorSnackBar(e.toString()));
- } finally {
- setState(() {
- isLoading = false;
- });
- }
+ todos.remove(newTodo);
+ });
+ inputController.text = '';
+ setState(() {
+ todos.add(newTodo);
+ isLoading = false;
+ });
}
@override
@@ -161,43 +162,40 @@ class _TodosState extends State {
});
final messenger = ScaffoldMessenger.of(context);
todos[index].isComplete = !todos[index].isComplete;
- try {
- final updated =
- await todosService.update(todo: todos[index]);
- setState(() {
- todos[index] = updated;
- });
- } catch (e) {
- // restore value
- todos[index].isComplete = !todos[index].isComplete;
- messenger.showSnackBar(
- createErrorSnackBar(e.toString()));
- } finally {
- setState(() {
- isLoading = false;
- });
- }
+ todosService.update(todo: todos[index]).catchError(
+ (e) {
+ // restore value
+ setState(() {
+ todos[index].isComplete =
+ !todos[index].isComplete;
+ });
+ messenger.showSnackBar(
+ createErrorSnackBar(e.toString()));
+ },
+ );
+
+ setState(() {
+ isLoading = false;
+ });
},
delete: () async {
setState(() {
isLoading = true;
});
final messenger = ScaffoldMessenger.of(context);
- try {
- await todosService.delete(id: todos[index].id);
+ final todo = todos[index];
+ todosService.delete(id: todo.id).catchError((e) {
+ // restore value
setState(() {
- todos.removeAt(index);
+ todos.insert(index, todo);
});
- } catch (e) {
- // restore value
- todos[index].isComplete = !todos[index].isComplete;
messenger.showSnackBar(
createErrorSnackBar(e.toString()));
- } finally {
- setState(() {
- isLoading = false;
- });
- }
+ });
+ setState(() {
+ todos.removeAt(index);
+ isLoading = false;
+ });
},
);
},
diff --git a/lib/services/appwrite.dart b/lib/services/appwrite.dart
index 8abe5fb..b286238 100644
--- a/lib/services/appwrite.dart
+++ b/lib/services/appwrite.dart
@@ -11,10 +11,20 @@ class Appwrite {
return instance;
}
+ Future initialize() {
+ return client.setOfflinePersistency(
+ status: true,
+ onWriteQueueError: (e) {
+ print(e);
+ },
+ );
+ }
+
Appwrite._internal() {
client = Client()
.setEndpoint(constants.appwriteEndpoint)
.setProject(constants.appwriteProjectId)
- .setSelfSigned(status: constants.appwriteSelfSigned);
+ .setSelfSigned(status: constants.appwriteSelfSigned)
+ .setOfflineCacheSize(2500);
}
}
diff --git a/lib/services/auth.dart b/lib/services/auth.dart
index b287819..1fd63e5 100644
--- a/lib/services/auth.dart
+++ b/lib/services/auth.dart
@@ -29,4 +29,8 @@ class AuthService {
Future logout() {
return _account.deleteSession(sessionId: 'current');
}
+
+ Future getUser() async {
+ return _account.get();
+ }
}
diff --git a/lib/services/todos.dart b/lib/services/todos.dart
index 3d92f54..9cc7318 100644
--- a/lib/services/todos.dart
+++ b/lib/services/todos.dart
@@ -15,12 +15,12 @@ class TodosService {
return documentList.documents.map((d) => Todo.fromMap(d.data)).toList();
}
- Future create({required String content}) async {
+ Future create({required Todo todo}) async {
final document = await _databases.createDocument(
databaseId: constants.appwriteDatabaseId,
collectionId: constants.appwriteCollectionId,
- documentId: ID.unique(),
- data: {"content": content},
+ documentId: todo.id,
+ data: {"content": todo.content, "isComplete": todo.isComplete},
);
return Todo.fromMap(document.data);
diff --git a/lib/widgets/todo_list_tile.dart b/lib/widgets/todo_list_tile.dart
index 54c2327..8450f9d 100644
--- a/lib/widgets/todo_list_tile.dart
+++ b/lib/widgets/todo_list_tile.dart
@@ -44,6 +44,7 @@ class TodoListTile extends StatelessWidget {
: TextDecoration.none,
),
),
+ subtitle: Text(todo.id),
);
}
}
diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc
deleted file mode 100644
index f6f23bf..0000000
--- a/linux/flutter/generated_plugin_registrant.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-//
-// Generated file. Do not edit.
-//
-
-// clang-format off
-
-#include "generated_plugin_registrant.h"
-
-#include
-
-void fl_register_plugins(FlPluginRegistry* registry) {
- g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
- fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
- url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
-}
diff --git a/linux/flutter/generated_plugin_registrant.h b/linux/flutter/generated_plugin_registrant.h
deleted file mode 100644
index e0f0a47..0000000
--- a/linux/flutter/generated_plugin_registrant.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//
-// Generated file. Do not edit.
-//
-
-// clang-format off
-
-#ifndef GENERATED_PLUGIN_REGISTRANT_
-#define GENERATED_PLUGIN_REGISTRANT_
-
-#include
-
-// Registers Flutter plugins.
-void fl_register_plugins(FlPluginRegistry* registry);
-
-#endif // GENERATED_PLUGIN_REGISTRANT_
diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake
deleted file mode 100644
index f16b4c3..0000000
--- a/linux/flutter/generated_plugins.cmake
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Generated file, do not edit.
-#
-
-list(APPEND FLUTTER_PLUGIN_LIST
- url_launcher_linux
-)
-
-list(APPEND FLUTTER_FFI_PLUGIN_LIST
-)
-
-set(PLUGIN_BUNDLED_LIBRARIES)
-
-foreach(plugin ${FLUTTER_PLUGIN_LIST})
- add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})
- target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
- list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
- list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
-endforeach(plugin)
-
-foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
- add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
- list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
-endforeach(ffi_plugin)
diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift
deleted file mode 100644
index 2c0574e..0000000
--- a/macos/Flutter/GeneratedPluginRegistrant.swift
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// Generated file. Do not edit.
-//
-
-import FlutterMacOS
-import Foundation
-
-import device_info_plus_macos
-import flutter_web_auth_2
-import package_info_plus_macos
-import path_provider_macos
-import url_launcher_macos
-
-func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
- DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
- FlutterWebAuth2Plugin.register(with: registry.registrar(forPlugin: "FlutterWebAuth2Plugin"))
- FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin"))
- PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
- UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
-}
diff --git a/macos/Podfile.lock b/macos/Podfile.lock
index dcab953..e87660e 100644
--- a/macos/Podfile.lock
+++ b/macos/Podfile.lock
@@ -1,44 +1,70 @@
PODS:
- - device_info_plus_macos (0.0.1):
+ - connectivity_plus_macos (0.0.1):
+ - FlutterMacOS
+ - ReachabilitySwift
+ - device_info_plus (0.0.1):
- FlutterMacOS
- flutter_web_auth_2 (1.1.1):
- FlutterMacOS
- FlutterMacOS (1.0.0)
- - package_info_plus_macos (0.0.1):
+ - FMDB (2.7.5):
+ - FMDB/standard (= 2.7.5)
+ - FMDB/standard (2.7.5)
+ - package_info_plus (0.0.1):
+ - FlutterMacOS
+ - path_provider_foundation (0.0.1):
+ - Flutter
- FlutterMacOS
- - path_provider_macos (0.0.1):
+ - ReachabilitySwift (5.0.0)
+ - sqflite (0.0.2):
- FlutterMacOS
+ - FMDB (>= 2.7.5)
- url_launcher_macos (0.0.1):
- FlutterMacOS
DEPENDENCIES:
- - device_info_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus_macos/macos`)
+ - connectivity_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/connectivity_plus_macos/macos`)
+ - device_info_plus (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos`)
- flutter_web_auth_2 (from `Flutter/ephemeral/.symlinks/plugins/flutter_web_auth_2/macos`)
- FlutterMacOS (from `Flutter/ephemeral`)
- - package_info_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus_macos/macos`)
- - path_provider_macos (from `Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos`)
+ - package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
+ - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/macos`)
+ - sqflite (from `Flutter/ephemeral/.symlinks/plugins/sqflite/macos`)
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
+SPEC REPOS:
+ trunk:
+ - FMDB
+ - ReachabilitySwift
+
EXTERNAL SOURCES:
- device_info_plus_macos:
- :path: Flutter/ephemeral/.symlinks/plugins/device_info_plus_macos/macos
+ connectivity_plus_macos:
+ :path: Flutter/ephemeral/.symlinks/plugins/connectivity_plus_macos/macos
+ device_info_plus:
+ :path: Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos
flutter_web_auth_2:
:path: Flutter/ephemeral/.symlinks/plugins/flutter_web_auth_2/macos
FlutterMacOS:
:path: Flutter/ephemeral
- package_info_plus_macos:
- :path: Flutter/ephemeral/.symlinks/plugins/package_info_plus_macos/macos
- path_provider_macos:
- :path: Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos
+ package_info_plus:
+ :path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos
+ path_provider_foundation:
+ :path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/macos
+ sqflite:
+ :path: Flutter/ephemeral/.symlinks/plugins/sqflite/macos
url_launcher_macos:
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
SPEC CHECKSUMS:
- device_info_plus_macos: 1ad388a1ef433505c4038e7dd9605aadd1e2e9c7
+ connectivity_plus_macos: f6e86fd000e971d361e54b5afcadc8c8fa773308
+ device_info_plus: 5401765fde0b8d062a2f8eb65510fb17e77cf07f
flutter_web_auth_2: 6695649132b6c71ea17700703761c0d18fdb8cf6
- FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424
- package_info_plus_macos: f010621b07802a241d96d01876d6705f15e77c1c
- path_provider_macos: 3c0c3b4b0d4a76d2bf989a913c2de869c5641a19
+ FlutterMacOS: ae6af50a8ea7d6103d888583d46bd8328a7e9811
+ FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
+ package_info_plus: 02d7a575e80f194102bef286361c6c326e4c29ce
+ path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9
+ ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
+ sqflite: a5789cceda41d54d23f31d6de539d65bb14100ea
url_launcher_macos: 597e05b8e514239626bcf4a850fcf9ef5c856ec3
PODFILE CHECKSUM: 0d3963a09fc94f580682bd88480486da345dc3f0
diff --git a/pubspec.lock b/pubspec.lock
index 6f611f7..58a70a8 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -4,17 +4,26 @@ packages:
appwrite:
dependency: "direct main"
description:
- name: appwrite
+ path: "."
+ ref: feat-offline-support-refactor
+ resolved-ref: "3f51b3e9ba1f6f3c046dd0f767487cb246a43170"
+ url: "https://github.com/appwrite/sdk-for-flutter"
+ source: git
+ version: "9.0.0"
+ args:
+ dependency: transitive
+ description:
+ name: args
url: "https://pub.dartlang.org"
source: hosted
- version: "8.1.0"
+ version: "2.4.0"
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
- version: "2.8.2"
+ version: "2.9.0"
boolean_selector:
dependency: transitive
description:
@@ -28,7 +37,7 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
- version: "1.2.0"
+ version: "1.2.1"
charcode:
dependency: transitive
description:
@@ -42,7 +51,7 @@ packages:
name: clock
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.0"
+ version: "1.1.1"
collection:
dependency: transitive
description:
@@ -50,76 +59,104 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.16.0"
- cookie_jar:
+ connectivity_plus:
dependency: transitive
description:
- name: cookie_jar
+ name: connectivity_plus
url: "https://pub.dartlang.org"
source: hosted
- version: "3.0.1"
- crypto:
+ version: "2.3.9"
+ connectivity_plus_linux:
dependency: transitive
description:
- name: crypto
+ name: connectivity_plus_linux
url: "https://pub.dartlang.org"
source: hosted
- version: "3.0.2"
- cupertino_icons:
- dependency: "direct main"
+ version: "1.3.1"
+ connectivity_plus_macos:
+ dependency: transitive
description:
- name: cupertino_icons
+ name: connectivity_plus_macos
url: "https://pub.dartlang.org"
source: hosted
- version: "1.0.5"
- device_info_plus:
+ version: "1.2.6"
+ connectivity_plus_platform_interface:
dependency: transitive
description:
- name: device_info_plus
+ name: connectivity_plus_platform_interface
url: "https://pub.dartlang.org"
source: hosted
- version: "4.1.3"
- device_info_plus_linux:
+ version: "1.2.4"
+ connectivity_plus_web:
dependency: transitive
description:
- name: device_info_plus_linux
+ name: connectivity_plus_web
url: "https://pub.dartlang.org"
source: hosted
- version: "3.0.0"
- device_info_plus_macos:
+ version: "1.2.5"
+ connectivity_plus_windows:
dependency: transitive
description:
- name: device_info_plus_macos
+ name: connectivity_plus_windows
url: "https://pub.dartlang.org"
source: hosted
- version: "3.0.0"
- device_info_plus_platform_interface:
+ version: "1.2.2"
+ cookie_jar:
dependency: transitive
description:
- name: device_info_plus_platform_interface
+ name: cookie_jar
url: "https://pub.dartlang.org"
source: hosted
- version: "3.0.0"
- device_info_plus_web:
+ version: "3.0.1"
+ crypto:
dependency: transitive
description:
- name: device_info_plus_web
+ name: crypto
url: "https://pub.dartlang.org"
source: hosted
- version: "3.0.0"
- device_info_plus_windows:
+ version: "3.0.2"
+ csslib:
dependency: transitive
description:
- name: device_info_plus_windows
+ name: csslib
url: "https://pub.dartlang.org"
source: hosted
- version: "4.1.0"
+ version: "0.17.2"
+ cupertino_icons:
+ dependency: "direct main"
+ description:
+ name: cupertino_icons
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "1.0.5"
+ dbus:
+ dependency: transitive
+ description:
+ name: dbus
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "0.7.8"
+ device_info_plus:
+ dependency: transitive
+ description:
+ name: device_info_plus
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "8.1.0"
+ device_info_plus_platform_interface:
+ dependency: transitive
+ description:
+ name: device_info_plus_platform_interface
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "7.0.0"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
- version: "1.3.0"
+ version: "1.3.1"
ffi:
dependency: transitive
description:
@@ -164,26 +201,26 @@ packages:
name: flutter_web_auth_2
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.2"
+ version: "2.0.4"
flutter_web_auth_2_platform_interface:
dependency: transitive
description:
name: flutter_web_auth_2_platform_interface
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.2"
- flutter_web_auth_2_windows:
- dependency: transitive
- description:
- name: flutter_web_auth_2_windows
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.1.2"
+ version: "2.0.1"
flutter_web_plugins:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
+ html:
+ dependency: transitive
+ description:
+ name: html
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "0.15.1"
http:
dependency: transitive
description:
@@ -198,6 +235,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.2"
+ idb_shim:
+ dependency: transitive
+ description:
+ name: idb_shim
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "2.3.0+1"
js:
dependency: transitive
description:
@@ -218,70 +262,49 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
- version: "0.12.11"
+ version: "0.12.12"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
- version: "0.1.4"
+ version: "0.1.5"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
- version: "1.7.0"
- package_info_plus:
+ version: "1.8.0"
+ nm:
dependency: transitive
description:
- name: package_info_plus
+ name: nm
url: "https://pub.dartlang.org"
source: hosted
- version: "1.4.3+1"
- package_info_plus_linux:
- dependency: transitive
- description:
- name: package_info_plus_linux
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.0.5"
- package_info_plus_macos:
+ version: "0.5.0"
+ package_info_plus:
dependency: transitive
description:
- name: package_info_plus_macos
+ name: package_info_plus
url: "https://pub.dartlang.org"
source: hosted
- version: "1.3.0"
+ version: "3.0.3"
package_info_plus_platform_interface:
dependency: transitive
description:
name: package_info_plus_platform_interface
url: "https://pub.dartlang.org"
source: hosted
- version: "1.0.2"
- package_info_plus_web:
- dependency: transitive
- description:
- name: package_info_plus_web
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.0.6"
- package_info_plus_windows:
- dependency: transitive
- description:
- name: package_info_plus_windows
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.1.0"
+ version: "2.0.1"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
- version: "1.8.1"
+ version: "1.8.2"
path_drawing:
dependency: transitive
description:
@@ -302,7 +325,7 @@ packages:
name: path_provider
url: "https://pub.dartlang.org"
source: hosted
- version: "2.0.11"
+ version: "2.0.13"
path_provider_android:
dependency: transitive
description:
@@ -310,13 +333,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.22"
- path_provider_ios:
+ path_provider_foundation:
dependency: transitive
description:
- name: path_provider_ios
+ name: path_provider_foundation
url: "https://pub.dartlang.org"
source: hosted
- version: "2.0.11"
+ version: "2.1.3"
path_provider_linux:
dependency: transitive
description:
@@ -324,13 +347,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.7"
- path_provider_macos:
- dependency: transitive
- description:
- name: path_provider_macos
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.0.6"
path_provider_platform_interface:
dependency: transitive
description:
@@ -373,6 +389,27 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "4.2.4"
+ sembast:
+ dependency: transitive
+ description:
+ name: sembast
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "3.4.1+1"
+ sembast_sqflite:
+ dependency: transitive
+ description:
+ name: sembast_sqflite
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "2.1.0+1"
+ sembast_web:
+ dependency: transitive
+ description:
+ name: sembast_web
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "2.1.0+4"
sky_engine:
dependency: transitive
description: flutter
@@ -384,7 +421,35 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
- version: "1.8.2"
+ version: "1.9.0"
+ sqflite:
+ dependency: transitive
+ description:
+ name: sqflite
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "2.2.6"
+ sqflite_common:
+ dependency: transitive
+ description:
+ name: sqflite_common
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "2.4.3"
+ sqflite_common_ffi:
+ dependency: transitive
+ description:
+ name: sqflite_common_ffi
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "2.2.2"
+ sqlite3:
+ dependency: transitive
+ description:
+ name: sqlite3
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "1.9.3"
stack_trace:
dependency: transitive
description:
@@ -405,21 +470,28 @@ packages:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.0"
+ version: "1.1.1"
+ synchronized:
+ dependency: transitive
+ description:
+ name: synchronized
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "3.0.1"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
- version: "1.2.0"
+ version: "1.2.1"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
- version: "0.4.9"
+ version: "0.4.12"
typed_data:
dependency: transitive
description:
@@ -427,6 +499,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
+ universal_html:
+ dependency: transitive
+ description:
+ name: universal_html
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "2.2.1"
+ universal_io:
+ dependency: transitive
+ description:
+ name: universal_io
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "2.2.0"
url_launcher:
dependency: "direct main"
description:
@@ -496,7 +582,7 @@ packages:
name: web_socket_channel
url: "https://pub.dartlang.org"
source: hosted
- version: "2.2.0"
+ version: "2.3.0"
win32:
dependency: transitive
description:
@@ -519,5 +605,5 @@ packages:
source: hosted
version: "6.1.0"
sdks:
- dart: ">=2.17.6 <3.0.0"
- flutter: ">=3.0.0"
+ dart: ">=2.18.0 <3.0.0"
+ flutter: ">=3.3.0"
diff --git a/pubspec.yaml b/pubspec.yaml
index 4a52bb6..80908de 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -31,12 +31,18 @@ dependencies:
sdk: flutter
flutter_svg: ^1.1.6
url_launcher: ^6.1.7
- appwrite: ^8.1.0
+ appwrite: ^8.2.1
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
+dependency_overrides:
+ appwrite:
+ git:
+ url: https://github.com/appwrite/sdk-for-flutter
+ ref: feat-offline-support-refactor
+
dev_dependencies:
flutter_test:
sdk: flutter
diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc
deleted file mode 100644
index 4f78848..0000000
--- a/windows/flutter/generated_plugin_registrant.cc
+++ /dev/null
@@ -1,14 +0,0 @@
-//
-// Generated file. Do not edit.
-//
-
-// clang-format off
-
-#include "generated_plugin_registrant.h"
-
-#include
-
-void RegisterPlugins(flutter::PluginRegistry* registry) {
- UrlLauncherWindowsRegisterWithRegistrar(
- registry->GetRegistrarForPlugin("UrlLauncherWindows"));
-}
diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake
deleted file mode 100644
index 88b22e5..0000000
--- a/windows/flutter/generated_plugins.cmake
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Generated file, do not edit.
-#
-
-list(APPEND FLUTTER_PLUGIN_LIST
- url_launcher_windows
-)
-
-list(APPEND FLUTTER_FFI_PLUGIN_LIST
-)
-
-set(PLUGIN_BUNDLED_LIBRARIES)
-
-foreach(plugin ${FLUTTER_PLUGIN_LIST})
- add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin})
- target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
- list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
- list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
-endforeach(plugin)
-
-foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
- add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
- list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
-endforeach(ffi_plugin)