×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Text
Posted by: JORGE ALCALA
Added: Mar 24, 2021 4:03 PM
Views: 4516
Tags: no tags
  1.   Widget menuItem() {
  2.     return InkWell(
  3.       onTap: (){
  4.         setState(() {
  5.           _agregarPoder = true;
  6.           _funcionesMostrar = false;
  7.         });
  8.       },
  9.       child: Container(
  10.           constraints: BoxConstraints.expand(),
  11.           color: Color.fromRGBO(20, 20, 20, 0.3),
  12.           child: Align(
  13.             alignment: Alignment.bottomRight,
  14.             child: ListView(
  15.               padding: EdgeInsets.all(0.0),
  16.               shrinkWrap: true,
  17.               children: [
  18.                 Visibility(visible: true,child: mnuDocumentos()),
  19.                 Visibility(visible: general.hasCredencial('06R04'),child: mnuDirecciones()),
  20.                 Visibility(visible: general.hasCredencial('06R02') && _eliminarPoder,child: mnuEliminar()),
  21.               ],
  22.             ),
  23.           )
  24.       ),
  25.     );
  26.   }
  27.   ///
  28.   Widget mnuEliminar(){
  29.     return TextButton(
  30.       style: TextButton.styleFrom(
  31.         primary: Colors.white,
  32.         backgroundColor: iaColor2,
  33.         onSurface: Colors.grey,
  34.       ),
  35.       onPressed: () {
  36.         _eliminar();
  37.       },
  38.  
  39.       child: Align(
  40.         alignment: Alignment.centerLeft,
  41.         child: Text(general.n('Eliminar'),
  42.         ),
  43.       ),
  44.     );
  45.   }
  46.   ///
  47.   Widget mnuDocumentos(){
  48.     return TextButton(
  49.       style: TextButton.styleFrom(
  50.         primary: Colors.white,
  51.         backgroundColor: iaColor2,
  52.         onSurface: Colors.grey,
  53.       ),
  54.       onPressed: () {
  55.  
  56.       },
  57.  
  58.       child: Align(
  59.         alignment: Alignment.centerLeft,
  60.         child: Text(general.n('Documentos'),
  61.         ),
  62.       ),
  63.     );
  64.   }
  65.   ///
  66.   Widget mnuDirecciones(){
  67.     return TextButton(
  68.       style: TextButton.styleFrom(
  69.         primary: Colors.white,
  70.         backgroundColor: iaColor2,
  71.         onSurface: Colors.grey,
  72.       ),
  73.       onPressed: () {
  74.  
  75.       },
  76.       child: Align(
  77.         alignment: Alignment.centerLeft,
  78.         child: Text(general.n('Direcciones'),
  79.         ),
  80.       ),
  81.     );
  82.   }
  83.