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

@@ -10,9 +10,9 @@ import 'package:fcs/pages/main/util.dart';
typedef void ProfileCallback();
class TotalWeightEdit extends StatefulWidget {
final double totalWeight;
final double? totalWeight;
const TotalWeightEdit({Key key, this.totalWeight}) : super(key: key);
const TotalWeightEdit({Key? key, this.totalWeight}) : super(key: key);
@override
_TotalWeightEditState createState() => _TotalWeightEditState();
}
@@ -24,7 +24,7 @@ class _TotalWeightEditState extends State<TotalWeightEdit> {
@override
void initState() {
super.initState();
totalController.text = widget.totalWeight.toStringAsFixed(2);
totalController.text = widget.totalWeight!.toStringAsFixed(2);
}
@override