phase3: nullfix field-formal field-nullable handler. 907 -> 872
This commit is contained in:
@@ -12,8 +12,8 @@ import '../../widgets/general/show_price.dart';
|
||||
import '../../widgets/general/style.dart';
|
||||
|
||||
class MobileProductItem extends StatefulWidget {
|
||||
final Product product;
|
||||
final Business business;
|
||||
final Product? product;
|
||||
final Business? business;
|
||||
|
||||
MobileProductItem({this.product, this.business, Key? key})
|
||||
: super(key: key);
|
||||
@@ -49,7 +49,7 @@ class MobileProductItemState extends State<MobileProductItem> {
|
||||
width: 80.0,
|
||||
height: 80.0,
|
||||
child: GestureDetector(
|
||||
child: Util.showImage('${widget.product.imagePath}',
|
||||
child: Util.showImage('${widget.product!.imagePath}',
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
onTap: (){
|
||||
@@ -65,7 +65,7 @@ class MobileProductItemState extends State<MobileProductItem> {
|
||||
Container(
|
||||
child: GestureDetector(
|
||||
child: Text(
|
||||
'${widget.product.name}',
|
||||
'${widget.product!.name}',
|
||||
// overflow: kIsWeb ? null : TextOverflow.ellipsis,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 2,
|
||||
@@ -80,7 +80,7 @@ class MobileProductItemState extends State<MobileProductItem> {
|
||||
),
|
||||
),
|
||||
new Text(
|
||||
widget.product.description,
|
||||
widget.product!.description,
|
||||
// overflow: kIsWeb ? null : TextOverflow.ellipsis,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 2,
|
||||
@@ -96,9 +96,9 @@ class MobileProductItemState extends State<MobileProductItem> {
|
||||
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
|
||||
),
|
||||
@@ -110,8 +110,8 @@ class MobileProductItemState extends State<MobileProductItem> {
|
||||
textBaseline: TextBaseline.alphabetic,
|
||||
children: <Widget>[
|
||||
ShowPrice(
|
||||
widget.product.price,
|
||||
regularPrice: widget.product.regularPrice,
|
||||
widget.product!.price,
|
||||
regularPrice: widget.product!.regularPrice,
|
||||
currencySign: '\$',
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user