Untitled

mail@pastecode.io avatar
unknown
dart
2 years ago
766 B
2
Indexable
Never
void selectContragent() async {
    final res = await Navigator.push(
      context,
      MaterialPageRoute(builder: (context) => const ContragentList()),
    );
    final ContragentsBloc bloc = BlocProvider.of<ContragentsBloc>(context);
    bloc.add(ContragentsLoadEvent());
    if (res != null) {
      setState(() {
        selectedContragentData = jsonDecode(res.my_contragent_data);
        selectedContragent = res;
      });
      bank.text = "${selectedContragentData['mfo']} - ${banksMFO[selectedContragentData['mfo'].toString()]}";
      bill.text = selectedContragentData['account'];
    }
  }


InkWell(
onTap: () async {
  selectContragent();
},
child: Icon(Icons.edit_note),
),


onTap: (){
Navigator.pop(context, item);
},