×

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:09 PM
Modified: Mar 31, 2021 2:56 PM
Views: 4514
Tags: no tags
  1. import 'package:flutter/material.dart';
  2. import 'package:invent_app/model/general.dart';
  3. import '../general/constantes.dart';
  4.  
  5. class xxxxx extends StatefulWidget {
  6.   // int claProveedor; // es hijo
  7.   // prEdSc({Key key, @required this.claProveedor}) : super(key: key);
  8.   @override
  9.   _yyyyState createState() => _yyyyState();
  10. }
  11.  
  12. ///
  13. class _yyyyState extends State<xxxxx> {
  14.   bool _enProceso = false;
  15.   // bool _funcionesMostrar = false;
  16.   // bool _agregarPoder = true;
  17.   // bool _eliminarPoder = false;
  18.   // WwwwwCrl control = new WwwwwCrl(); // el control
  19.   // List<tttModel> _ttt = []; //modelo
  20.   // Icon _searchIcon = new Icon(Icons.search); //filtro
  21.   //final TextEditingController _filter = new TextEditingController(); // filtro
  22.   static String _titulo = general.n('ssss'); //titulo
  23.  
  24.   ///
  25.   // _prLsState() { // filtro
  26.   //   _filter.addListener(() {
  27.   //     _filtrar(_filter.text);
  28.   //   });
  29.   // }
  30.   @override
  31.   void initState() {
  32.     _datosIniciales();
  33.     super.initState();
  34.   }
  35.   @override
  36.   void dispose() {
  37.     super.dispose();
  38.   }
  39.   @override
  40.   Widget build(BuildContext context) {
  41.     return Scaffold(
  42.       appBar: AppBar(
  43.         brightness: Brightness.dark,
  44.         title: _appBarTitle,
  45.         // leading: IconButton( // atras
  46.         //   icon: Icon(Icons.arrow_back, color: Colors.white),
  47.         //   onPressed: () => Navigator.of(context).pop(),
  48.         // ),
  49.         // actions: <Widget>[ // filtro
  50.         //   IconButton(
  51.         //     icon: _searchIcon,
  52.         //     onPressed: _searchPressed,
  53.         //   ),
  54.         // ],
  55.       ),
  56.       // drawer: menu(context), // drawer
  57.       body: SafeArea(
  58.           child: Stack(
  59.             fit: StackFit.expand,
  60.             children: [
  61.               // listado(),
  62.               // forma(context),
  63.               // Visibility( visible: _funcionesMostrar, child: menuItem()),
  64.               Visibility(visible: _enProceso, child: progreso(),),
  65.             ],
  66.           )),
  67.     );
  68.   }
  69.   ///
  70.   Widget _appBarTitle = new Text(_titulo);
  71.   ///
  72.   Widget progreso() {
  73.     return Column(
  74.       crossAxisAlignment: CrossAxisAlignment.center,
  75.       mainAxisSize: MainAxisSize.max,
  76.       mainAxisAlignment: MainAxisAlignment.center,
  77.       children: [
  78.         Container(child: CircularProgressIndicator()),
  79.       ],
  80.     );
  81.   }
  82.   ///
  83.   // _searchPressed() { // filtrar
  84.   //   setState(() {
  85.   //     _funcionesMostrar = false;
  86.   //     _agregarPoder = true;
  87.   //     if (this._searchIcon.icon == Icons.search) {
  88.   //       this._searchIcon = new Icon(Icons.close);
  89.   //       this._appBarTitle = new TextField(
  90.   //         controller: _filter,
  91.   //         style: TextStyle(
  92.   //           color: Colors.white,
  93.   //         ),
  94.   //         decoration: new InputDecoration(
  95.   //           filled: false,
  96.   //           fillColor: Colors.white,
  97.   //           hintText: general.n('Filtrar') + '...',
  98.   //           hintStyle: TextStyle(
  99.   //               fontSize: 16.0,
  100.   //               color: Colors.white,
  101.   //               fontStyle: FontStyle.italic),
  102.   //           enabledBorder: UnderlineInputBorder(
  103.   //             borderSide: BorderSide(color: Colors.white),
  104.   //           ),
  105.   //           focusedBorder: UnderlineInputBorder(
  106.   //             borderSide: BorderSide(color: Colors.white),
  107.   //           ),
  108.   //         ),
  109.   //         autofocus: true,
  110.   //       );
  111.   //     } else {
  112.   //       this._searchIcon = new Icon(Icons.search);
  113.   //       this._appBarTitle = new Text(_titulo);
  114.   //       _filter.clear();
  115.   //     }
  116.   //   });
  117.   // }
  118.   ///
  119.   _datosIniciales() async {
  120.     setState(() => _enProceso = true);
  121.  
  122.     setState(() => _enProceso = false);
  123.   }
  124.   ///
  125.   // _filtrar(String letras) { // filtrar
  126.   //   setState(() {
  127.   //     _proveedores = control.proveedores(letras);
  128.   //   });
  129.   // }
  130. } // fin clase
  131.