Skip to content

Commit

Permalink
update MediaQuery of
Browse files Browse the repository at this point in the history
  • Loading branch information
CarGuo committed Jun 2, 2023
1 parent cf9497f commit 6e53162
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion RECORD.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ cd /Users/.../xFramework.framework
lipo -info xFramework



-tag:gralloc4


# 如何查看dill文件
Expand Down
2 changes: 1 addition & 1 deletion lib/page/home/widget/home_drawer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class HomeDrawer extends StatelessWidget {
///item 背景
child: Container(
constraints: new BoxConstraints(
minHeight: MediaQuery.of(context).size.height),
minHeight: MediaQuery.sizeOf(context).height),
child: new Material(
color: GSYColors.white,
child: new Column(
Expand Down
6 changes: 3 additions & 3 deletions lib/page/issue/issue_edit_dIalog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ class _IssueEditDialogState extends State<IssueEditDialog> {
body: SafeArea(
child: SingleChildScrollView(
child: new Container(
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
height: MediaQuery.sizeOf(context).height,
width: MediaQuery.sizeOf(context).width,
color: Colors.black12,

///触摸收起键盘
Expand Down Expand Up @@ -124,7 +124,7 @@ class _IssueEditDialogState extends State<IssueEditDialog> {

///内容输入框
new Container(
height: MediaQuery.of(context).size.width * 3 / 4,
height: MediaQuery.sizeOf(context).width * 3 / 4,
decoration: new BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(4.0)),
Expand Down
4 changes: 2 additions & 2 deletions lib/page/repos/widget/repos_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ class ReposItem extends StatelessWidget {
15.0,
padding: 5.0,
textWidth: flex == 4
? (MediaQuery.of(context).size.width - 100) / 3
: (MediaQuery.of(context).size.width - 100) / 5,
? (MediaQuery.sizeOf(context).width - 100) / 3
: (MediaQuery.sizeOf(context).width - 100) / 5,
),
),
);
Expand Down
2 changes: 1 addition & 1 deletion lib/page/search/search_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class _SearchPageState extends State<SearchPage>
///填充剩下半圆颜色
color: endAnima ? Theme.of(context).primaryColor : Colors.transparent,
child: CRAnimation(
minR: MediaQuery.of(context).size.height - 8,
minR: MediaQuery.sizeOf(context).height - 8,
maxR: 0,
offset: widget.centerPosition,
animation: animation as Animation<double>?,
Expand Down
4 changes: 2 additions & 2 deletions lib/page/trend/trend_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,15 @@ class TrendPageState extends State<TrendPage>
var mediaQueryData = MediaQueryData.fromView(View.of(context));
var statusBar = mediaQueryData.padding.top;
var bottomArea = mediaQueryData.padding.bottom;
var height = MediaQuery.of(context).size.height -
var height = MediaQuery.sizeOf(context).height -
statusBar -
bottomArea -
kBottomNavigationBarHeight -
kToolbarHeight;
return SingleChildScrollView(
child: new Container(
height: height,
width: MediaQuery.of(context).size.width,
width: MediaQuery.sizeOf(context).width,
child: new Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expand Down
4 changes: 2 additions & 2 deletions lib/page/user/widget/user_header.dart
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class UserHeaderItem extends StatelessWidget {
GSYColors.subLightTextColor,
10.0,
padding: 3.0,
textWidth: MediaQuery.of(context).size.width - 50,
textWidth: MediaQuery.sizeOf(context).width - 50,
),
),
margin: new EdgeInsets.only(top: 6.0, bottom: 2.0),
Expand Down Expand Up @@ -386,7 +386,7 @@ class UserHeaderChart extends StatelessWidget {

_renderChart(context) {
double height = 140.0;
double width = 3 * MediaQuery.of(context).size.width / 2;
double width = 3 * MediaQuery.sizeOf(context).width / 2;
if (userInfo.login != null && userInfo.type == "Organization") {
return new Container();
}
Expand Down
2 changes: 1 addition & 1 deletion lib/widget/gsy_tabbar_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class _GSYTabBarState extends State<GSYTabBarWidget>
widget.onPageChanged?.call(index);

///不想要动画
_pageController.jumpTo(MediaQuery.of(context).size.width * index);
_pageController.jumpTo(MediaQuery.sizeOf(context).width * index);
widget.onSinglePress?.call(index);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/widget/pull/gsy_pull_load_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class _GSYPullLoadWidgetState extends State<GSYPullLoadWidget> {
///空页面
Widget _buildEmpty() {
return new Container(
height: MediaQuery.of(context).size.height - 100,
height: MediaQuery.sizeOf(context).height - 100,
child: new Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expand Down
4 changes: 2 additions & 2 deletions lib/widget/pull/gsy_pull_new_load_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ class _GSYPullLoadWidgetState extends State<GSYPullLoadWidget>
///空页面
Widget _buildEmpty() {
return new Container(
height: MediaQuery.of(context).size.height - 100,
height: MediaQuery.sizeOf(context).height - 100,
child: new Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expand Down Expand Up @@ -332,7 +332,7 @@ class _GSYPullLoadWidgetState extends State<GSYPullLoadWidget>
alignment: Alignment.bottomCenter,
child: new Container(
color: Colors.black,
width: MediaQuery.of(context!).size.width,
width: MediaQuery.sizeOf(context!).width,

///动态大小处理
height:
Expand Down
2 changes: 1 addition & 1 deletion lib/widget/pull/nested/gsy_nested_pull_load_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class _GSYNestedPullLoadWidgetState extends State<GSYNestedPullLoadWidget> {
///空页面
Widget _buildEmpty() {
return new Container(
height: MediaQuery.of(context).size.height - 100,
height: MediaQuery.sizeOf(context).height - 100,
child: new Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expand Down

0 comments on commit 6e53162

Please sign in to comment.