null safety

This commit is contained in:
phyothandar
2021-09-10 15:22:11 +06:30
parent 51a5fe0740
commit c90661b262
24 changed files with 194 additions and 193 deletions

View File

@@ -53,7 +53,8 @@ class DiscountDropdown<T> extends StatelessWidget {
items: values!.map<DropdownMenuItem<T>>((T value) {
return DropdownMenuItem<T>(
value: value,
child: Text(value == null ? "" : (value as Discount).code,
child: Text(
value == null ? "" : (value as Discount).code!,
overflow: TextOverflow.ellipsis,
style: TextStyle(color: primaryColor)),
);