Advertisement
nio74

Untitled

Dec 19th, 2022
1,089
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 28.71 KB | None | 0 0
  1. class InsertRepairPage extends StatefulWidget {
  2.   const InsertRepairPage({Key? key}) : super(key: key);
  3.  
  4.   @override
  5.   State<InsertRepairPage> createState() => _InsertRepairPageState();
  6. }
  7.  
  8. class _InsertRepairPageState extends State<InsertRepairPage> {
  9.   final textControllerCode = TextEditingController();
  10.   final textControllerCustomer = TextEditingController();
  11.   final textControllerDataAcc = TextEditingController();
  12.   final textControllerDataCons = TextEditingController();
  13.   final textControllerUser = TextEditingController();
  14.   final textControllerTechnician = TextEditingController();
  15.   final textControllerObjects = TextEditingController();
  16.   final textControllerToDoWorks = TextEditingController();
  17.   final textControllerPcosto = TextEditingController();
  18.   final textControllerRicambio1 = TextEditingController();
  19.   final textControllerRicambio2 = TextEditingController();
  20.   final textControllerRicambio3 = TextEditingController();
  21.   final textControllerNote = TextEditingController();
  22.   final textControllerPPubblico = TextEditingController();
  23.  
  24.   final DateTime _date = DateTime.now();
  25.   final _formKeyScreen = GlobalKey<FormState>();
  26.   XFile? picture;
  27.   final bool _inWarranty = false;
  28.   bool _formValid = false;
  29.  
  30.   @override
  31.   void initState() {
  32.     _codeRetrieve(context);
  33.     BlocProvider.of<CustomerBloc>(context).add(CustomerEventInit());
  34.     BlocProvider.of<UserCubit>(context).getAlluser();
  35.     BlocProvider.of<TechnicianCubit>(context).getAlltechnician();
  36.     picture = context.read();
  37.     textControllerDataAcc.text = DateFormat('dd-MM-yyyy').format(_date);
  38.     super.initState();
  39.   }
  40.  
  41.   @override
  42.   void dispose() {
  43.     textControllerCode.dispose();
  44.     textControllerCustomer.dispose();
  45.     textControllerDataAcc.dispose();
  46.     textControllerDataCons.dispose();
  47.     textControllerUser.dispose();
  48.     textControllerTechnician.dispose();
  49.     textControllerObjects.dispose();
  50.     textControllerToDoWorks.dispose();
  51.     textControllerPcosto.dispose();
  52.     textControllerRicambio1.dispose();
  53.     textControllerRicambio2.dispose();
  54.     textControllerRicambio3.dispose();
  55.     textControllerNote.dispose();
  56.     textControllerPPubblico.dispose();
  57.     BlocProvider.of<CustomerBloc>(context).add(CustomerEventInit());
  58.  
  59.     super.dispose();
  60.   }
  61.  
  62.   @override
  63.   Widget build(BuildContext context) {
  64.     double h = MediaQuery.of(context).size.height;
  65.     double w = MediaQuery.of(context).size.width;
  66.     return Scaffold(
  67.       body: Form(
  68.         key: _formKeyScreen,
  69.         onChanged: (() {
  70.           final isValid = _formKeyScreen.currentState?.validate() ?? false;
  71.           setState(() {
  72.             _formValid = isValid;
  73.           });
  74.         }),
  75.         child: Padding(
  76.           padding: const EdgeInsets.all(8.0),
  77.           child: Column(
  78.             children: [
  79.               SizedBox(height: h * 0.01),
  80.               Text(
  81.                 'INSERIMENTO RIPARAZIONE',
  82.                 style: Theme.of(context).textTheme.headline2,
  83.               ),
  84.               SizedBox(height: h * 0.01),
  85.               Padding(
  86.                 padding: const EdgeInsets.all(8.0),
  87.                 child: Row(children: [
  88.                   Expanded(
  89.                     flex: 2,
  90.                     child: Column(
  91.                       children: [
  92.                         Card(
  93.                             color: Theme.of(context).colorScheme.secondary,
  94.                             child: Padding(
  95.                               padding: const EdgeInsets.all(8.0),
  96.                               child: Column(
  97.                                 children: [
  98.                                   SizedBox(
  99.                                     height: h * 0.03,
  100.                                   ),
  101.                                   Row(
  102.                                     mainAxisAlignment: MainAxisAlignment.center,
  103.                                     crossAxisAlignment:
  104.                                         CrossAxisAlignment.center,
  105.                                     children: [
  106.                                       SizedBox(
  107.                                         height: h * 0.1,
  108.                                         width: w * 0.08,
  109.                                         child: CustomTextFormField(
  110.                                           txtLable: 'Codice Riparazione',
  111.                                           enable: false,
  112.                                           controller: textControllerCode,
  113.                                         ),
  114.                                       ),
  115.                                       SizedBox(
  116.                                         width: w * 0.03,
  117.                                       ),
  118.                                       SizedBox(
  119.                                         height: h * 0.1,
  120.                                         width: w * 0.12,
  121.                                         child: customTextFieldAutocCustomer(
  122.                                             context),
  123.                                       ),
  124.                                     ],
  125.                                   ),
  126.                                   SizedBox(
  127.                                     height: h * 0.03,
  128.                                   ),
  129.                                   Container(
  130.                                     padding: const EdgeInsets.all(10.0),
  131.                                     decoration: BoxDecoration(
  132.                                       borderRadius: const BorderRadius.all(
  133.                                           Radius.circular(5)),
  134.                                       border: Border.all(
  135.                                           color: Colors.pink.shade50),
  136.                                     ),
  137.                                     child: Row(
  138.                                       crossAxisAlignment:
  139.                                           CrossAxisAlignment.center,
  140.                                       mainAxisAlignment:
  141.                                           MainAxisAlignment.center,
  142.                                       children: [
  143.                                         Column(
  144.                                           crossAxisAlignment:
  145.                                               CrossAxisAlignment.center,
  146.                                           children: [
  147.                                             SizedBox(
  148.                                               height: h * 0.001,
  149.                                             ),
  150.                                             SizedBox(
  151.                                               height: h * 0.01,
  152.                                             ),
  153.                                             SizedBox(
  154.                                               height: h * 0.08,
  155.                                               width: w * 0.11,
  156.                                               child: DateWidget(
  157.                                                   controller:
  158.                                                       textControllerDataAcc,
  159.                                                   label: 'Accettazione'),
  160.                                             ),
  161.                                             SizedBox(
  162.                                               height: h * 0.03,
  163.                                             ),
  164.                                             SizedBox(
  165.                                                 height: h * 0.06,
  166.                                                 width: w * 0.11,
  167.                                                 child: DateWidget(
  168.                                                   controller:
  169.                                                       textControllerDataCons,
  170.                                                   label: 'Consegna',
  171.                                                 )),
  172.                                             SizedBox(
  173.                                               height: h * 0.03,
  174.                                             ),
  175.                                             SizedBox(
  176.                                                 height: h * 0.09,
  177.                                                 width: w * 0.11,
  178.                                                 child: customTextFieldAutocUser(
  179.                                                     context)),
  180.                                             SizedBox(
  181.                                               height: h * 0.09,
  182.                                               width: w * 0.11,
  183.                                               child:
  184.                                                   customButtonDropDownTechnician(
  185.                                                       context, h),
  186.                                             ),
  187.                                             SizedBox(
  188.                                               height: h * 0.03,
  189.                                               //width: w * 0.11,
  190.                                               child: Text(
  191.                                                 'Garanzia',
  192.                                                 style: Theme.of(context)
  193.                                                     .textTheme
  194.                                                     .headline5,
  195.                                               ),
  196.                                             ),
  197.                                             WarantyOrNot(
  198.                                                 w: w,
  199.                                                 h: h,
  200.                                                 warranty: _inWarranty),
  201.                                           ],
  202.                                         ),
  203.                                         Padding(
  204.                                           padding: const EdgeInsets.fromLTRB(
  205.                                               15, 20, 0, 0),
  206.                                           child: Column(
  207.                                               mainAxisAlignment:
  208.                                                   MainAxisAlignment.center,
  209.                                               crossAxisAlignment:
  210.                                                   CrossAxisAlignment.center,
  211.                                               children: [
  212.                                                 SizedBox(
  213.                                                   height: h * 0.35,
  214.                                                   width: w * 0.20,
  215.                                                   child: Card(
  216.                                                     semanticContainer: true,
  217.                                                     clipBehavior: Clip
  218.                                                         .antiAliasWithSaveLayer,
  219.                                                     shape:
  220.                                                         RoundedRectangleBorder(
  221.                                                       borderRadius:
  222.                                                           BorderRadius.circular(
  223.                                                               10.0),
  224.                                                     ),
  225.                                                     elevation: 5,
  226.                                                     margin:
  227.                                                         const EdgeInsets.all(
  228.                                                             10),
  229.                                                     child: picture != null
  230.                                                         ? Image.file(
  231.                                                             File(picture!.path))
  232.                                                         : const SizedBox
  233.                                                             .shrink(),
  234.                                                   ),
  235.                                                 ),
  236.                                                 SizedBox(
  237.                                                   height: h * 0.03,
  238.                                                 ),
  239.                                                 //Image.file(File(picture.path), fit: BoxFit.cover, width: 250),
  240.                                                 SizedBox(
  241.                                                   height: h * 0.08,
  242.                                                   width: w * 0.09,
  243.                                                   child:
  244.                                                       _takePhotoButton(context),
  245.                                                 )
  246.                                               ]),
  247.                                         ),
  248.                                       ],
  249.                                     ),
  250.                                   ),
  251.                                   SizedBox(
  252.                                     height: h * 0.05,
  253.                                   ),
  254.                                 ],
  255.                               ),
  256.                             )),
  257.                       ],
  258.                     ),
  259.                   ),
  260.                   Expanded(
  261.                       flex: 2,
  262.                       child: CentralColumn(
  263.                         h: h,
  264.                         w: w,
  265.                         textControllerObjects: textControllerObjects,
  266.                         textControllerToDoWorks: textControllerToDoWorks,
  267.                       )),
  268.                   Expanded(
  269.                       flex: 1,
  270.                       child: RightColumn(
  271.                         h: h,
  272.                         w: w,
  273.                         textControllerPcosto: textControllerPcosto,
  274.                         textControllerRicambio1: textControllerRicambio1,
  275.                         textControllerRicambio2: textControllerRicambio2,
  276.                         textControllerRicambio3: textControllerRicambio3,
  277.                         textControllerNote: textControllerNote,
  278.                         textControllerPPubblico: textControllerPPubblico,
  279.                       ))
  280.                 ]),
  281.               ),
  282.               Card(
  283.                   color: Theme.of(context).colorScheme.secondary,
  284.                   child: Padding(
  285.                       padding: const EdgeInsets.all(8.0),
  286.                       child: Row(
  287.                         mainAxisAlignment: MainAxisAlignment.center,
  288.                         children: [
  289.                           SizedBox(
  290.                             height: h * 0.08,
  291.                             width: w * 0.09,
  292.                             child: _exitButton(context),
  293.                           ),
  294.                           SizedBox(
  295.                             width: w * 0.03,
  296.                           ),
  297.                           SizedBox(
  298.                             height: h * 0.08,
  299.                             width: w * 0.09,
  300.                             child: _saveButton(context),
  301.                           )
  302.                         ],
  303.                       )))
  304.             ],
  305.           ),
  306.         ),
  307.       ),
  308.     );
  309.   }
  310.  
  311.   _codeRetrieve(BuildContext context) async {
  312.     final id_repair = await context.read<RepairRepository>().getIdRepair();
  313.     final int addOne = int.parse(id_repair.id_repair.toString()) + 1;
  314.     textControllerCode.text = addOne.toString();
  315.   }
  316.  
  317.   Widget _takePhotoButton(
  318.     BuildContext context, {
  319.     bool loading = false,
  320.   }) {
  321.     return SizedBox(
  322.       child: ElevatedButton(
  323.           style: ElevatedButton.styleFrom(
  324.               shape: RoundedRectangleBorder(
  325.                   borderRadius: BorderRadius.circular(12))),
  326.           onPressed: () => _navigationCamera(context),
  327.           child: const Text(
  328.             'Foto',
  329.             style: TextStyle(
  330.                 fontSize: 19, fontFamily: 'PT Serif', color: Colors.white),
  331.           )),
  332.     );
  333.   }
  334.  
  335.   Widget _saveButton(
  336.     BuildContext context, {
  337.     bool loading = false,
  338.   }) {
  339.     double h = MediaQuery.of(context).size.height;
  340.     double w = MediaQuery.of(context).size.width;
  341.  
  342.     return SizedBox(
  343.       height: h * 0.10,
  344.       width: w * 0.15,
  345.       child: ElevatedButton(
  346.         style: ElevatedButton.styleFrom(
  347.             shape: RoundedRectangleBorder(
  348.                 borderRadius: BorderRadius.circular(12))),
  349.         onPressed: _formValid
  350.             ? () {
  351.                 //_saveUpdateData(context);
  352.                 //_cleanTextField();
  353.  
  354.                 //     _formKeyScreen.currentState?.reset();
  355.               }
  356.             : null,
  357.         child: !loading
  358.             ? const Text(
  359.                 'Salva',
  360.                 style: TextStyle(
  361.                     fontSize: 30, fontFamily: 'PT Serif', color: Colors.white),
  362.               )
  363.             : SizedBox(
  364.                 height: h * 0.15,
  365.                 width: w * 10,
  366.                 child: const CircularProgressIndicator(color: Colors.white),
  367.               ),
  368.       ),
  369.     );
  370.   }
  371.  
  372.   _exitButton(
  373.     BuildContext context, {
  374.     bool loading = false,
  375.   }) {
  376.     double h = MediaQuery.of(context).size.height;
  377.     double w = MediaQuery.of(context).size.width;
  378.     return SizedBox(
  379.       height: h * 0.10,
  380.       width: w * 0.15,
  381.       child: ElevatedButton(
  382.         style: ElevatedButton.styleFrom(
  383.             shape: RoundedRectangleBorder(
  384.                 borderRadius: BorderRadius.circular(12))),
  385.         onPressed: (() {
  386.           Get.back();
  387.           //BlocProvider.of<CustomerBloc>(context).add(CustomerEventInit());
  388.         }),
  389.         child: !loading
  390.             ? const Text(
  391.                 'Esci',
  392.                 style: TextStyle(
  393.                     fontSize: 30, fontFamily: 'PT Serif', color: Colors.white),
  394.               )
  395.             : SizedBox(
  396.                 height: h * 0.15,
  397.                 width: w * 10,
  398.                 child: const CircularProgressIndicator(color: Colors.white),
  399.               ),
  400.       ),
  401.     );
  402.   }
  403.  
  404.   customTextFieldAutocCustomer(BuildContext context) {
  405.     return BlocBuilder<CustomerBloc, CustomerState>(
  406.       builder: (context, state) {
  407.         if (state is CustomerLoadingState) {
  408.           return const Center(
  409.             child: CircularProgressIndicator(),
  410.           );
  411.         }
  412.         if (state is CustomerGetAllLoadedState) {
  413.           return EasyAutocomplete(
  414.               controller: textControllerCustomer,
  415.               //initialValue: '',
  416.               decoration: InputDecoration(
  417.                   //errorText: _errorText(),
  418.                   label: const Text('Cliente'),
  419.                   contentPadding:
  420.                       const EdgeInsets.symmetric(vertical: 0, horizontal: 10),
  421.                   focusedBorder: OutlineInputBorder(
  422.                       borderRadius: BorderRadius.circular(5),
  423.                       borderSide:
  424.                           BorderSide(color: Theme.of(context).primaryColor)),
  425.                   enabledBorder: OutlineInputBorder(
  426.                       borderRadius: BorderRadius.circular(5),
  427.                       borderSide: BorderSide(
  428.                           color: Theme.of(context).primaryColor,
  429.                           style: BorderStyle.solid))),
  430.               suggestionBuilder: (data) {
  431.                 return Container(
  432.                     margin: const EdgeInsets.all(1),
  433.                     padding: const EdgeInsets.all(5),
  434.                     decoration: BoxDecoration(
  435.                         color: Theme.of(context).primaryColor,
  436.                         borderRadius: BorderRadius.circular(5)),
  437.                     child: Text(data,
  438.                         style: Theme.of(context).textTheme.headline3));
  439.               },
  440.               suggestions:
  441.                   state.customers.map((e) => e.name.toString()).toList(),
  442.               //focusNode: _focusNodeId,
  443.               onChanged: (value) {
  444.                 // if (value.length < 3 || _clientController.text.l) {}
  445.                 if (value.length > 3 ||
  446.                     state.customers.map((e) => e.name).contains(value)) {
  447.                   print('il valore  e presente nella lista');
  448.                 }
  449.                 if (value.length > 3 &&
  450.                     !state.customers.map((e) => e.name).contains(value)) {
  451.                   print('il valore non e presente nella lista devi inserirlo');
  452.                   showDialog(
  453.                       context: context,
  454.                       builder: (BuildContext context) => AlertDialog(
  455.                             title: const Text(
  456.                                 'Cliente non trovato vuoi registrarlo?'),
  457.                             actions: [
  458.                               TextButton(
  459.                                   onPressed: () {
  460.                                     Navigator.of(context).pop();
  461.                                     //_ceck = true;
  462.                                   },
  463.                                   child: const Text('NO')),
  464.                               TextButton(
  465.                                   onPressed: (() {
  466.                                     _navigateToClient(context);
  467.                                   }),
  468.                                   child: const Text('SI'))
  469.                             ],
  470.                           ));
  471.                 }
  472.                 //repair.copyWith(nameClient: value);
  473.               });
  474.         } else {
  475.           return const SizedBox();
  476.         }
  477.       },
  478.     );
  479.   }
  480.  
  481.   customTextFieldAutocUser(BuildContext context) {
  482.     return BlocBuilder<UserCubit, UserState>(
  483.       builder: (context, state) {
  484.         if (state is UserLoading) {
  485.           return const Center(
  486.             child: CircularProgressIndicator(),
  487.           );
  488.         }
  489.         if (state is UsersLoaded) {
  490.           return EasyAutocomplete(
  491.               controller: textControllerUser,
  492.               //initialValue: '',
  493.               decoration: InputDecoration(
  494.                   //errorText: _errorText(),
  495.                   label: const Text('Utente'),
  496.                   contentPadding:
  497.                       const EdgeInsets.symmetric(vertical: 0, horizontal: 10),
  498.                   focusedBorder: OutlineInputBorder(
  499.                       borderRadius: BorderRadius.circular(5),
  500.                       borderSide:
  501.                           BorderSide(color: Theme.of(context).primaryColor)),
  502.                   enabledBorder: OutlineInputBorder(
  503.                       borderRadius: BorderRadius.circular(5),
  504.                       borderSide: BorderSide(
  505.                           color: Theme.of(context).primaryColor,
  506.                           style: BorderStyle.solid))),
  507.               suggestionBuilder: (data) {
  508.                 return Container(
  509.                     margin: const EdgeInsets.all(1),
  510.                     padding: const EdgeInsets.all(5),
  511.                     decoration: BoxDecoration(
  512.                         color: Theme.of(context).primaryColor,
  513.                         borderRadius: BorderRadius.circular(5)),
  514.                     child: Text(data,
  515.                         style: Theme.of(context).textTheme.headline3));
  516.               },
  517.               suggestions:
  518.                   state.users.map((e) => e.username.toString()).toList(),
  519.               //focusNode: _focusNodeId,
  520.               onChanged: (value) {
  521.                 // if (value.length < 3 || _clientController.text.l) {}
  522.                 if (value.length > 3 ||
  523.                     state.users.map((e) => e.username).contains(value)) {
  524.                   print('il valore  e presente nella lista');
  525.                 }
  526.  
  527.                 //repair.copyWith(nameClient: value);
  528.               });
  529.         } else {
  530.           return const SizedBox();
  531.         }
  532.       },
  533.     );
  534.   }
  535.  
  536.   customButtonDropDownTechnician(BuildContext context, double h) {
  537.     //final double h;
  538.     return BlocBuilder<TechnicianCubit, TechnicianState>(
  539.       builder: (context, state) {
  540.         if (state is TechnicianLoading) {
  541.           return const Center(
  542.             child: CircularProgressIndicator(),
  543.           );
  544.         }
  545.         if (state is TechnicianLoaded) {
  546.           return DropdownButtonFormField2(
  547.               buttonDecoration: BoxDecoration(
  548.                 borderRadius: BorderRadius.circular(8),
  549.                 border: Border.all(
  550.                   color: Color.fromARGB(66, 59, 106, 181),
  551.                 ),
  552.                 color: Color.fromARGB(255, 240, 249, 251),
  553.               ),
  554.               decoration: InputDecoration(
  555.                   //Add isDense true and zero Padding.
  556.                   //Add Horizontal padding using buttonPadding and Vertical padding by increasing buttonHeight instead of add Padding here so that The whole TextField Button become clickable, and also the dropdown menu open under The whole TextField Button.
  557.                   fillColor: Colors.amber,
  558.                   isDense: true,
  559.                   contentPadding: EdgeInsets.zero,
  560.                   border: OutlineInputBorder(
  561.                     borderRadius: BorderRadius.circular(8),
  562.                   )),
  563.               dropdownDecoration: BoxDecoration(
  564.                   borderRadius: BorderRadius.circular(8),
  565.                   color: Color.fromARGB(255, 175, 212, 231)),
  566.               isExpanded: true,
  567.               hint: const Text(
  568.                 'Tecnico',
  569.                 style: TextStyle(fontSize: 12),
  570.               ),
  571.               icon: const Icon(
  572.                 Icons.arrow_drop_down,
  573.                 color: Colors.black45,
  574.               ),
  575.               iconSize: 30,
  576.               buttonHeight: h * 0.066,
  577.               buttonPadding: const EdgeInsets.only(left: 30, right: 10),
  578.               items: state.technicians
  579.                   .map((item) => DropdownMenuItem<String>(
  580.                         value: item.name,
  581.                         child: Text(
  582.                           item.name,
  583.                           style: const TextStyle(
  584.                             fontSize: 14,
  585.                           ),
  586.                         ),
  587.                       ))
  588.                   .toList(),
  589.               onChanged: (value) {
  590.                 //Do something when changing the item if you want.
  591.               });
  592.           /* EasyAutocomplete(
  593.               controller: textControllerTechnician,
  594.               //initialValue: '',
  595.               decoration: InputDecoration(
  596.                   //errorText: _errorText(),
  597.                   label: const Text('Tecnico'),
  598.                   contentPadding:
  599.                       const EdgeInsets.symmetric(vertical: 0, horizontal: 10),
  600.                   focusedBorder: OutlineInputBorder(
  601.                       borderRadius: BorderRadius.circular(5),
  602.                       borderSide:
  603.                           BorderSide(color: Theme.of(context).primaryColor)),
  604.                   enabledBorder: OutlineInputBorder(
  605.                       borderRadius: BorderRadius.circular(5),
  606.                       borderSide: BorderSide(
  607.                           color: Theme.of(context).primaryColor,
  608.                           style: BorderStyle.solid))),
  609.               suggestionBuilder: (data) {
  610.                 return Container(
  611.                     margin: const EdgeInsets.all(1),
  612.                     padding: const EdgeInsets.all(5),
  613.                     decoration: BoxDecoration(
  614.                         color: Theme.of(context).primaryColor,
  615.                         borderRadius: BorderRadius.circular(5)),
  616.                     child: Text(data,
  617.                         style: Theme.of(context).textTheme.headline3));
  618.               },
  619.               suggestions:
  620.                   state.technicians.map((e) => e.name.toString()).toList(),
  621.               //focusNode: _focusNodeId,
  622.               onChanged: (value) {
  623.                 // if (value.length < 3 || _clientController.text.l) {}
  624.                 if (value.length > 3 ||
  625.                     state.technicians.map((e) => e.name).contains(value)) {
  626.                   print('il valore  e presente nella lista');
  627.                 }
  628.  
  629.                 //repair.copyWith(nameClient: value);
  630.               });
  631.          */
  632.         } else {
  633.           return const SizedBox(
  634.             child: Text('Errore nel caricamento dati'),
  635.           );
  636.         }
  637.       },
  638.     );
  639.   }
  640.  
  641. // method to call camera that return photo from cameraPage
  642.   Future<void> _navigationCamera(BuildContext context) async {
  643.     final result = await availableCameras().then((value) => Navigator.push(
  644.         context,
  645.         MaterialPageRoute(builder: (context) => CameraPage(cameras: value))));
  646.     if (!mounted) return null;
  647.  
  648.     setState(() {
  649.       picture = result;
  650.     });
  651.   }
  652.  
  653.   Future<void> _navigateToClient(BuildContext context) async {
  654.     Navigator.pop(context);
  655.     final result = await Navigator.push(context,
  656.         MaterialPageRoute(builder: ((context) => const CustomerPage())));
  657.     if (result == 'Saved') {
  658.       textControllerCustomer.clear();
  659.       setState(() {
  660.         BlocProvider.of<CustomerBloc>(context).add(CustomerEventInit());
  661.       });
  662.     }
  663.   }
  664. }
  665.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement