mirror of
https://github.com/foss42/apidash.git
synced 2025-08-06 13:51:20 +08:00
replace by getNewUuid
This commit is contained in:
@ -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,
|
||||||
|
@ -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 {
|
||||||
|
Reference in New Issue
Block a user