fix(runtime): 37 late fields with == null checks were wrongly migrated -> nullable. Fixes LateInitializationError crashes on page navigation (shop/checkout/comment/data pages)
This commit is contained in:
@@ -28,7 +28,7 @@ class DesktopViewBlog extends StatefulWidget {
|
||||
}
|
||||
|
||||
class DesktopViewBlogState extends State<DesktopViewBlog> {
|
||||
late Blog blog;
|
||||
Blog? blog;
|
||||
|
||||
double sideSpace = 0;
|
||||
double mainSpace = 1200;
|
||||
@@ -97,7 +97,7 @@ class DesktopViewBlogState extends State<DesktopViewBlog> {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
'${blog.title}',
|
||||
'${blog!.title}',
|
||||
style: TextStyle(
|
||||
fontSize: 24.0,
|
||||
color: Colors.black
|
||||
@@ -105,7 +105,7 @@ class DesktopViewBlogState extends State<DesktopViewBlog> {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
Utils.utcDatetimeStringToLocalDatetimeString(context, blog.createdAt!),
|
||||
Utils.utcDatetimeStringToLocalDatetimeString(context, blog!.createdAt!),
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
color: Colors.black38,
|
||||
@@ -119,7 +119,7 @@ class DesktopViewBlogState extends State<DesktopViewBlog> {
|
||||
padding: EdgeInsets.only(top: 8.0, left: 16.0, right: 16.0, bottom: 24.0),
|
||||
child: Container(
|
||||
child: Text(
|
||||
'${blog.body}',
|
||||
'${blog!.body}',
|
||||
style: TextStyle(
|
||||
color: Colors.black87,
|
||||
fontSize: 17.0,
|
||||
@@ -169,12 +169,12 @@ class DesktopViewBlogState extends State<DesktopViewBlog> {
|
||||
width: mainSpace / 2,
|
||||
margin: EdgeInsets.only(top: 16.0, bottom: 16.0),
|
||||
padding: EdgeInsets.all(10.0),
|
||||
child: (blog.imageUrl == null) ?
|
||||
child: (blog!.imageUrl == null) ?
|
||||
SizedBox.shrink()
|
||||
: Container(
|
||||
width: mainSpace / 2 - 100.0,
|
||||
height: mainSpace / 2 - 100.0,
|
||||
child: Util.showImage('https:${blog.imageUrl}'),
|
||||
child: Util.showImage('https:${blog!.imageUrl}'),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user