null safety

This commit is contained in:
phyothandar
2021-09-10 12:00:08 +06:30
parent a144c945b6
commit 5e672937b5
67 changed files with 901 additions and 896 deletions

View File

@@ -3,13 +3,13 @@ import 'package:fcs/helpers/theme.dart';
import 'package:fcs/pages/main/util.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:flutter_vector_icons/flutter_vector_icons.dart';
import 'package:intl/intl.dart';
import 'carton_info.dart';
class CartonListRow extends StatelessWidget {
final Carton box;
CartonListRow({Key key, this.box}) : super(key: key);
final Carton? box;
CartonListRow({Key? key, this.box}) : super(key: key);
final double dotSize = 15.0;
final DateFormat dateFormat = new DateFormat("dd MMM yyyy");
@@ -47,7 +47,7 @@ class CartonListRow extends StatelessWidget {
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: new Text(
box.cartonNumber ?? "",
box!.cartonNumber ,
style: new TextStyle(
fontSize: 15.0, color: Colors.black),
),
@@ -55,7 +55,7 @@ class CartonListRow extends StatelessWidget {
Padding(
padding: const EdgeInsets.only(left: 10.0, top: 10),
child: new Text(
box.userName ?? "",
box!.userName,
style: new TextStyle(
fontSize: 15.0, color: Colors.grey),
),
@@ -71,14 +71,14 @@ class CartonListRow extends StatelessWidget {
children: <Widget>[
Padding(
padding: const EdgeInsets.all(0),
child: getStatus(box.status == null ? "" : box.status),
child: getStatus(box!.status == null ? "" : box!.status),
),
Padding(
padding: const EdgeInsets.only(left: 8.0, top: 5, bottom: 5),
child: Row(
children: <Widget>[
new Text(
"${box.cartonWeight?.toStringAsFixed(2) ?? ''} lb",
"${box!.cartonWeight.toStringAsFixed(2)} lb",
style:
new TextStyle(fontSize: 15.0, color: Colors.grey),
),