@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
22import 'dart:math' as math;
33import 'package:efox_flutter/lang/index.dart' show AppLocalizations;
44import 'package:efox_flutter/store/index.dart' show Store, UserModel;
5+ import './text.dart' as Content;
56
67class Index extends StatefulWidget {
78 Index ({Key key}) : super (key: key);
@@ -23,9 +24,87 @@ class _IndexState extends State<Index> {
2324 */
2425 renderOverlay (String text) {
2526 _overlayEntry? .remove ();
27+ Size _size = MediaQuery .of (context).size;
2628 _overlayState = Overlay .of (context);
2729 _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+ );
29108 });
30109 _overlayState.insert (_overlayEntry);
31110 }
@@ -165,7 +244,7 @@ class _IndexState extends State<Index> {
165244 ),
166245 ),
167246 onTap: () {
168- renderOverlay (" Text 1" );
247+ renderOverlay (Content .loginText );
169248 },
170249 ),
171250 SizedBox (
0 commit comments