phase3: nullfix.py batch script — bang/late/param-nullable
Automated null-safety fixes driven by dart analyze (no corruption): - unchecked_use_of_nullable_value: insert '!' on receiver (property/method/[]/op) - not_initialized field/var: mark 'late' - missing_default_value_for_parameter: nullable param Errors: 2374(peak) -> 907
This commit is contained in:
@@ -26,10 +26,10 @@ class DesktopSetPasswordState extends State<DesktopSetPassword> {
|
||||
final passwordController = TextEditingController();
|
||||
final passwordAgainController = TextEditingController();
|
||||
|
||||
bool passwordVisible;
|
||||
bool passwordAgainVisible;
|
||||
late bool passwordVisible;
|
||||
late bool passwordAgainVisible;
|
||||
|
||||
bool canReset;
|
||||
late bool canReset;
|
||||
|
||||
double sideSpace = 0;
|
||||
double mainSpace = 1200;
|
||||
@@ -93,7 +93,7 @@ class DesktopSetPasswordState extends State<DesktopSetPassword> {
|
||||
fontSize: 18.0
|
||||
),
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
if (value!.trim().isEmpty) {
|
||||
return S.of(context).password_is_required;
|
||||
}
|
||||
return null;
|
||||
@@ -147,10 +147,10 @@ class DesktopSetPasswordState extends State<DesktopSetPassword> {
|
||||
fontSize: 18.0
|
||||
),
|
||||
validator: (String? value) {
|
||||
if (value.trim().isEmpty) {
|
||||
if (value!.trim().isEmpty) {
|
||||
return S.of(context).password_is_required;
|
||||
}
|
||||
if (value.trim() != passwordController.text.trim()) {
|
||||
if (value!.trim() != passwordController.text.trim()) {
|
||||
return S.of(context).password_is_not_match_password_again;
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user