Mar 31, 2023 11:57
the key is the listview index?
Mar 31, 2023 11:57
@override
Future<void> deletePropertyBasedOnId(int key) async {
final propertiesBox = await Hive.openBox(_propertyBox);
propertiesBox.delete(key);
}
Mar 31, 2023 11:57
@SagarSable If I want to delete,write like this?
Mar 31, 2023 11:44
all the best to you
Mar 31, 2023 11:44
thanks for your helped
Mar 31, 2023 11:44
no problem
Mar 31, 2023 11:39
after save list from server to local
Mar 31, 2023 11:39
but now i want fetch from local
Mar 31, 2023 11:38
i see
Mar 31, 2023 11:36
because i using put?
Mar 31, 2023 11:35
need use elementAt instead
Mar 31, 2023 11:35
actually I dont understand why getAt not working
Mar 31, 2023 11:34
appreciate
Mar 31, 2023 11:34
you helped a lot
Mar 31, 2023 11:34
sure i will
Mar 31, 2023 11:29
ok,thanks again
Mar 31, 2023 11:27
why need use getAt? If I use back my own code, also same?
Mar 31, 2023 11:27
for the getlist method, I saw you using
var data = propertiesBox.getAt(0);
Mar 31, 2023 11:26
thanks
Mar 31, 2023 11:26
it works !
Mar 31, 2023 11:22
wait..i checking
Mar 31, 2023 11:06
thanks
Mar 31, 2023 11:04
same
Mar 31, 2023 11:01
it should only return one right
Mar 31, 2023 11:01
fefef [Instance of 'PropertiesEntity', Instance of 'PropertiesEntity']
Mar 31, 2023 11:01
output
Mar 31, 2023 11:00
I don't know why it will return 2 items
Mar 31, 2023 11:00
@override
Future<PropertiesEntity?> getPropertyDetails(int index) async {
try {
final propertiesBox = await Hive.openBox(_propertyBox);
var list = await propertiesBox.get('propertyList');
list = await list.cast<PropertiesEntity>();
var propertyEntity = await propertiesBox.getAt(0);
debugPrint("fefef " + propertyEntity.toString());
return await propertyEntity;
} on CacheException catch (e) {
throw CacheException(e.message);
}
}
Mar 31, 2023 10:58
want retrive specific item
Mar 31, 2023 10:55
not yet fixed ..my first issue haven't fixed
Mar 31, 2023 10:54
now need to retrieve specific item
Mar 31, 2023 10:54
it works now
Mar 31, 2023 10:54
return data.cast<PropertiesEntity>();
Mar 31, 2023 10:53
i think data not same return datatype?
Mar 31, 2023 10:53
in getlist
Mar 31, 2023 10:50
Trion KL
I/flutter (14044): Zoinla Home
I/flutter (14044): data==========type 'List<dynamic>' is not a subtype of type 'FutureOr<List<PropertiesEntity>?>'
Mar 31, 2023 10:50
got the name now
Mar 31, 2023 10:50
ok
Mar 31, 2023 10:49
data==========HiveError: The box "propertybox" is already open and of type LazyBox<dynamic>.
Mar 31, 2023 10:48
if getList,i change to openBox
Mar 31, 2023 10:48
in save method, i use openLazyBox
Mar 31, 2023 10:48
any different btw openLazyBox and openbox?
Mar 31, 2023 10:47
wait
Mar 31, 2023 10:47
ok
Mar 31, 2023 10:45
saveProperty still same with my old code
Mar 31, 2023 10:43
0.0
Mar 31, 2023 10:39
wonder why getAt(0) will return 2 items
Mar 31, 2023 10:34
but how does this solve my issue
Mar 31, 2023 10:34
ok
Mar 31, 2023 10:30
use getAt?