@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
2
2
import 'dart:math' as math;
3
3
import 'package:efox_flutter/lang/index.dart' show AppLocalizations;
4
4
import 'package:efox_flutter/store/index.dart' show Store, UserModel;
5
+ import './text.dart' as Content;
5
6
6
7
class Index extends StatefulWidget {
7
8
Index ({Key key}) : super (key: key);
@@ -23,9 +24,87 @@ class _IndexState extends State<Index> {
23
24
*/
24
25
renderOverlay (String text) {
25
26
_overlayEntry? .remove ();
27
+ Size _size = MediaQuery .of (context).size;
26
28
_overlayState = Overlay .of (context);
27
29
_overlayEntry = OverlayEntry (builder: (context) {
28
- return Center (child: Text (text));
30
+ return Scaffold (
31
+ backgroundColor: Colors .transparent,
32
+ body: GestureDetector (
33
+ child: Stack (
34
+ children: < Widget > [
35
+ Opacity (
36
+ opacity: 0.75 ,
37
+ child: Container (
38
+ decoration: BoxDecoration (
39
+ color: Colors .black,
40
+ ),
41
+ ),
42
+ ),
43
+ SizedBox .expand (
44
+ child: Center (
45
+ child: SizedBox (
46
+ height: _size.height / 1.3 ,
47
+ width: _size.width / 1.3 ,
48
+ child: Container (
49
+ padding: EdgeInsets .all (20 ),
50
+ decoration: BoxDecoration (
51
+ color: Colors .white,
52
+ borderRadius: BorderRadius .circular (20 ),
53
+ boxShadow: [
54
+ BoxShadow (
55
+ color: Colors .grey,
56
+ blurRadius: 2 ,
57
+ // offset: Offset(0, 1),
58
+ ),
59
+ ],
60
+ ),
61
+ child: Column (
62
+ children: < Widget > [
63
+ Text (
64
+ "说明" ,
65
+ style: TextStyle (
66
+ color: Colors .black,
67
+ fontSize: 22 ,
68
+ ),
69
+ ),
70
+ SizedBox (
71
+ height: 10 ,
72
+ ),
73
+ Expanded (
74
+ child: SingleChildScrollView (
75
+ child: Text (
76
+ text,
77
+ textAlign: TextAlign .left,
78
+ style: TextStyle (
79
+ color: Colors .black,
80
+ fontSize: 16 ,
81
+ ),
82
+ ),
83
+ ),
84
+ ),
85
+ FlatButton (
86
+ textColor: Theme .of (context).primaryColor,
87
+ onPressed: () {
88
+ beforeDispose ();
89
+ },
90
+ child: Padding (
91
+ padding: EdgeInsets .all (10 ),
92
+ child: Text ("确定" ),
93
+ ),
94
+ ),
95
+ ],
96
+ ),
97
+ ),
98
+ ),
99
+ ),
100
+ ),
101
+ ],
102
+ ),
103
+ onTap: () {
104
+ beforeDispose ();
105
+ },
106
+ ),
107
+ );
29
108
});
30
109
_overlayState.insert (_overlayEntry);
31
110
}
@@ -165,7 +244,7 @@ class _IndexState extends State<Index> {
165
244
),
166
245
),
167
246
onTap: () {
168
- renderOverlay (" Text 1" );
247
+ renderOverlay (Content .loginText );
169
248
},
170
249
),
171
250
SizedBox (
0 commit comments