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

@@ -24,7 +24,7 @@ class _ProfileCurrencyEditState extends State<ProfileCurrencyEdit> {
void initState() {
super.initState();
MainModel mainModel = Provider.of<MainModel>(context, listen: false);
if (mainModel.user.preferCurrency == "MMK") {
if (mainModel.user!.preferCurrency == "MMK") {
_currency = Currency.MMK;
} else {
_currency = Currency.USD;
@@ -77,7 +77,7 @@ class _ProfileCurrencyEditState extends State<ProfileCurrencyEdit> {
onChanged: (Currency? value) {
if(value != null)
setState(() {
_currency = value!;
_currency = value;
});
},
),
@@ -96,7 +96,7 @@ class _ProfileCurrencyEditState extends State<ProfileCurrencyEdit> {
onChanged: (Currency? value) {
if(value != null)
setState(() {
_currency = value!;
_currency = value;
});
},
),