Introduce.dart 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. import 'dart:convert';
  2. import 'dart:io';
  3. import 'dart:typed_data';
  4. import 'package:eitc_erm_app/utils/Component.dart';
  5. import 'package:eitc_erm_app/utils/Constants.dart';
  6. import 'package:eitc_erm_app/widget/loading.dart';
  7. import 'package:flutter/material.dart';
  8. import 'package:fluttertoast/fluttertoast.dart';
  9. import 'package:http/http.dart' as http;
  10. import 'bean/hospital_detail.dart';
  11. import 'bean/message_box_s_list_entity.dart';
  12. import 'bean/pda_patrol_time_list.dart';
  13. /*void main() {
  14. WidgetsFlutterBinding.ensureInitialized();
  15. runApp(Introduce());
  16. }*/
  17. HospitalDetail mHospitalDetail = new HospitalDetail();
  18. class Introduce extends StatefulWidget {
  19. Introduce({required Key key, required hospitalDetail})
  20. : super(key: key) {
  21. mHospitalDetail = hospitalDetail;
  22. print(mHospitalDetail.data?.bannerPic);
  23. }
  24. @override
  25. State<StatefulWidget> createState() => IntroduceState();
  26. }
  27. class IntroduceState extends State<Introduce> {
  28. @override
  29. void initState() {
  30. super.initState();
  31. }
  32. @override
  33. Widget build(BuildContext context) {
  34. return MaterialApp(
  35. home: Scaffold(
  36. appBar: new AppBar(
  37. title: new Text('医院介绍',
  38. style: TextStyle(
  39. color: Colors.white,
  40. )),
  41. centerTitle: true,
  42. elevation: 0.5,
  43. backgroundColor: Global.StatusBarColor,
  44. leading: new IconButton(
  45. tooltip: '返回上一页',
  46. icon: const Icon(
  47. Icons.arrow_back_ios,
  48. color: Colors.white,
  49. ),
  50. onPressed: () {
  51. Navigator.of(context).pop();
  52. //_nextPage(-1);
  53. },
  54. ),
  55. ),
  56. body: SingleChildScrollView(
  57. child: Column(
  58. mainAxisSize: MainAxisSize.max,
  59. children: <Widget>[
  60. Image(
  61. image: AssetImage('assets/images/banner1.png'),
  62. fit: BoxFit.fitWidth,
  63. ),
  64. Padding(
  65. padding: const EdgeInsets.all(10),
  66. child: ListView(
  67. shrinkWrap: true,
  68. //沿竖直方向上布局
  69. scrollDirection: Axis.vertical,
  70. children: <Widget>[
  71. Text(
  72. '诊所名称:${mHospitalDetail.data?.clinicName}',
  73. style: const TextStyle(fontSize: 15, color: Colors.black),
  74. ),
  75. Text(
  76. '医疗机构编码:${mHospitalDetail.data?.medicalInstitutionCode}',
  77. style: const TextStyle(fontSize: 15, color: Colors.black),
  78. ),
  79. Text(
  80. '公司地址:${mHospitalDetail.data?.city}',
  81. style: const TextStyle(fontSize: 15, color: Colors.black),
  82. ),
  83. Text(
  84. '营业时间:${mHospitalDetail.data?.clinicWorkingDays}',
  85. style: const TextStyle(fontSize: 15, color: Colors.black),
  86. ),
  87. Text('营业执照'),
  88. Image.network(
  89. Global.ImageUrl + mHospitalDetail.data!.medicalInstitutionOccupationalLicense.toString(),
  90. width: double.infinity,
  91. fit: BoxFit.fitWidth,
  92. excludeFromSemantics: true,
  93. errorBuilder: (context, error, stackTrace) {
  94. return Icon(
  95. Icons.image,
  96. size: 80,
  97. color: Colors.grey,
  98. ); // 显示一个进度指示器作为错误占位
  99. },
  100. ),
  101. ],
  102. )
  103. /*Text(
  104. '',
  105. style: const TextStyle(fontSize: 13, color: Colors.black),
  106. ),*/
  107. ),
  108. ]),
  109. ),
  110. ),
  111. );
  112. }
  113. }