Questions tagged [flutter-isar]

43 questions
7
votes
0 answers

Using a single Flutter model for both isar database and JsonSerializable

I am trying to use a single model for both storing the data locally using Isar, and also for using with Retrofit for REST API requests. But Isar requires all the Linked classes to be defined with the datatype IsarLink where…
Jishnu Raj
  • 170
  • 3
  • 16
4
votes
1 answer

How to import existing JSON file into Isar flutter

Hi I am new to Isar Flutter. I want to know is there any way to import existing JSON file into Isar? I try to search this on the Internet but can't find much on it. Below is the structure of my Json file. { "food": [ { "id": "0001", …
Joven Dev
  • 189
  • 2
  • 14
2
votes
1 answer

Flutter Isar database usage in a model

I am currently creating a database using Isar that looks like this: @collection class Polygon { Id id = Isar.autoIncrement; final vertices = IsarLinks(); late Color color; } @collection class Vertex { Id id =…
2
votes
0 answers

Flutter Isar Database store unsupported types

I'm currently using Hive because some of my models have TimeOfDay fields that aren't natively supported, but with type adapters I store them as strings and easily decode them. I'd like to switch to Isar because of its benefits over Hive. But since…
David
  • 43
  • 4
2
votes
1 answer

How to Backup Local SQL Database on a Cloud Service from a Flutter App

I am writing a flutter app that stores data in a local SQL database (Isar). I want to regularly backup this data on a Cloud Service and occasionally restore it in case a user has a new Phone. I am no expert in SQL or server maintenance and I am…
Sunny
  • 21
  • 1
2
votes
0 answers

IsarError: Could not initialize IsarCore library in Flutter

I got errors when running a Flutter app on Samsung Galaxy A13 in release mode. These errors are below E/flutter ( 2872): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: IsarError: Could not initialize IsarCore library. If you…
Leslie Joe
  • 281
  • 4
  • 17
2
votes
2 answers

How to open the Isar inspector

I have been trying to find a way to open the Isar database inspector. Does anyone know how to open the inspector?
1
vote
0 answers

Flutter Isar DB initialization error: Could not download IsarCore library

In my Flutter app, I use Isar DB. According to the documentation, it is possible to use my Isar database in my unit tests. Here is what I've tried so far, just to see if I can initialize Isar correctly in my tests: void main() { late Isar isar; …
matteoh
  • 2,810
  • 2
  • 29
  • 54
1
vote
0 answers

This is about how to use isar

When using Isar's put or get, you need to specify the collection. await isar.writeTxn(() async => isar.userCollections.put(value)); However, with this approach, you would need to create a separate function for each collection, which can be quite…
sub
  • 117
  • 1
  • 6
1
vote
1 answer

Updating objects in isar database in flutter

I always get a new object inserted rather than updating a old object in the database which I observed using Isar Inspector. Future updateinvstatus(bool x) async { final isar = await db; final cflist = await isar.cfs.where().findAll(); …
1
vote
1 answer

Isar: Is there a way to do a text search on the items of an IsarLinks object using indexes?

I have a collection of Bars, each of which have isar links to Foos: @collection class Bar{ Id? id; final foos = IsarLinks(); ... // Bar stuff }; Each Foo object has a field named text, which is a String: @collection class Foo{ Id?…
Captain Hatteras
  • 490
  • 3
  • 11
1
vote
2 answers

How can I make inspect.isar.dev show me the data in my running Flutter build?

When I run my flutter build in VS code, I see the Isar banner and copy the accompanying link to my Chrome browser, e.g. ws://127.0.0.1:57558/NBNCkteNWbM=/wsLaunching lib/main.dart on iPad Pro (11-inch) (4th generation) in debug mode... Xcode build…
johnrubythecat
  • 1,003
  • 1
  • 13
  • 31
1
vote
0 answers

Get Isar Collection from string or class variable? something like isar.${mycollection}

I have created an isar helper class for all my calls to isar. I'm trying to build generic functions. For example: Future> listModel(String pModelType) async { final isar = await _db; return…
J-L
  • 189
  • 1
  • 8
1
vote
1 answer

How to add data to a nested list in Isar?

I have a class that has String and List variables. While the application is running, I need to add values ​​for each model separately to this nested List. This is something like a TODO list, where there are categories of cases, and each category has…
Moler32
  • 23
  • 4
1
vote
1 answer

Isar database backup locally and restore

I want to know if there is a way by which I can export all the database of the Isar into a backup and then restore it so if a user wants to uninstall the app the user can backup the data locally into a location like sdcard or phone storage and after…
devblock
  • 113
  • 7
1
2 3