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:
@@ -35,7 +35,7 @@ class DesktopContactUsState extends State<DesktopContactUs> {
|
||||
String mapUrl = 'https://goo.gl/maps/M365MF5AW35n9ij67';
|
||||
|
||||
Completer<GoogleMapController> _controller = Completer();
|
||||
LatLng _lastMapPosition;
|
||||
late LatLng _lastMapPosition;
|
||||
final Set<Marker> _markers = {};
|
||||
final Set<Polyline> _polyLine = {};
|
||||
|
||||
@@ -253,16 +253,16 @@ class DesktopContactUsState extends State<DesktopContactUs> {
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 16, right: 16, top: 4, bottom: 4),
|
||||
child: Text(
|
||||
'${widget.business.address.addressLine1}',
|
||||
'${widget.business.address!.addressLine1}',
|
||||
),
|
||||
)
|
||||
);
|
||||
if (widget.business.address.addressLine2 != null && widget.business.address.addressLine2.isNotEmpty) {
|
||||
if (widget.business.address!.addressLine2 != null && widget.business.address!.addressLine2!.isNotEmpty) {
|
||||
col.children.add(
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 16, right: 16, top: 4, bottom: 4),
|
||||
child: Text(
|
||||
'${widget.business.address.addressLine2}',
|
||||
'${widget.business.address!.addressLine2}',
|
||||
),
|
||||
)
|
||||
);
|
||||
@@ -271,7 +271,7 @@ class DesktopContactUsState extends State<DesktopContactUs> {
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 16, right: 16, top: 4, bottom: 4),
|
||||
child: Text(
|
||||
'${widget.business.address.city}, ${widget.business.address.state}',
|
||||
'${widget.business.address!.city}, ${widget.business.address!.state}',
|
||||
),
|
||||
)
|
||||
);
|
||||
@@ -279,7 +279,7 @@ class DesktopContactUsState extends State<DesktopContactUs> {
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 16, right: 16, top: 4, bottom: 4),
|
||||
child: Text(
|
||||
'${widget.business.address.country}, ${widget.business.address.zip}',
|
||||
'${widget.business.address!.country}, ${widget.business.address!.zip}',
|
||||
),
|
||||
)
|
||||
);
|
||||
@@ -287,8 +287,8 @@ class DesktopContactUsState extends State<DesktopContactUs> {
|
||||
_markers.clear();
|
||||
_markers.add(Marker(
|
||||
markerId: MarkerId('shop_position'),
|
||||
position: LatLng(double.parse(widget.business.address.lat),
|
||||
double.parse(widget.business.address.lng)),
|
||||
position: LatLng(double.parse(widget.business.address!.lat),
|
||||
double.parse(widget.business.address!.lng)),
|
||||
infoWindow: InfoWindow(
|
||||
title: S
|
||||
.of(context)
|
||||
@@ -304,8 +304,8 @@ class DesktopContactUsState extends State<DesktopContactUs> {
|
||||
onMapCreated: _onMapCreated,
|
||||
initialCameraPosition: CameraPosition(
|
||||
target: LatLng(
|
||||
double.parse(widget.business.address.lat),
|
||||
double.parse(widget.business.address.lng)),
|
||||
double.parse(widget.business.address!.lat),
|
||||
double.parse(widget.business.address!.lng)),
|
||||
zoom: 14.0,
|
||||
),
|
||||
onCameraMove: _onCameraMove,
|
||||
|
||||
Reference in New Issue
Block a user