diff --git a/lib/core/services/api_service.dart b/lib/core/services/api_service.dart index 142f4f8..d72beb6 100644 --- a/lib/core/services/api_service.dart +++ b/lib/core/services/api_service.dart @@ -104,10 +104,10 @@ class APIService { Future> _main(String url, dynamic body, String method, String succeed, bool force, BuildContext? context, Options? options) async { var err = ""; - try { + try { _dio.options.headers["Authorization"] = "Bearer ${localStorage.getItem('accessToken') ?? ""}"; _dio.interceptors.clear(); - print("${_dio.options.baseUrl}$url" ); + print("URL ${_dio.options.baseUrl}$url" ); var response = await _request(url, method, body, options); if (response.statusCode != null && response.statusCode! < 400) { if (method == "delete") { cache.remove(url); return APIResponse(); } @@ -137,7 +137,7 @@ class APIService { alertBannerLocation: AlertBannerLocation.bottom,); } catch (e) { /* */ } } - throw Exception(err); + throw Exception("${_dio.options.baseUrl}$url $err"); } Future> raw( diff --git a/lib/models/resources/storage.dart b/lib/models/resources/storage.dart index d9a0fab..cc23538 100644 --- a/lib/models/resources/storage.dart +++ b/lib/models/resources/storage.dart @@ -48,7 +48,10 @@ class StorageItem extends AbstractItem serialize() { - var obj = infos(); + var obj = { + "acronym": acronym, + "storage_type": typeEnum, + }; obj.addAll(toJSON()); return obj; } diff --git a/lib/widgets/forms/scheduler_forms.dart b/lib/widgets/forms/scheduler_forms.dart index b20ac4b..cafa72d 100644 --- a/lib/widgets/forms/scheduler_forms.dart +++ b/lib/widgets/forms/scheduler_forms.dart @@ -153,7 +153,7 @@ class SchedulerFormsWidgetState extends State { } catch (e) { /* */ } } - }); + }).catchError((e) {}); } else { Future.delayed(const Duration(milliseconds: 100), () { widget.shouldSearch = true; diff --git a/library/flutter_flow_chart/lib/src/flow_chart.dart b/library/flutter_flow_chart/lib/src/flow_chart.dart index 43b4bff..27fbdc2 100755 --- a/library/flutter_flow_chart/lib/src/flow_chart.dart +++ b/library/flutter_flow_chart/lib/src/flow_chart.dart @@ -374,10 +374,10 @@ class FlowChartState extends State { if (event.logicalKey == LogicalKeyboardKey.controlLeft && event is KeyUpEvent) { isCtrl = false; } - if ((event is KeyDownEvent || event.logicalKey == LogicalKeyboardKey.keyZ) && isCtrl) { + if ((event is KeyDownEvent && event.logicalKey == LogicalKeyboardKey.keyZ) && isCtrl) { widget.dashboard.back(); } - if ((event is KeyDownEvent || event.logicalKey == LogicalKeyboardKey.keyY) && isCtrl) { + if ((event is KeyDownEvent && event.logicalKey == LogicalKeyboardKey.keyY) && isCtrl) { widget.dashboard.forward(); } if (event is KeyDownEvent && event.logicalKey == LogicalKeyboardKey.add) {