blood_sugar_disorder.dart 1.0 KB

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