File tree Expand file tree Collapse file tree 5 files changed +16
-12
lines changed Expand file tree Collapse file tree 5 files changed +16
-12
lines changed Original file line number Diff line number Diff line change 1818
1919### 1.0.6(进行中)
2020* 增加本地阅读历史
21+ * drawer 状态栏样式处理
2122
2223### 1.0.5
2324* 增加本地数据库
Original file line number Diff line number Diff line change @@ -31,8 +31,8 @@ class CommonUtils {
3131
3232 static double sStaticBarHeight = 0.0 ;
3333
34- static void initStatusBarHeight () async {
35- sStaticBarHeight = await FlutterStatusbar .height;
34+ static void initStatusBarHeight (context ) async {
35+ sStaticBarHeight = await FlutterStatusbar .height / MediaQuery . of (context).devicePixelRatio ;
3636 }
3737
3838 static String getDateStr (DateTime date) {
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ class WelcomePage extends StatelessWidget {
1919 @override
2020 Widget build (BuildContext context) {
2121 Store <GSYState > store = StoreProvider .of (context);
22- CommonUtils .initStatusBarHeight ();
22+ CommonUtils .initStatusBarHeight (context );
2323 new Future .delayed (const Duration (seconds: 2 ), () {
2424 UserDao .initUserInfo (store).then ((res) {
2525 if (res != null && res.result) {
Original file line number Diff line number Diff line change 11import 'package:flutter/material.dart' ;
22import 'package:gsy_github_app_flutter/common/style/GSYStyle.dart' ;
3+ import 'package:gsy_github_app_flutter/common/utils/CommonUtils.dart' ;
34
45/**
56 * 搜索drawer
67 * Created by guoshuyu
78 * Date: 2018-07-18
89 */
910
10-
1111typedef void SearchSelectItemChanged <String >(String value);
1212
1313class GSYSearchDrawer extends StatefulWidget {
@@ -33,10 +33,14 @@ class _GSYSearchDrawerState extends State<GSYSearchDrawer> {
3333 @override
3434 Widget build (BuildContext context) {
3535 return new Container (
36- color: Colors .white,
37- child: new SingleChildScrollView (
38- child: new Column (
39- children: _renderList (),
36+ color: Color (GSYColors .primaryValue),
37+ padding: EdgeInsets .only (top: CommonUtils .sStaticBarHeight),
38+ child: Container (
39+ color: Color (GSYColors .white),
40+ child: new SingleChildScrollView (
41+ child: new Column (
42+ children: _renderList (),
43+ ),
4044 ),
4145 ),
4246 );
@@ -45,7 +49,6 @@ class _GSYSearchDrawerState extends State<GSYSearchDrawer> {
4549 _renderList () {
4650 List <Widget > list = new List ();
4751 list.add (new Container (
48- height: 50.0 ,
4952 width: itemWidth,
5053 ));
5154 list.add (_renderTitle ("类型" ));
Original file line number Diff line number Diff line change 1- import 'dart:io' ;
2-
31import 'package:get_version/get_version.dart' ;
42import 'package:flutter/material.dart' ;
53import 'package:flutter_redux/flutter_redux.dart' ;
@@ -38,10 +36,12 @@ class HomeDrawer extends StatelessWidget {
3836 builder: (context, store) {
3937 User user = store.state.userInfo;
4038 return new Drawer (
41- //侧边栏按钮Drawer
39+ /// 侧边栏按钮Drawer
4240 child: new Container (
41+ ///默认背景
4342 color: Color (GSYColors .primaryValue),
4443 child: new SingleChildScrollView (
44+ ///item 背景
4545 child: new Container (
4646 height: MediaQuery .of (context).size.height,
4747 color: Color (GSYColors .white),
You can’t perform that action at this time.
0 commit comments