about_us.dart 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import 'dart:html';
  2. import 'package:flutter_screenutil/flutter_screenutil.dart';
  3. import 'package:flutter/material.dart';
  4. import 'package:fuwei/config/config.dart';
  5. import 'package:webview_flutter/webview_flutter.dart';
  6. import '../utils/common_util.dart';
  7. import 'package:webviewx/webviewx.dart';
  8. class AboutUSWidget extends StatelessWidget {
  9. AboutUSWidget({super.key});
  10. var textSize = 0.0;
  11. var contentSize = 0.0;
  12. var margin = 0.0;
  13. @override
  14. Widget build(BuildContext context) {
  15. if (Util.isWeb()) {
  16. textSize = 30.sp;
  17. contentSize = 22.sp;
  18. margin = 0.3.sw;
  19. } else {
  20. textSize = 60.sp;
  21. contentSize = 44.sp;
  22. margin = 0.1.sw;
  23. }
  24. return SingleChildScrollView(
  25. child: Column(
  26. children: [
  27. Container(
  28. margin: EdgeInsets.only(top: 100.h),
  29. child: Text(
  30. "关于我们",
  31. style: TextStyle(fontSize: textSize, color: Colors.black),
  32. ),
  33. ),
  34. Container(
  35. margin: EdgeInsets.only(left: margin, right: margin, top: 30.h),
  36. child: WebViewX(
  37. width: 0.6.sw,
  38. height: 0.4.sh,
  39. initialContent: AppConfig.configContent,
  40. initialSourceType: SourceType.html,
  41. )),
  42. ],
  43. ),
  44. );
  45. }
  46. }