Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ce27fdd

Browse files
modify:修改md样式
1 parent f75e1a3 commit ce27fdd

File tree

5 files changed

+106
-3
lines changed

5 files changed

+106
-3
lines changed

‎lib/components/widget_comp.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class IndexState extends State<Index> {
5050
backgroundImage: NetworkImage(
5151
info.avatarUrl,
5252
),
53-
radius: 35,
53+
radius: 30,
5454
),
5555
title: Text(
5656
info.name,

‎lib/page/app_login/index.dart

Lines changed: 82 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
22
import 'dart:math' as math;
33
import 'package:efox_flutter/lang/index.dart' show AppLocalizations;
44
import 'package:efox_flutter/store/index.dart' show Store, UserModel;
5+
import './text.dart' as Content;
56

67
class 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
}
@@ -160,7 +239,7 @@ class _IndexState extends State<Index> {
160239
),
161240
),
162241
onTap: () {
163-
renderOverlay(" Text 1");
242+
renderOverlay(Content.loginText);
164243
},
165244
),
166245
SizedBox(
@@ -193,6 +272,7 @@ class _IndexState extends State<Index> {
193272
},
194273
);
195274
}
275+
196276
beforeDispose() {
197277
if (_overlayEntry != null) {
198278
_overlayEntry.remove();

‎lib/page/app_login/text.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
const loginText = 'a1sd56a1sd56as1d';

‎lib/page/home.dart

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ class _IndexState extends State<Index> {
4747
);
4848
}
4949

50+
/**
51+
* 左侧列表
52+
*/
5053
List<Widget> renderTiles(id) {
5154
if (id != null) {
5255
return [
@@ -57,6 +60,19 @@ class _IndexState extends State<Index> {
5760
Store.value<UserModel>(context).clearUserInfo();
5861
},
5962
),
63+
ListTile(
64+
leading: Icon(Icons.account_circle),
65+
title: Text(AppLocalizations.$t('common.login')),
66+
onTap: () {
67+
Navigator.of(context).push(
68+
MaterialPageRoute(
69+
builder: (BuildContext context) {
70+
return LoginIndex.Index();
71+
},
72+
),
73+
);
74+
},
75+
)
6076
];
6177
}
6278
return [

‎readme.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
+ 多主题切换
99
+ 自动更新检测
1010
+ firebase 崩溃监控
11+
12+
## 推文
13+
+ [Flutter 全局弹窗](https://juejin.im/post/5c9f2c37518825609415d11d)
14+
+ [Flutter UI使用Provide实现主题切换](https://juejin.im/post/5ca5e240f265da30c1725021)
15+
+ [Flutter UI 1.0.2落地与优化小结](https://juejin.im/post/5c95e691f265da610c06905c)
16+
+ [Flutter Provide实现](https://juejin.im/post/5c9f2c37518825609415d11d)
1117

1218
## apk 下载
1319
![安卓包下载](readme/apk.png)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /