admin
2021-10-28 34b9ee85d5f1302a5d770b0ee5e62aec8a3c190f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
import 'dart:ui';
 
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:location/ui/widget/nav.dart';
 
 
void main() {
  runApp(MyApp());
}
 
class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: '功能试用',
      theme: ThemeData(primaryColor: Color(0xFFF5F5F5)),
      home: TryFunctionsPage(title: ''),
    );
  }
}
 
class TryFunctionsPage extends StatefulWidget {
  TryFunctionsPage({Key? key, required this.title}) : super(key: key);
 
  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.
 
  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".
 
  final String title;
 
  @override
  _TryFunctionsPageState createState() => _TryFunctionsPageState();
}
 
class _TryFunctionsPageState extends State<TryFunctionsPage>
    with SingleTickerProviderStateMixin {
  @override
  void initState() {
    super.initState();
  }
 
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        backgroundColor: Color(0xFFB4E4FF),
        body: Container(
            child: Flex(
          direction: Axis.vertical,
          children: [
            TopNavBar(title: "功能试用"),
            Expanded(
                child: Container(
              padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
              child: Flex(
                direction: Axis.vertical,
                children: [
                  Expanded(
                    child: Center(
                      child: Container(
                        constraints: BoxConstraints(maxHeight: 500),
                        child: Flex(
                          direction: Axis.vertical,
                          mainAxisAlignment: MainAxisAlignment.center,
                          crossAxisAlignment: CrossAxisAlignment.center,
                          children: [
                            Container(),
                            Image.asset(
                              "assets/images/common/icon_try_functions_logo.png",
                              height: 171,
                            ),
                            Container(
                              height: 23,
                            ),
                            Text.rich(TextSpan(
                              children: <TextSpan>[
                                TextSpan(text: '观看广告可获得VIP功能'),
                                TextSpan(
                                    text: '3',
                                    style: TextStyle(
                                        fontWeight: FontWeight.bold,
                                        fontSize: 30)),
                                TextSpan(text: '天试用'),
                              ],
                              style: TextStyle(
                                  color: Color(0xFF0E95FE), fontSize: 15),
                            )),
                            Container(
                              height: 5,
                            ),
                            Text(
                              "每个ID仅能试用1次",
                              style: TextStyle(
                                  fontSize: 12, color: Color(0xFF999999)),
                            )
                          ],
                        ),
                        decoration: BoxDecoration(
                            color: Color(0xFFF9EED5),
                            borderRadius: BorderRadius.circular(10)),
                      ),
                    ),
                  ),
                  Container(
                      alignment: Alignment.center,
                      child: InkWell(
                        onTap: () {
                          print("watch ad");
                        },
                        child: Container(
                          height: 55,
                          decoration: BoxDecoration(
                              color: Colors.white,
                              borderRadius: BorderRadius.only(
                                topLeft: Radius.circular(10),
                                topRight: Radius.circular(10),
                              )),
                          child: Flex(
                            direction: Axis.horizontal,
                            mainAxisAlignment: MainAxisAlignment.center,
                            crossAxisAlignment: CrossAxisAlignment.center,
                            children: [
                              Image.asset(
                                "assets/images/common/icon_btn_watch_ad.png",
                                height: 16,
                              ),
                              Text(
                                " 看广告",
                                style: TextStyle(
                                    color: Color(0xFF0E95FE), fontSize: 15),
                              )
                            ],
                          ),
                        ),
                      )),
                ],
              ),
            ))
          ],
        )));
  }
}