1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- import 'package:flutter/material.dart';
- import 'package:flutter/services.dart';
- import 'package:get/get.dart';
- import 'package:vitalapp/managers/interfaces/template.dart';
- import 'package:vitalapp/pages/form/form_view.dart';
- ///碘缺乏病患者健康教育处方
- class IodineDeficiencyDisorder extends StatefulWidget {
- @override
- State<StatefulWidget> createState() {
- return IodineDeficiencyDisorderState();
- }
- }
- class IodineDeficiencyDisorderState extends State<IodineDeficiencyDisorder> {
- String? _template;
- @override
- void initState() {
- // Get.find<ITemplateManager>()
- // .getTemplateByKey("PrescriptionForIodineDeficiencyDisorder")
- // .then((value) {
- // setState(() {
- // _template = value;
- // });
- // });
- var _path = "assets/prescription_for_Iodine_deficiency_disorder.json";
- rootBundle.loadString(_path).then((value) {
- setState(() {
- _template = value;
- });
- });
- super.initState();
- }
- @override
- Widget build(BuildContext context) {
- return _template == null
- ? Center(
- child: CircularProgressIndicator(),
- )
- : FormView(_template!);
- }
- }
|