BotonRest constructor

const BotonRest({
  1. Key? key,
  2. required Widget contenido,
  3. BoxDecoration? estilo,
  4. String? url,
  5. String? method,
  6. dynamic formkey,
  7. dynamic arrayData,
  8. TextStyle? errorStyle,
  9. bool showModalLoader = true,
  10. String stringCargando = 'Cargando...',
  11. dynamic action(
    1. dynamic
    )?,
  12. String? token,
  13. bool showSuccess = false,
  14. TextStyle? succesStyle,
  15. bool habilitado = true,
  16. bool restriccion = false,
  17. String? restriccionStr,
  18. TextStyle? restriccionStyle,
  19. Function? primerAction,
})

Boton de código Jaguar con RestFunction para realizar lladamas REST a una url con un metodo y si la respuesta es true se realiza una action. estilo define el estilo del boton, el contendio del boton, puede estar ligado a un form con un formkey y enseña un mensaje de error errorStyle cuando la respuesta es false. También se puede mostrar un showModalLoader con un stringCargando.

Implementation

const BotonRest(
    {Key? key,
    required this.contenido,
    this.estilo,
    this.url,
    this.method,
    // this.action,
    this.formkey,
    this.arrayData,
    this.errorStyle,
    this.showModalLoader = true,
    this.stringCargando = 'Cargando...',
    this.action,
    this.token,
    this.showSuccess = false,
    this.succesStyle,
    this.habilitado = true,
    this.restriccion = false,
    this.restriccionStr,
    this.restriccionStyle,
    this.primerAction})
    : super(key: key);