* [PATCH proxmox{_dart_api_client,_login_manager} 0/2] cleanup: replace deprecated property and fix dart analyze issues
@ 2026-03-06 14:35 Shan Shaji
2026-03-06 14:35 ` [PATCH proxmox_dart_api_client 1/1] fix: cleanup: dart analysis issues found by dart linter Shan Shaji
2026-03-06 14:35 ` [PATCH proxmox_login_manager 1/1] cleanup: replace use of deprecated props and fix dart analyze issues Shan Shaji
0 siblings, 2 replies; 3+ messages in thread
From: Shan Shaji @ 2026-03-06 14:35 UTC (permalink / raw)
To: pve-devel
This series fixes dart analyze issues and deprecated property usage.
proxmox_dart_api_client:
Shan Shaji (1):
fix: cleanup: dart analysis issues found by dart linter
lib/proxmox_dart_api_client.dart | 6 ++----
lib/src/extentions.dart | 3 ++-
test/test.dart | 10 ++++------
3 files changed, 8 insertions(+), 11 deletions(-)
proxmox_login_manager:
Shan Shaji (1):
cleanup: replace use of deprecated props and fix dart analyze issues
lib/proxmox_login_form.dart | 2 +-
lib/proxmox_login_manager.dart | 2 +-
lib/proxmox_tfa_form.dart | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
Summary over all repositories:
6 files changed, 11 insertions(+), 14 deletions(-)
--
Generated by git-murpp 0.8.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH proxmox_dart_api_client 1/1] fix: cleanup: dart analysis issues found by dart linter
2026-03-06 14:35 [PATCH proxmox{_dart_api_client,_login_manager} 0/2] cleanup: replace deprecated property and fix dart analyze issues Shan Shaji
@ 2026-03-06 14:35 ` Shan Shaji
2026-03-06 14:35 ` [PATCH proxmox_login_manager 1/1] cleanup: replace use of deprecated props and fix dart analyze issues Shan Shaji
1 sibling, 0 replies; 3+ messages in thread
From: Shan Shaji @ 2026-03-06 14:35 UTC (permalink / raw)
To: pve-devel
The library name is not necessary anymore [0]. Removed the same
and updated the doc comments. Additionaly, added explicit types
for variables as suggested by the dart linter (lints) [1][2].
[0] - https://dart.dev/tools/linter-rules/unnecessary_library_name
[1] - https://dart.dev/tools/linter-rules/prefer_typing_uninitialized_variables
[2] - https://dart.dev/tools/linter-rules/strict_top_level_inference
Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
lib/proxmox_dart_api_client.dart | 6 ++----
lib/src/extentions.dart | 3 ++-
test/test.dart | 10 ++++------
3 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/lib/proxmox_dart_api_client.dart b/lib/proxmox_dart_api_client.dart
index 9eaa257..20d76dd 100644
--- a/lib/proxmox_dart_api_client.dart
+++ b/lib/proxmox_dart_api_client.dart
@@ -1,7 +1,5 @@
-/// Support for doing something awesome.
-///
-/// More dartdocs go here.
-library proxmox_dart_api_client;
+/// Proxmox Dart API client.
+library;
export 'src/client.dart';
export 'src/authenticate.dart';
diff --git a/lib/src/extentions.dart b/lib/src/extentions.dart
index 8b73683..2dd9352 100644
--- a/lib/src/extentions.dart
+++ b/lib/src/extentions.dart
@@ -10,7 +10,8 @@ extension ResponseValidation on http.Response {
if (reasonPhrase != null) {
message = '$statusCode: $reasonPhrase';
}
- var decodedErrors;
+
+ dynamic decodedErrors;
if (extensive) {
try {
diff --git a/test/test.dart b/test/test.dart
index 5261f7e..23368a2 100644
--- a/test/test.dart
+++ b/test/test.dart
@@ -3,7 +3,7 @@ import 'package:http/http.dart' as http;
import 'package:proxmox_dart_api_client/src/handle_ticket_response.dart';
import 'package:test/test.dart';
-Matcher throwsProxmoxApiException(message, statusCode) =>
+Matcher throwsProxmoxApiException(String message, int statusCode) =>
throwsA(isA<ProxmoxApiException>()
.having((e) => e.message, 'message ', message)
.having((e) => e.statusCode, 'http status code', statusCode));
@@ -20,16 +20,14 @@ void main() {
test('fail >= 400', () {
var response = http.Response('', 400);
- expect(
- () => response.validate(false),
- throwsProxmoxApiException(
- 'Request failed with status 400', equals(400)));
+ expect(() => response.validate(false),
+ throwsProxmoxApiException('Request failed with status 400', 400));
});
test('fail >= 400 with reason phrase', () {
var response = http.Response('', 400, reasonPhrase: 'this did not work');
expect(() => response.validate(false),
- throwsProxmoxApiException('400: this did not work', equals(400)));
+ throwsProxmoxApiException('400: this did not work', 400));
});
test('valid credentials extraction', () {
--
2.47.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH proxmox_login_manager 1/1] cleanup: replace use of deprecated props and fix dart analyze issues
2026-03-06 14:35 [PATCH proxmox{_dart_api_client,_login_manager} 0/2] cleanup: replace deprecated property and fix dart analyze issues Shan Shaji
2026-03-06 14:35 ` [PATCH proxmox_dart_api_client 1/1] fix: cleanup: dart analysis issues found by dart linter Shan Shaji
@ 2026-03-06 14:35 ` Shan Shaji
1 sibling, 0 replies; 3+ messages in thread
From: Shan Shaji @ 2026-03-06 14:35 UTC (permalink / raw)
To: pve-devel
`value` property is deprecated in favor of `initialValue` starting from
v3.35 [0]. Replaced the use of `value` prop with `initialValue`. Additionaly,
removed the library name, as that is not necessary anymore [1].
[0] - https://docs.flutter.dev/release/breaking-changes/deprecate-dropdownbuttonformfield-value
[1] - https://dart.dev/tools/linter-rules/unnecessary_library_name
Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
lib/proxmox_login_form.dart | 2 +-
lib/proxmox_login_manager.dart | 2 +-
lib/proxmox_tfa_form.dart | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/proxmox_login_form.dart b/lib/proxmox_login_form.dart
index b69636d..5b9a64e 100644
--- a/lib/proxmox_login_form.dart
+++ b/lib/proxmox_login_form.dart
@@ -125,7 +125,7 @@ class _ProxmoxLoginFormState extends State<ProxmoxLoginForm> {
onChanged: widget.onDomainChanged,
selectedItemBuilder: (context) =>
widget.accessDomains!.map((e) => Text(e!.realm)).toList(),
- value: widget.selectedDomain,
+ initialValue: widget.selectedDomain,
),
Stack(
children: [
diff --git a/lib/proxmox_login_manager.dart b/lib/proxmox_login_manager.dart
index 8b09583..7868683 100644
--- a/lib/proxmox_login_manager.dart
+++ b/lib/proxmox_login_manager.dart
@@ -1,4 +1,4 @@
-library proxmox_login_manager;
+library;
export 'proxmox_login_selector.dart';
export 'proxmox_login_model.dart';
diff --git a/lib/proxmox_tfa_form.dart b/lib/proxmox_tfa_form.dart
index ba18c54..79273fa 100644
--- a/lib/proxmox_tfa_form.dart
+++ b/lib/proxmox_tfa_form.dart
@@ -99,7 +99,7 @@ class _ProxmoxTfaFormState extends State<ProxmoxTfaForm> {
},
selectedItemBuilder: (context) =>
_tfaKinds.map((e) => Text(e)).toList(),
- value: _selectedTfaKind,
+ initialValue: _selectedTfaKind,
),
TextField(
controller: _codeController,
--
2.47.3
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-06 14:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-06 14:35 [PATCH proxmox{_dart_api_client,_login_manager} 0/2] cleanup: replace deprecated property and fix dart analyze issues Shan Shaji
2026-03-06 14:35 ` [PATCH proxmox_dart_api_client 1/1] fix: cleanup: dart analysis issues found by dart linter Shan Shaji
2026-03-06 14:35 ` [PATCH proxmox_login_manager 1/1] cleanup: replace use of deprecated props and fix dart analyze issues Shan Shaji
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.