hypertension_prescription.dart 937 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter/services.dart';
  3. import 'package:get/get.dart';
  4. import 'package:vitalapp/managers/interfaces/template.dart';
  5. import 'package:vitalapp/pages/form/form_view.dart';
  6. ///高血压处方
  7. class HypertensionPrescription extends StatefulWidget {
  8. @override
  9. State<StatefulWidget> createState() {
  10. return HypertensionPrescriptionState();
  11. }
  12. }
  13. class HypertensionPrescriptionState extends State<HypertensionPrescription> {
  14. String? _template;
  15. @override
  16. void initState() {
  17. Get.find<ITemplateManager>()
  18. .getTemplateByKey("HypertensionPrescription")
  19. .then((value) {
  20. setState(() {
  21. _template = value;
  22. });
  23. });
  24. super.initState();
  25. }
  26. @override
  27. Widget build(BuildContext context) {
  28. return _template == null
  29. ? Center(
  30. child: CircularProgressIndicator(),
  31. )
  32. : FormView(_template!);
  33. }
  34. }