phase3: nullfix field-formal field-nullable handler. 907 -> 872
This commit is contained in:
@@ -13,8 +13,8 @@ import '../../widgets/general/style.dart';
|
||||
import 'desktop_product_detail_page.dart';
|
||||
|
||||
class DesktopProductItem extends StatefulWidget {
|
||||
final Product product;
|
||||
final Business business;
|
||||
final Product? product;
|
||||
final Business? business;
|
||||
final bool horizontal;
|
||||
|
||||
DesktopProductItem({this.product, this.business, Key? key, this.horizontal = false})
|
||||
@@ -60,7 +60,7 @@ class DesktopProductItemState extends State<DesktopProductItem> {
|
||||
width: 110.0,
|
||||
height: 110.0,
|
||||
child: GestureDetector(
|
||||
child: Util.showImage('${widget.product.imagePath}',
|
||||
child: Util.showImage('${widget.product!.imagePath}',
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
onTap: (){
|
||||
@@ -76,7 +76,7 @@ class DesktopProductItemState extends State<DesktopProductItem> {
|
||||
Container(
|
||||
child: GestureDetector(
|
||||
child: Text(
|
||||
'${widget.product.name}',
|
||||
'${widget.product!.name}',
|
||||
// overflow: kIsWeb ? null : TextOverflow.ellipsis,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 2,
|
||||
@@ -91,7 +91,7 @@ class DesktopProductItemState extends State<DesktopProductItem> {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
widget.product.description,
|
||||
widget.product!.description,
|
||||
// overflow: kIsWeb ? null : TextOverflow.ellipsis,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 2,
|
||||
@@ -107,17 +107,17 @@ class DesktopProductItemState extends State<DesktopProductItem> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
new Container(
|
||||
child: widget.business.showMonthlySold ?
|
||||
child: widget.business!.showMonthlySold ?
|
||||
Text(
|
||||
S.of(context).sold_per_month_token(widget.product.monthSales!.toStringAsFixed(0)),
|
||||
S.of(context).sold_per_month_token(widget.product!.monthSales!.toStringAsFixed(0)),
|
||||
style: new TextStyle(
|
||||
fontSize: 9.0
|
||||
),
|
||||
) : SizedBox.shrink(),
|
||||
),
|
||||
ShowPrice(
|
||||
widget.product.price,
|
||||
regularPrice: widget.product.regularPrice,
|
||||
widget.product!.price,
|
||||
regularPrice: widget.product!.regularPrice,
|
||||
currencySign: '\$',
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
@@ -142,7 +142,7 @@ class DesktopProductItemState extends State<DesktopProductItem> {
|
||||
width: 110.0,
|
||||
height: 110.0,
|
||||
child: GestureDetector(
|
||||
child: Util.showImage('${widget.product.imagePath}',
|
||||
child: Util.showImage('${widget.product!.imagePath}',
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
onTap: (){
|
||||
@@ -158,7 +158,7 @@ class DesktopProductItemState extends State<DesktopProductItem> {
|
||||
Container(
|
||||
child: GestureDetector(
|
||||
child: Text(
|
||||
'${widget.product.name}',
|
||||
'${widget.product!.name}',
|
||||
// overflow: kIsWeb ? null : TextOverflow.ellipsis,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 2,
|
||||
@@ -174,7 +174,7 @@ class DesktopProductItemState extends State<DesktopProductItem> {
|
||||
),
|
||||
Container(
|
||||
child: Text(
|
||||
widget.product.description,
|
||||
widget.product!.description,
|
||||
// overflow: kIsWeb ? null : TextOverflow.ellipsis,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 2,
|
||||
@@ -191,17 +191,17 @@ class DesktopProductItemState extends State<DesktopProductItem> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
new Container(
|
||||
child: widget.business.showMonthlySold ?
|
||||
child: widget.business!.showMonthlySold ?
|
||||
Text(
|
||||
S.of(context).sold_per_month_token(widget.product.monthSales!.toStringAsFixed(0)),
|
||||
S.of(context).sold_per_month_token(widget.product!.monthSales!.toStringAsFixed(0)),
|
||||
style: new TextStyle(
|
||||
fontSize: 9.0
|
||||
),
|
||||
) : SizedBox.shrink(),
|
||||
),
|
||||
ShowPrice(
|
||||
widget.product.price,
|
||||
regularPrice: widget.product.regularPrice,
|
||||
widget.product!.price,
|
||||
regularPrice: widget.product!.regularPrice,
|
||||
currencySign: '\$',
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user