country_detail.dart 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. import 'dart:html';
  2. import 'package:flutter/material.dart';
  3. import 'package:flutter_screenutil/flutter_screenutil.dart';
  4. class CountryDetailWidget extends StatelessWidget {
  5. const CountryDetailWidget({super.key});
  6. @override
  7. Widget build(BuildContext context) {
  8. return Column(
  9. mainAxisAlignment: MainAxisAlignment.center,
  10. children: [
  11. Expanded(
  12. flex: 1,
  13. child: Column(
  14. children: [
  15. Container(
  16. margin: const EdgeInsets.only(top: 20),
  17. height: 150,
  18. child: Row(
  19. mainAxisAlignment: MainAxisAlignment.center,
  20. children: [
  21. const Text(
  22. "美国",
  23. style: TextStyle(
  24. fontSize: 24,
  25. fontWeight: FontWeight.bold,
  26. color: Colors.black),
  27. ),
  28. Image(
  29. image: const AssetImage("images/logo.png"),
  30. width: 200.w,
  31. height: 150.w,
  32. )
  33. ],
  34. ),
  35. ),
  36. Container(
  37. color: Colors.grey[300],
  38. height: 60.h,
  39. width: 800.w,
  40. margin: EdgeInsets.only(top: 20.w),
  41. child: Row(
  42. mainAxisAlignment: MainAxisAlignment.start,
  43. children: [
  44. Row(
  45. children: [
  46. Text(
  47. "签证须知:",
  48. style: TextStyle(
  49. fontSize: 14.sp,
  50. color: Colors.red,
  51. fontWeight: FontWeight.bold),
  52. ),
  53. Text(
  54. "具体内容",
  55. style: TextStyle(
  56. fontSize: 14.sp,
  57. color: Colors.black,
  58. fontWeight: FontWeight.bold),
  59. ),
  60. ],
  61. )
  62. ],
  63. ),
  64. ),
  65. GestureDetector(
  66. onTap: () {
  67. downLoadFile(
  68. "https://cos.appmeta.cn/784d9b69a60cb8121d38116282d1f1092a6ce8ff.apk?sign=034f3922664559b086a14df30ffd0155&t=1678801947");
  69. },
  70. child: Container(
  71. margin: EdgeInsets.only(top: 20.w),
  72. child: Text(
  73. "美国-旅游签证材料清单",
  74. style: TextStyle(
  75. fontSize: 14.sp,
  76. color: Colors.red,
  77. fontWeight: FontWeight.bold),
  78. ),
  79. ),
  80. ),
  81. Container(
  82. margin: EdgeInsets.only(top: 20.w),
  83. child: Text(
  84. "美国-商务签证材料清单",
  85. style: TextStyle(
  86. fontSize: 14.sp,
  87. color: Colors.red,
  88. fontWeight: FontWeight.bold),
  89. ),
  90. )
  91. ],
  92. ),
  93. ),
  94. ],
  95. );
  96. }
  97. ///调用浏览器的下载功能下载文件
  98. downLoadFile(url) {
  99. AnchorElement anchorElement = AnchorElement(href: url);
  100. anchorElement.download = "资料";
  101. anchorElement.click();
  102. }
  103. }