null safety

This commit is contained in:
phyothandar
2021-09-10 16:48:21 +06:30
parent 03c5fc5016
commit bb4f4ad7c2
40 changed files with 393 additions and 352 deletions

View File

@@ -2,15 +2,15 @@ import 'package:fcs/domain/entities/shipment.dart';
import 'package:fcs/helpers/theme.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:flutter_icons_null_safety/flutter_icons_null_safety.dart';
import '../main/util.dart';
import 'shipment_info.dart';
class ShipmentListRow extends StatelessWidget {
final Shipment shipment;
final bool isCustomer;
const ShipmentListRow({Key key, this.shipment, this.isCustomer})
final Shipment? shipment;
final bool? isCustomer;
const ShipmentListRow({Key? key, this.shipment, this.isCustomer})
: super(key: key);
@override
@@ -45,7 +45,7 @@ class ShipmentListRow extends StatelessWidget {
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: new Text(
shipment.shipmentNumber ?? "",
shipment!.shipmentNumber ?? "",
style: new TextStyle(
fontSize: 15.0, color: Colors.black),
),
@@ -69,7 +69,7 @@ class ShipmentListRow extends StatelessWidget {
children: <Widget>[
Padding(
padding: const EdgeInsets.all(0),
child: getStatus(shipment.status ?? ""),
child: getStatus(shipment!.status ?? ""),
),
// Padding(
// padding: const EdgeInsets.only(left: 8.0, top: 5, bottom: 5),