123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- import 'dart:html';
- import 'package:flutter/material.dart';
- import 'package:flutter_screenutil/flutter_screenutil.dart';
- class CountryDetailWidget extends StatelessWidget {
- const CountryDetailWidget({super.key});
- @override
- Widget build(BuildContext context) {
- return Column(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Expanded(
- flex: 1,
- child: Column(
- children: [
- Container(
- margin: const EdgeInsets.only(top: 20),
- height: 150,
- child: Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- const Text(
- "美国",
- style: TextStyle(
- fontSize: 24,
- fontWeight: FontWeight.bold,
- color: Colors.black),
- ),
- Image(
- image: const AssetImage("images/logo.png"),
- width: 200.w,
- height: 150.w,
- )
- ],
- ),
- ),
- Container(
- color: Colors.grey[300],
- height: 60.h,
- width: 800.w,
- margin: EdgeInsets.only(top: 20.w),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.start,
- children: [
- Row(
- children: [
- Text(
- "签证须知:",
- style: TextStyle(
- fontSize: 14.sp,
- color: Colors.red,
- fontWeight: FontWeight.bold),
- ),
- Text(
- "具体内容",
- style: TextStyle(
- fontSize: 14.sp,
- color: Colors.black,
- fontWeight: FontWeight.bold),
- ),
- ],
- )
- ],
- ),
- ),
- GestureDetector(
- onTap: () {
- downLoadFile(
- "https://cos.appmeta.cn/784d9b69a60cb8121d38116282d1f1092a6ce8ff.apk?sign=034f3922664559b086a14df30ffd0155&t=1678801947");
- },
- child: Container(
- margin: EdgeInsets.only(top: 20.w),
- child: Text(
- "美国-旅游签证材料清单",
- style: TextStyle(
- fontSize: 14.sp,
- color: Colors.red,
- fontWeight: FontWeight.bold),
- ),
- ),
- ),
- Container(
- margin: EdgeInsets.only(top: 20.w),
- child: Text(
- "美国-商务签证材料清单",
- style: TextStyle(
- fontSize: 14.sp,
- color: Colors.red,
- fontWeight: FontWeight.bold),
- ),
- )
- ],
- ),
- ),
- ],
- );
- }
- ///调用浏览器的下载功能下载文件
- downLoadFile(url) {
- AnchorElement anchorElement = AnchorElement(href: url);
- anchorElement.download = "资料";
- anchorElement.click();
- }
- }
|