Shared SQLite DB across mobile, web and desktop

Related tags

Data moor_shared
Overview

moor_shared

An example project to demonstrate how moor can be used on multiple platforms (Web, android, iOS, macOS, Windows and Linux).

Note: You need to install the Android NDK to run this app on Android devices. You can get the NDK in the SDK Manager of Android Studio.

  • Undo/Redo
  • Cross Platform

Getting Started

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

MacOS

iPad

Windows

Web

Comments
  • Migrate from moor_flutter to moor_ffi

    Migrate from moor_flutter to moor_ffi

    Hi, I've made some adoptions to use moor_ffi instead of moor_flutter on Android and iOS. As this switches moor to the develop branch which already contains breaking changes for the next major release, this PR is a bit bigger than it could have been. The relevant changes are all in mobile.dart to open the database.

    I tested this on Android and Linux, the database was working fine on both platforms. I did have some rendering issues on Linux, but I don't think that moor has anything to do with that. It should work on iOS and macOS as well, but I can't verify that until Monday.

    Rather unrelated question: Do you intend to keep this repository open? I would like to link it from the examples section in moor's documentation, if that's ok.

    enhancement 
    opened by simolus3 9
  • Error resolving plugin [id: 'de.undercouch.download', version: '4.0.0']

    Error resolving plugin [id: 'de.undercouch.download', version: '4.0.0']

    I all platfroms such as iOS, MacOS, Web, work well with this project, except android, when I try to run this project on Android device(actually emulator), it throw the following exception. Can you help why? Thanks.

    -----------Stack trace----------- Launching lib/main.dart on Android SDK built for x86 in debug mode... Running Gradle task 'assembleDebug'...

    FAILURE: Build failed with an exception.

    • Where: Build file '/Users/mac/development/flutter/.pub-cache/hosted/pub.dartlang.org/moor_ffi-0.2.0/android/build.gradle' line: 13

    • What went wrong: Error resolving plugin [id: 'de.undercouch.download', version: '4.0.0']

    Plugin request for plugin already on the classpath must not include a version

    • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    • Get more help at https://help.gradle.org

    BUILD FAILED in 1s Exception: Gradle task assembleDebug failed with exit code 1

    opened by jims57 6
  • Crash when trying moor_shared demo on my android device

    Crash when trying moor_shared demo on my android device

    When using on my physical Android device, it crashed as follows: image The device is using Android 7.1.2: image

    But, it work fine on the Android emulator running on the MacOS: image

    My question is whether moor requires the minimum version of Android to make it works? If yes, I hope to make it support as extent as possible when it comes to Android version, because our product will meet users with different background.

    Will Moor save the stack trace in a file on the device? If yes, please tell me where, so that I can send you it.

    Am I missing anything before I release the code to a physical device? Thanks.

    opened by jims57 5
  • Error: The non-abstract class 'TodoEntry' is missing implementations for these members

    Error: The non-abstract class 'TodoEntry' is missing implementations for these members

    It worked good before I upgrade moor and moor_ffi to the latest version. I think this is caused by the different APIs among these version. Can you update this project to support the latest version of moor and moor_ffi, since I'd like to upgrade these packages to up-to-date ones. Thanks.

    image

    Stack trace as follow:

    Launching lib/main.dart on iPad (7th generation) in debug mode... Running pod install... Running Xcode build... Xcode build done. 15.0s Failed to build iOS app Could not build the application for the simulator. Error launching application on iPad (7th generation). Error output from Xcode build: ↳ ** BUILD FAILED **

    Xcode's output: ↳ lib/data/database/database.g.dart:10:7: Error: The non-abstract class 'TodoEntry' is missing implementations for these members:

    • Insertable.toColumns Try to either
    • provide an implementation,
    • inherit an implementation from a superclass or mixin,
    • mark the class as abstract, or
    • provide a 'noSuchMethod' implementation.

    class TodoEntry extends DataClass implements Insertable { ^^^^^^^^^ ../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-3.1.0/lib/src/runtime/data_class.dart:22:27: Context: 'Insertable.toColumns' is defined here. Map<String, Expression> toColumns(bool nullToAbsent); ^^^^^^^^^ lib/data/database/database.g.dart:104:7: Error: The non-abstract class 'TodosCompanion' is missing implementations for these members:

    • Insertable.toColumns Try to either
    • provide an implementation,
    • inherit an implementation from a superclass or mixin,
    • mark the class as abstract, or
    • provide a 'noSuchMethod' implementation.

    class TodosCompanion extends UpdateCompanion { ^^^^^^^^^^^^^^ ../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-3.1.0/lib/src/runtime/data_class.dart:22:27: Context: 'Insertable.toColumns' is defined here. Map<String, Expression> toColumns(bool nullToAbsent); ^^^^^^^^^ lib/data/database/database.g.dart:252:7: Error: The non-abstract class 'Category' is missing implementations for these members:

    • Insertable.toColumns Try to either
    • provide an implementation,
    • inherit an implementation from a superclass or mixin,
    • mark the class as abstract, or
    • provide a 'noSuchMethod' implementation.

    class Category extends DataClass implements Insertable { ^^^^^^^^ ../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-3.1.0/lib/src/runtime/data_class.dart:22:27: Context: 'Insertable.toColumns' is defined here. Map<String, Expression> toColumns(bool nullToAbsent); ^^^^^^^^^ lib/data/database/database.g.dart:316:7: Error: The non-abstract class 'CategoriesCompanion' is missing implementations for these members:

    • Insertable.toColumns Try to either
    • provide an implementation,
    • inherit an implementation from a superclass or mixin,
    • mark the class as abstract, or
    • provide a 'noSuchMethod' implementation.

    class CategoriesCompanion extends UpdateCompanion { ^^^^^^^^^^^^^^^^^^^ ../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-3.1.0/lib/src/runtime/data_class.dart:22:27: Context: 'Insertable.toColumns' is defined here. Map<String, Expression> toColumns(bool nullToAbsent); ^^^^^^^^^ lib/data/database/database.g.dart:191:56: Error: The parameter 'd' of the method '$TodosTable.validateIntegrity' has type 'TodosCompanion', which does not match the corresponding type, 'Insertable', in the overridden method, 'TableInfo.validateIntegrity'.

    • 'TodosCompanion' is from 'package:flutterapp2/data/database/database.dart' ('lib/data/database/database.dart').
    • 'Insertable' is from 'package:moor/src/runtime/data_class.dart' ('../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-3.1.0/lib/src/runtime/data_class.dart').
    • 'TodoEntry' is from 'package:flutterapp2/data/database/database.dart' ('lib/data/database/database.dart'). Change to a supertype of 'Insertable', or, for a covariant parameter, a subtype. VerificationContext validateIntegrity(TodosCompanion d, ^ ../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-3.1.0/lib/src/runtime/query_builder/schema/table_info.dart:49:23: Context: This is the overridden method ('validateIntegrity'). VerificationContext validateIntegrity(Insertable instance, ^ lib/data/database/database.g.dart:372:61: Error: The parameter 'd' of the method '$CategoriesTable.validateIntegrity' has type 'CategoriesCompanion', which does not match the corresponding type, 'Insertable', in the overridden method, 'TableInfo.validateIntegrity'.
    • 'CategoriesCompanion' is from 'package:flutterapp2/data/database/database.dart' ('lib/data/database/database.dart').
    • 'Insertable' is from 'package:moor/src/runtime/data_class.dart' ('../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-3.1.0/lib/src/runtime/data_class.dart').
    • 'Category' is from 'package:flutterapp2/data/database/database.dart' ('lib/data/database/database.dart'). Change to a supertype of 'Insertable', or, for a covariant parameter, a subtype. VerificationContext validateIntegrity(CategoriesCompanion d, ^ ../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-3.1.0/lib/src/runtime/query_builder/schema/table_info.dart:49:23: Context: This is the overridden method ('validateIntegrity'). VerificationContext validateIntegrity(Insertable instance, ^ lib/data/database/database.g.dart:232:19: Error: Expected 1 type arguments. map['id'] = Variable<int, IntType>(d.id.value); ^ ../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-3.1.0/lib/src/runtime/query_builder/expressions/variables.dart:22:9: Context: Found this candidate, but the arguments don't match. const Variable(this.value); ^^^^^^^^ lib/data/database/database.g.dart:235:24: Error: Expected 1 type arguments. map['content'] = Variable<String, StringType>(d.content.value); ^ ../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-3.1.0/lib/src/runtime/query_builder/expressions/variables.dart:22:9: Context: Found this candidate, but the arguments don't match. const Variable(this.value); ^^^^^^^^ lib/data/database/database.g.dart:238:28: Error: Expected 1 type arguments. map['target_date'] = Variable<DateTime, DateTimeType>(d.targetDate.value); ^ ../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-3.1.0/lib/src/runtime/query_builder/expressions/variables.dart:22:9: Context: Found this candidate, but the arguments don't match. const Variable(this.value); ^^^^^^^^ lib/data/database/database.g.dart:241:25: Error: Expected 1 type arguments. map['category'] = Variable<int, IntType>(d.category.value); ^ ../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-3.1.0/lib/src/runtime/query_builder/expressions/variables.dart:22:9: Context: Found this candidate, but the arguments don't match. const Variable(this.value); ^^^^^^^^ lib/data/database/database.g.dart:401:19: Error: Expected 1 type arguments. map['id'] = Variable<int, IntType>(d.id.value); ^ ../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-3.1.0/lib/src/runtime/query_builder/expressions/variables.dart:22:9: Context: Found this candidate, but the arguments don't match. const Variable(this.value); ^^^^^^^^ lib/data/database/database.g.dart:404:21: Error: Expected 1 type arguments. map['desc'] = Variable<String, StringType>(d.description.value); ^ ../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-3.1.0/lib/src/runtime/query_builder/expressions/variables.dart:22:9: Context: Found this candidate, but the arguments don't match. const Variable(this.value); ^^^^^^^^

    Command PhaseScriptExecution failed with a nonzero exit code note: Using new build system note: Building targets in parallel note: Planning build note: Constructing build description

    opened by jims57 3
  • moor_generator errors

    moor_generator errors

    I forked your code and tried to run flutter packages pub run build_runner build to regenerate database.g.dart. I'm getting this stacktrace and generation just repeats 2/18 actions completed message over and over

    [INFO] Running build...
    [INFO] Generating SDK summary...
    [SEVERE] moor_generator:moor_generator on test/widget_test.dart:
    
    Bad state: Unexpected diagnostics:
    /Users/rs186002/bin/flutter/bin/cache/dart-sdk/lib/core/uri.dart:3259:39 - Expected an identifier.
    [SEVERE] moor_generator:moor_generator on test/widget_test.dart:
    
    ...
    
    [INFO] 16.2s elapsed, 2/18 actions completed.
    [WARNING] No actions completed for 15.0s, waiting on:
      - moor_generator:moor_generator on lib/ui/common/index.dart
      - moor_generator:moor_generator on lib/ui/common/categories_drawer.dart
      - moor_generator:moor_generator on lib/ui/common/add_category_dialog.dart
      - moor_generator:moor_generator on lib/ui/common/todo_edit_dialog.dart
      - moor_generator:moor_generator on lib/ui/common/todo_card.dart
      .. and 11 more
    
    [INFO] 17.6s elapsed, 2/18 actions completed.
    

    I'm on macOS Catalina 10.15.6 running

    Flutter 1.20.0 • channel beta • https://github.com/flutter/flutter.git
    Framework • revision 916c3ac648 (11 days ago) • 2020-08-01 09:01:12 -0700
    Engine • revision d6ee1499c2
    Tools • Dart 2.9.0 (build 2.9.0-21.10.beta)
    Android Studio 4.1 beta 5
    
    opened by bostone 2
  • Switch to moor beta branch

    Switch to moor beta branch

    Switch from the current develop branch to the beta branch of moor.

    There are no major changes since the last PR, but the beta branch is updated less frequently and is generally more stable. On macOS and iOS, moor_ffi will now attempt to open /usr/lib/libsqlite3.dylib instead of just libsqlite3.dylib.

    Please let me know if you run into any issues - I hope to release a first version of moor_ffi very soon :pray:

    opened by simolus3 2
  • SharedDatabase instance for web (moor v4)

    SharedDatabase instance for web (moor v4)

    How to return SharedDatabase instance for web from constructDb()

    I followed moor_shared example and everything was working perfect until I updated moor to v4.

    in web.dart file I was constructing SharedDatabase like this before:

    web.dart

    SharedDatabase constructDb({bool logStatements = false}) {
      return SharedDatabase(WebDatabase.withStorage(
          MoorWebStorage.indexedDbIfSupported('my_database'),
          logStatements: logStatements));
    }
    
    

    but after updating moor to v4 MoorWebStorage is now Future

    WebDatabase.withStorage(await MoorWebStorage.indexedDbIfSupported(name))

    how can I return the SharedDatabase without Future so that I can use constructDb() because for mobile constructsDb() returns simply SharedDatabase like this:

    mobile.dart

    SharedDatabase constructDb({bool logStatements = false}) {
      if (Platform.isIOS || Platform.isAndroid) {
        final executor = LazyDatabase(() async {
          final dataDir = await paths.getApplicationDocumentsDirectory();
          final dbFile =
              File(p.join(dataDir.path, 'my_database.sqlite'));
          return VmDatabase(dbFile, logStatements: logStatements);
        });
        return SharedDatabase(executor);
      }
      if (Platform.isMacOS || Platform.isLinux) {
        final file = File('my_database.sqlite');
        return SharedDatabase(
            VmDatabase(file, logStatements: logStatements));
      }
      if (Platform.isWindows) {
        final file = File('my_database.sqlite');
        return SharedDatabase(
            VmDatabase(file, logStatements: logStatements));
      }
    
      return SharedDatabase(
          VmDatabase.memory(logStatements: logStatements));
    } 
    
    opened by pashtostories 1
  • Fixing windows compilation with flutter master or v1.15.3+

    Fixing windows compilation with flutter master or v1.15.3+

    Fixing #5 compilation issue. Now the app compiles properly with current master (or v1.15.3 if you want to check it out with flutter version v1.15.3). This PR does not solve the exception that ffi is throwing

    Invalid argument(s): Failed to load dynamic library (193)
    
    opened by tomaszpolanski 1
  • Upgrade dependencies

    Upgrade dependencies

    The example failed to run with the recent Flutter v1.11.0 and also the android build did fail due to the lack of migration to AndroidX

    Have tested it on both Android, Web, Linux but due to the lack of Mac and iOS I wasn't able to test it there.

    All should work as before as just refreshed the desktop folders from the current Flutter Desktop Embeddings

    opened by jaggernod 1
  • update packages & null

    update packages & null

    one problem I found from the start undo not work I thing is can be because bloc ( I not worked with ) maybe Rx library: some class was deprecated and I find replacement from the google ( and i not work with rx before )

    is all to you now ( accept all and fix the bug ) May God guide you

    opened by hpn33 0
  • Build error for iOS

    Build error for iOS

    I got build error when trying to run on iOS, here is the log

    Failed to build iOS app
    Error output from Xcode build:
    ↳
        ** BUILD FAILED **
    
    
    Xcode's output:
    ↳
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-0.0.4+3/lib/src/path_provider_windows_real.dart:126:25: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
         - 'GUID' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
                  knownFolderID.addressOf, KF_FLAG_DEFAULT, NULL, pathPtrPtr);
                                ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1067:7: Error: The getter 'addressOf' isn't defined for the class 'LOGFONT'.
         - 'LOGFONT' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
              addressOf.cast<Uint8>().elementAt(28).cast<Utf16>();
              ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1112:29: Error: The getter 'addressOf' isn't defined for the class 'ENUMLOGFONTEX'.
         - 'ENUMLOGFONTEX' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
          LOGFONT get elfLogFont => addressOf.cast<LOGFONT>().ref;
                                    ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1114:29: Error: The getter 'addressOf' isn't defined for the class 'ENUMLOGFONTEX'.
         - 'ENUMLOGFONTEX' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
          String get elfFullName => addressOf
                                    ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1120:26: Error: The getter 'addressOf' isn't defined for the class 'ENUMLOGFONTEX'.
         - 'ENUMLOGFONTEX' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
          String get elfStyle => addressOf
                                 ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1126:27: Error: The getter 'addressOf' isn't defined for the class 'ENUMLOGFONTEX'.
         - 'ENUMLOGFONTEX' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
          String get elfScript => addressOf
                                  ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2688:7: Error: The getter 'addressOf' isn't defined for the class 'OSVERSIONINFO'.
         - 'OSVERSIONINFO' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
              addressOf.cast<Uint8>().elementAt(20).cast<Utf16>().unpackString(128);
              ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2699:11: Error: The getter 'addressOf' isn't defined for the class 'OSVERSIONINFO'.
         - 'OSVERSIONINFO' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
                ..addressOf.cast<Uint8>().elementAt(20).value = 0;
                  ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2744:24: Error: The getter 'addressOf' isn't defined for the class 'BLUETOOTH_DEVICE_INFO'.
         - 'BLUETOOTH_DEVICE_INFO' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
          String get szName => addressOf
                               ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2837:7: Error: The getter 'addressOf' isn't defined for the class 'BLUETOOTH_PIN_INFO'.
         - 'BLUETOOTH_PIN_INFO' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
              addressOf.cast<Uint8>().elementAt(BTH_MAX_PIN_SIZE).value;
              ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2840:5: Error: The getter 'addressOf' isn't defined for the class 'BLUETOOTH_PIN_INFO'.
         - 'BLUETOOTH_PIN_INFO' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
            addressOf.cast<Uint8>().elementAt(BTH_MAX_PIN_SIZE).value =
            ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2845:28: Error: The getter 'addressOf' isn't defined for the class 'BLUETOOTH_PIN_INFO'.
         - 'BLUETOOTH_PIN_INFO' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
              String.fromCharCodes(addressOf.cast<Uint8>().asTypedList(pinLength));
                                   ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2853:7: Error: The getter 'addressOf' isn't defined for the class 'BLUETOOTH_PIN_INFO'.
         - 'BLUETOOTH_PIN_INFO' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
              addressOf.cast<Uint8>().elementAt(idx).value = pinData[idx];
              ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart:38:31: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
         - 'GUID' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
          final iid = GUID.allocate().addressOf;
                                      ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart:56:33: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
         - 'GUID' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
          final clsid = GUID.allocate().addressOf;
                                        ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/winrt/winrt_helpers.dart:86:40: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
         - 'GUID' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
          final riidCalendar = GUID.allocate().addressOf;
                                               ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IDesktopWallpaper.dart:197:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
         - 'COMObject' is from 'package:win32/src/com/combase.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
            final ptr = COMObject.allocate().addressOf;
                                             ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IDesktopWallpaper.dart:200:49: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
         - 'GUID' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
                GUID.fromString(CLSID_DesktopWallpaper).addressOf,
                                                        ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IDesktopWallpaper.dart:203:48: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
         - 'GUID' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
                GUID.fromString(IID_IDesktopWallpaper).addressOf,
                                                       ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IFileOpenDialog.dart:58:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
         - 'COMObject' is from 'package:win32/src/com/combase.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
            final ptr = COMObject.allocate().addressOf;
                                             ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IFileOpenDialog.dart:61:47: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
         - 'GUID' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
                GUID.fromString(CLSID_FileOpenDialog).addressOf,
                                                      ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IFileOpenDialog.dart:64:46: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
         - 'GUID' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
                GUID.fromString(IID_IFileOpenDialog).addressOf,
                                                     ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IFileSaveDialog.dart:99:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
         - 'COMObject' is from 'package:win32/src/com/combase.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
            final ptr = COMObject.allocate().addressOf;
                                             ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IFileSaveDialog.dart:102:47: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
         - 'GUID' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
                GUID.fromString(CLSID_FileSaveDialog).addressOf,
                                                      ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IFileSaveDialog.dart:105:46: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
         - 'GUID' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
                GUID.fromString(IID_IFileSaveDialog).addressOf,
                                                     ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IKnownFolderManager.dart:164:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
         - 'COMObject' is from 'package:win32/src/com/combase.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
            final ptr = COMObject.allocate().addressOf;
                                             ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IKnownFolderManager.dart:167:51: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
         - 'GUID' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
                GUID.fromString(CLSID_KnownFolderManager).addressOf,
                                                          ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IKnownFolderManager.dart:170:50: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
         - 'GUID' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
                GUID.fromString(IID_IKnownFolderManager).addressOf,
                                                         ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/INetworkListManager.dart:128:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
         - 'COMObject' is from 'package:win32/src/com/combase.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
            final ptr = COMObject.allocate().addressOf;
                                             ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/INetworkListManager.dart:131:51: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
         - 'GUID' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
                GUID.fromString(CLSID_NetworkListManager).addressOf,
                                                          ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/INetworkListManager.dart:134:50: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
         - 'GUID' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
                GUID.fromString(IID_INetworkListManager).addressOf,
                                                         ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IWbemLocator.dart:82:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
         - 'COMObject' is from 'package:win32/src/com/combase.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
            final ptr = COMObject.allocate().addressOf;
                                             ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IWbemLocator.dart:84:68: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
         - 'GUID' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
            final hr = CoCreateInstance(GUID.fromString(CLSID_WbemLocator).addressOf,
                                                                           ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IWbemLocator.dart:85:64: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
         - 'GUID' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
                nullptr, CLSCTX_ALL, GUID.fromString(IID_IWbemLocator).addressOf, ptr);
                                                                       ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf8.dart:63:33: Error: The getter 'addressOf' isn't defined for the class 'Utf8'.
         - 'Utf8' is from 'package:ffi/src/utf8.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf8.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
          String toString() => fromUtf8(addressOf);
                                        ^^^^^^^^^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-0.1.8/lib/src/ffi/sqlite3.ffi.dart:6:7: Error: Struct 'char' is empty. Empty structs are undefined behavior.
        class char extends Struct {}
              ^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-0.1.8/lib/src/ffi/sqlite3.ffi.dart:8:7: Error: Struct 'sqlite3' is empty. Empty structs are undefined behavior.
        class sqlite3 extends Struct {}
              ^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-0.1.8/lib/src/ffi/sqlite3.ffi.dart:10:7: Error: Struct 'sqlite3_stmt' is empty. Empty structs are undefined behavior.
        class sqlite3_stmt extends Struct {}
              ^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-0.1.8/lib/src/ffi/sqlite3.ffi.dart:12:7: Error: Struct 'sqlite3_value' is empty. Empty structs are undefined behavior.
        class sqlite3_value extends Struct {}
              ^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-0.1.8/lib/src/ffi/sqlite3.ffi.dart:14:7: Error: Struct 'sqlite3_context' is empty. Empty structs are undefined behavior.
        class sqlite3_context extends Struct {}
              ^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1111:7: Error: Struct 'ENUMLOGFONTEX' is empty. Empty structs are undefined behavior.
        class ENUMLOGFONTEX extends Struct {
              ^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2835:7: Error: Struct 'BLUETOOTH_PIN_INFO' is empty. Empty structs are undefined behavior.
        class BLUETOOTH_PIN_INFO extends Struct {
              ^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2960:7: Error: Struct 'EXCEPINFO' is empty. Empty structs are undefined behavior.
        class EXCEPINFO extends Struct {}
              ^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2966:7: Error: Struct 'PROPERTYKEY' is empty. Empty structs are undefined behavior.
        class PROPERTYKEY extends Struct {}
              ^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2973:7: Error: Struct 'PROPVARIANT' is empty. Empty structs are undefined behavior.
        class PROPVARIANT extends Struct {}
              ^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2978:7: Error: Struct 'SAFEARRAY' is empty. Empty structs are undefined behavior.
        class SAFEARRAY extends Struct {}
              ^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2985:7: Error: Struct 'CLSID' is empty. Empty structs are undefined behavior.
        class CLSID extends Struct {}
              ^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2992:7: Error: Struct 'STATSTG' is empty. Empty structs are undefined behavior.
        class STATSTG extends Struct {}
              ^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2999:7: Error: Struct 'NLM_SIMULATED_PROFILE_INFO' is empty. Empty structs are undefined behavior.
        class NLM_SIMULATED_PROFILE_INFO extends Struct {}
              ^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf8.dart:23:7: Error: Struct 'Utf8' is empty. Empty structs are undefined behavior.
        class Utf8 extends Struct {
              ^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf16.dart:16:7: Error: Struct 'Utf16' is empty. Empty structs are undefined behavior.
        class Utf16 extends Struct {
              ^
        ../../flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/allocation.dart:47:33: Error: Expected type 'T' to be a valid and instantiated subtype of 'NativeType'.
          final int totalSize = count * sizeOf<T>();
                                        ^
    
        Command PhaseScriptExecution failed with a nonzero exit code
        note: Using new build system
        note: Building targets in parallel
        note: Planning build
        note: Constructing build description
    
    Could not build the precompiled application for the device.
    

    Does anyone has idea about this error? Thank you

    opened by thachnb85 0
Owner
Rody Davis
Developer Advocate for @material-components at @Google
Rody Davis
:fire:GeoFlutterFire:fire: is an open-source library that allows you to store and query firestore documents based on their geographic location.

GeoFlutterFire ?? GeoFlutterFire is an open-source library that allows you to store and query a set of keys based on their geographic location. At its

Darshan N 282 Dec 11, 2022
his package provides a Clock class which encapsulates the notion of the "current time" and provides easy access to points relative to the current time.

This package provides a Clock class which encapsulates the notion of the "current time" and provides easy access to points relative to the current tim

Dart 34 Dec 15, 2022
Hive is a lightweight and blazing fast key-value database

Hive Manager Hive is a lightweight and blazing fast key-value database Features Cross platform -> mobile, desktop Performance Strong encryption built

Okan 2 Feb 24, 2022
This example uses a ScrollView, JSON Rest API, Navigation, Alert Pop Up, Progress Indicator, Globals, Images in a shared asset folder, and 100% Shared Code

This example uses a ScrollView, JSON Rest API, Navigation, Alert Pop Up, Progress Indicator, Globals, Images in a shared asset folder, and 100% Shared Code. Now with the ability to login with FaceID, TouchID, and Fingerprint Reader on Android.

Rody Davis 672 Jan 6, 2023
Flutter-Shared-Preference - The goal is to learn how to use the shared preferences plugin to save important pieces of information to your device.

Recipe Finder The goal is to learn how to use the shared preferences plugin to save important pieces of information to your device. Final App UI Resou

Ashirbad Swain 1 Jan 1, 2022
Shared preferences typed - A type-safe wrapper around shared preferences, inspired by ts-localstorage

Typed Shared Preferences A type-safe wrapper around shared_preferences, inspired

Philipp Bauer 0 Jan 31, 2022
Note Shared Preferences - Note App Shared Preferences, Using Flutter

NOTE APP SHARED PREFERENCES LOCALIZATION Watch the gif below (lasts 00:08:22)

Tukhtamurodov Sardorbek 1 Jul 8, 2022
Shared Mobile and Web Firebase Login

fb_auth A Shared Firebase Auth Plugin for Mobile, Web and Desktop. Included AuthBloc for minimal setup! Single dynamic import and compile time ready f

Rody Davis 46 Dec 29, 2021
A Flutter plugin for handling Connectivity and REAL Connection state in the mobile, web and desktop platforms. Supports iOS, Android, Web, Windows, Linux and macOS.

cross_connectivity A Flutter plugin for handling Connectivity and REAL Connection state in the mobile, web and desktop platforms. Supports iOS, Androi

MarchDev Toolkit 29 Nov 15, 2022
I am trying to teach Responsive Ui design. This video for Web and Mobile. This design is suitable for Desktop, Tab, and Mobile platforms.

before clone the GitHub repository please give a star on the repository. I am trying to teach Responsive Ui design. This video for Web and Mobile. Thi

Blackshadow Software Ltd 22 Sep 1, 2022
Experimental solution for web-like text selection across widgets

Better Selection Experimental solution for web-like text selection across widgets (text, images, et cetera). Better selection is dependent on, and is

Wilson Wilson 59 Oct 12, 2022
An e-learning Application for students to gather knowledge across various domains from the web.

EduHub A new Flutter App with advanced features to help students to access varoius study materials and contents without seraching loads of websites an

SAGNIK SANYAL 5 Jul 22, 2022
Trying out Flutter for desktop Web app development as an alternative to SPA frameworks (such as React and Angular) by recreating one of the pages of an existing CV Management web app

HTML Renderer Demo CanvasKit Renderer Demo Reddit discussion This repo contains a PoC of using Flutter as a traditional SPA framework for creating a d

Maxim Saplin 20 Oct 11, 2022
A Mobile Application for NITT students to digitally unlock/lock shared-cycles in stands.

CycleLock App A Mobile Application for NITT students to digitally unlock/lock shared-cycles in stands. Requirements Java-Version - '12.x' Flutter-Vers

Delta Force 6 Nov 6, 2022
Easy-to-use Navigator 2.0 router for web, mobile and desktop. URL-based routing, simple navigation of tabs and nested routes.

Routemaster Hello! Routemaster is an easy-to-use router for Flutter, which wraps over Navigator 2.0... and has a silly name. Features Simple declarati

Tom Gilder 291 Jan 3, 2023
Realm is a mobile database: a replacement for SQLite & ORMs.

Realm is a mobile database that runs directly inside phones, tablets or wearables. This repository holds the source code for the Realm SDK for Flutter

Realm 526 Dec 23, 2022
Flutter UI Kits for mobile, tablet, desktop and web application

UIKits2 A complete UIs for mobile and tablet, which include 16 categories. Start SignUp & Login Walkthrough Loading Profiles Feed Article Activity Cre

Anuchit Chalothorn 25 Oct 8, 2022
A platform adaptive Flutter app for desktop, mobile and web.

Flutter Folio A demo app showcasing how Flutter can deliver a great multi-platform experience, targeting iOS, Android, MacOS, Windows, Linux, and web.

gskinner team 3.5k Dec 28, 2022
A platform adaptive Flutter app for desktop, mobile and web.

Flutter Folio A demo app showcasing how Flutter can deliver a great multi-platform experience, targeting iOS, Android, MacOS, Windows, Linux, and web.

gskinner team 3.5k Jan 2, 2023