mobileapplicationPassvault/lib/hive_storage/storedserlist.dart

33 lines
972 B
Dart
Raw Permalink Normal View History

2024-04-12 05:23:32 +00:00
import 'package:flutter/material.dart';
import 'package:flutter_passvault/hive_storage/add_creds_offline.dart';
import 'package:flutter_passvault/modelclasses/usr_list_model.dart';
import 'package:hive/hive.dart';
class StoredDataRepository extends ChangeNotifier {
final Box<Addofflinecredential>
_hiveBox1; // Use the correct type for your Hive box
StoredDataRepository(this._hiveBox1);
List<Message> _messages = [];
List<Message> get messages => _messages;
set message(List<Message> messages) {
_messages = messages;
notifyListeners();
}
List<Addofflinecredential> getAlluserdataDataFromHive() {
print("Stored_ALL_valuesssss : ${_hiveBox1.values.toList()}");
print(
"Stored_ALL_valuesssss_leangthhh : ${_hiveBox1.values.toList().length}");
return _hiveBox1.values.toList();
}
void updateMessageCheckedStatus(int index, bool isChecked) {
_messages[index].isChecked = isChecked;
notifyListeners();
}
}