guide.dart 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. import 'dart:ui';
  2. import 'package:flutter/material.dart';
  3. import 'package:link/constants.dart';
  4. import 'package:link/view/component/link_btn.dart';
  5. import '../utils/size_fit.dart';
  6. class IndexWelcome extends StatelessWidget {
  7. var close;
  8. IndexWelcome({Key? key,required this.close}) : super(key: key);
  9. @override
  10. Widget build(BuildContext context) {
  11. SizeFit.initialize(context);
  12. var size = MediaQuery.of(context).size;
  13. return BackdropFilter(
  14. filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
  15. child: Container(
  16. width: 375.px,
  17. height: size.height,
  18. color: const Color(0xBF000000),
  19. alignment: Alignment.center,
  20. child: Container(
  21. width: 314.px,
  22. height: 414.px,
  23. decoration: BoxDecoration(
  24. borderRadius: BorderRadius.circular(32.px),
  25. boxShadow: [
  26. BoxShadow(
  27. color: const Color(0x66000000),
  28. blurRadius: 24.px,
  29. offset: Offset(0, 24.px))
  30. ],
  31. color: const Color(0xFF131314)),
  32. child: Stack(children: [
  33. Image.asset(
  34. 'assets/images/guide_begin.png',
  35. width: 314.px,
  36. height: 130.px,
  37. ),
  38. Column(
  39. crossAxisAlignment: CrossAxisAlignment.center,
  40. children: [
  41. SizedBox(
  42. height: 40.px,
  43. width: 314.px,
  44. ),
  45. Text(
  46. '欢迎加入',
  47. style: TextStyle(
  48. color: kThemeColor,
  49. fontSize: 24.px,
  50. fontWeight: FontWeight.bold),
  51. ),
  52. SizedBox(
  53. height: 16.px,
  54. ),
  55. Image.asset(
  56. 'assets/images/logo.png',
  57. width: 216.px,
  58. height: 83.px,
  59. ),
  60. SizedBox(
  61. height: 24.px,
  62. ),
  63. Text(
  64. '将自己的各平台汇聚于此,丰富的\n主题彰显你独特的个性,分享给你\n的好友,全网找你不迷路',
  65. style: TextStyle(
  66. color: const Color(0xFFA5A5AD), fontSize: 14.px,height: 1.8),
  67. ),
  68. SizedBox(
  69. height: 36.px,
  70. ),
  71. LinkButton(
  72. title: '开始探索',
  73. disable: false,
  74. isBlack: false,
  75. btnWidth: 216.px,
  76. callback: () {
  77. close();
  78. })
  79. ],
  80. )
  81. ]),
  82. ),
  83. ));
  84. }
  85. }
  86. class GuideTip extends StatelessWidget {
  87. String content;
  88. int direction;
  89. double width;
  90. GuideTip(
  91. {Key? key,
  92. required this.content,
  93. required this.direction,
  94. required this.width})
  95. : super(key: key);
  96. @override
  97. Widget build(BuildContext context) {
  98. return Container(
  99. width: width,
  100. padding: EdgeInsets.fromLTRB(26.px, 20.px, 26.px, 20.px),
  101. decoration: BoxDecoration(
  102. borderRadius: BorderRadius.circular(28.px),
  103. color: const Color(0xFF0000FF),
  104. boxShadow: [
  105. BoxShadow(
  106. color: const Color(0x66000000),
  107. offset: Offset(0.0, 24.px),
  108. blurRadius: 24.px)
  109. ]),
  110. child: Text(
  111. content,
  112. style: TextStyle(
  113. color: Colors.white, fontSize: 20.px, fontWeight: FontWeight.bold,height: 1.8),
  114. ),
  115. );
  116. }
  117. }