null safety
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user