replace by getNewUuid

This commit is contained in:
Ankit Mahato
2024-03-10 23:10:19 +05:30
parent 1a40b3249e
commit f9c32cddfd
2 changed files with 5 additions and 5 deletions

View File

@ -3,7 +3,7 @@ import 'settings_providers.dart';
import 'ui_providers.dart'; import 'ui_providers.dart';
import '../models/models.dart'; import '../models/models.dart';
import '../services/services.dart' show hiveHandler, HiveHandler, request; import '../services/services.dart' show hiveHandler, HiveHandler, request;
import '../utils/utils.dart' show uuid, collectionToHAR; import '../utils/utils.dart' show getNewUuid, collectionToHAR;
import '../consts.dart'; import '../consts.dart';
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;
@ -54,7 +54,7 @@ class CollectionStateNotifier
} }
void add() { void add() {
final id = uuid.v1(); final id = getNewUuid();
final newRequestModel = RequestModel( final newRequestModel = RequestModel(
id: id, id: id,
); );
@ -97,7 +97,7 @@ class CollectionStateNotifier
} }
void duplicate(String id) { void duplicate(String id) {
final newId = uuid.v1(); final newId = getNewUuid();
var itemIds = ref.read(requestSequenceProvider); var itemIds = ref.read(requestSequenceProvider);
int idx = itemIds.indexOf(id); int idx = itemIds.indexOf(id);
@ -213,7 +213,7 @@ class CollectionStateNotifier
bool loadData() { bool loadData() {
var ids = hiveHandler.getIds(); var ids = hiveHandler.getIds();
if (ids == null || ids.length == 0) { if (ids == null || ids.length == 0) {
String newId = uuid.v1(); String newId = getNewUuid();
state = { state = {
newId: RequestModel( newId: RequestModel(
id: newId, id: newId,

View File

@ -49,7 +49,7 @@ String getShortPath(String path) {
} }
String getTempFileName() { String getTempFileName() {
return uuid.v1(); return getNewUuid();
} }
Future<FilePickerResult?> pickFile() async { Future<FilePickerResult?> pickFile() async {