Files
tuiche/lib/pages/mh_page/about_us.dart
2026-04-07 14:49:31 +08:00

116 lines
3.7 KiB
Dart
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import 'package:ef/ef.dart';
import 'package:flutter/material.dart';
import 'package:vbvs_app/common/color/appConstants.dart';
import 'package:vbvs_app/common/util/FitTool.dart';
import 'package:vbvs_app/common/util/MyUtils.dart';
import 'package:vbvs_app/component/tool/WebViewWidget.dart';
import 'package:flutter/services.dart';
class MhAboutUsPage extends StatefulWidget {
late MyWebView webView;
MhAboutUsPage({super.key});
@override
State<MhAboutUsPage> createState() => _MhAboutUsPageState();
}
class _MhAboutUsPageState extends State<MhAboutUsPage> {
@override
void initState() {
super.initState();
// pdfController.loadPdf();
String url;
switch (AppConstants().ent_type) {
case 1:
url = "https://mp.weixin.qq.com/s/BrD3fTT2J2R-DxZrUuM4rw";
break;
case 2:
url = "https://mp.weixin.qq.com/s/7BvvprVDqX1eOzM3Lms8dg";
break;
case 3:
url = "https://mp.weixin.qq.com/s/BrD3fTT2J2R-DxZrUuM4rw";
break;
default:
url = "https://mp.weixin.qq.com/s/BrD3fTT2J2R-DxZrUuM4rw";
}
widget.webView = MyWebView(
url: url,
onLoad: () {
print('网页载入完毕'.tr);
},
);
}
@override
Widget build(BuildContext context) {
return LayoutBuilder(
builder: (context, bodySize) => GestureDetector(
// onTap: () => FocusScope.of(context).unfocus(),,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/new_background.png'), // 本地图片
fit: BoxFit.fill, // 填满整个 Container
),
),
child: Scaffold(
backgroundColor: Colors.transparent, // 加上这一行
appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent,
// backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: themeController.currentColor.sc3),
titleSpacing: 0,
// leading: returnIconButtom,
title: Container(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
/// 居中标题
Text('关于我们'.tr,
style: TextStyle(
fontFamily: 'Readex Pro',
color: themeController.currentColor.sc3,
letterSpacing: 0,
fontSize: 30.rpx,
)),
/// 左边返回按钮
Positioned(
left: 0,
child: returnIconButtomNew(),
),
],
),
),
actions: [],
centerTitle: false,
),
body: SafeArea(
top: true,
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 0.rpx),
child: Column(children: [
Expanded(
child: Container(
child: widget.webView,
),
),
]),
),
),
),
),
),
);
}
}