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:
2026-07-25 18:13:01 +08:00
parent 8f3d3509ea
commit fce670664b
99 changed files with 1013 additions and 838 deletions

View File

@@ -30,7 +30,7 @@ class BuyService extends StatefulWidget {
}
class BuyServiceState extends State<BuyService> {
Map<String, dynamic> data;
late Map<String, dynamic> data;
@override
Widget build(BuildContext context) {

View File

@@ -22,7 +22,7 @@ class ContactUs extends StatefulWidget {
}
class ContactUsState extends State<ContactUs> {
Business business;
late Business business;
@override
Widget build(BuildContext context) {

View File

@@ -30,7 +30,7 @@ class Download extends StatefulWidget {
class DownloadState extends State<Download> {
final _scaffoldKey = GlobalKey<ScaffoldState>();
Map<String, dynamic> data;
late Map<String, dynamic> data;
@override
Widget build(BuildContext context) {
@@ -79,7 +79,7 @@ class DownloadState extends State<Download> {
super.initState();
eventBus.on<OpenDrawer>().listen((event) {
if (mounted) {
_scaffoldKey.currentState.openDrawer();
_scaffoldKey.currentState!.openDrawer();
}
});
_loadData();

View File

@@ -26,7 +26,7 @@ class IGoShowLearnMore extends StatefulWidget {
class IGoShowLearnMoreState extends State<IGoShowLearnMore> {
final _scaffoldKey = GlobalKey<ScaffoldState>();
Map<String, dynamic> data;
late Map<String, dynamic> data;
@override
Widget build(BuildContext context) {

View File

@@ -26,7 +26,7 @@ class MiniPosLearnMore extends StatefulWidget {
class MiniPosLearnMoreState extends State<MiniPosLearnMore> {
final _scaffoldKey = GlobalKey<ScaffoldState>();
Map<String, dynamic> data;
late Map<String, dynamic> data;
@override
Widget build(BuildContext context) {

View File

@@ -23,7 +23,7 @@ class PlainPage extends StatefulWidget {
}
class PlainPageState extends State<PlainPage> {
Blog blog;
late Blog blog;
@override
Widget build(BuildContext context) {

View File

@@ -25,7 +25,7 @@ class RenewMiniOffice extends StatefulWidget {
}
class RenewMiniOfficeState extends State<RenewMiniOffice> {
Map<String, dynamic> data;
late Map<String, dynamic> data;
@override
Widget build(BuildContext context) {