12345678910111213141516171819202122232425262728293031323334353637 |
- 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 TuberculosisPrescription extends StatefulWidget {
- @override
- State<StatefulWidget> createState() {
- return TuberculosisPrescriptionState();
- }
- }
- class TuberculosisPrescriptionState extends State<TuberculosisPrescription> {
- String? _template;
- @override
- void initState() {
- Get.find<ITemplateManager>()
- .getTemplateByKey("TuberculosisPrescription")
- .then((value) {
- setState(() {
- _template = value;
- });
- });
- super.initState();
- }
- @override
- Widget build(BuildContext context) {
- return _template == null
- ? Center(
- child: CircularProgressIndicator(),
- )
- : FormView(_template!);
- }
- }
|