Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
gm_flutter
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林生雨
gm_flutter
Commits
9cf527bf
Commit
9cf527bf
authored
Jul 07, 2020
by
朱翠翠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code review
parent
e66cc63b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
30 deletions
+20
-30
ProjectDetailsItemView.dart
...ClueModel/page/ProjectDetails/ProjectDetailsItemView.dart
+12
-22
BaseComponent.dart
lib/commonModel/base/BaseComponent.dart
+8
-8
No files found.
lib/ClueModel/page/ProjectDetails/ProjectDetailsItemView.dart
View file @
9cf527bf
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:gm_flutter/ClueModel/server/entity/ProjectDetailsItem.dart'
;
import
'package:gm_flutter/ClueModel/server/entity/ProjectDetailsItem.dart'
;
import
'package:gm_flutter/commonModel/base/BaseComponent.dart'
;
class
ProjectDetailsItemView
extends
StatelessWidget
{
class
ProjectDetailsItemView
extends
StatelessWidget
{
Groups
listData
;
Groups
listData
;
...
@@ -52,32 +53,21 @@ class ProjectDetailsItemView extends StatelessWidget {
...
@@ -52,32 +53,21 @@ class ProjectDetailsItemView extends StatelessWidget {
child:
Row
(
child:
Row
(
children:
<
Widget
>[
children:
<
Widget
>[
Container
(
Container
(
margin:
EdgeInsets
.
only
(
right:
25.0
),
margin:
EdgeInsets
.
only
(
right:
25.0
),
alignment:
Alignment
.
centerLeft
,
alignment:
Alignment
.
centerLeft
,
width:
78
,
width:
78
,
child:
baseText
(
attrs
.
attrName
,
13
,
Color
(
0xFF999999
)),
child:
baseText
(
attrs
.
attrName
,
13
,
Color
(
0xFF999999
),
),
textAlign:
TextAlign
.
left
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
)),
Container
(
Container
(
alignment:
Alignment
.
centerLeft
,
alignment:
Alignment
.
centerLeft
,
child:
baseText
(
attrs
.
attrValue
,
14
,
Color
(
0xFF282828
))),
child:
baseText
(
attrs
.
attrValue
,
14
,
Color
(
0xFF282828
),
textAlign:
TextAlign
.
left
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
)),
],
],
),
),
);
);
}
}
baseText
(
String
text
,
double
fontSize
,
Color
color
,
{
bool
bold
=
false
})
{
return
Text
(
text
,
textScaleFactor:
1.0
,
style:
TextStyle
(
decoration:
TextDecoration
.
none
,
fontSize:
fontSize
,
color:
color
,
fontStyle:
FontStyle
.
normal
,
fontWeight:
bold
?
FontWeight
.
w500
:
FontWeight
.
w400
),
textAlign:
TextAlign
.
left
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
);
}
}
}
lib/commonModel/base/BaseComponent.dart
View file @
9cf527bf
...
@@ -4,18 +4,11 @@
...
@@ -4,18 +4,11 @@
**/
**/
import
'package:app_settings/app_settings.dart'
;
import
'package:app_settings/app_settings.dart'
;
import
'package:flutter/gestures.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter_common/commonModel/eventbus/GlobalEventBus.dart'
;
import
'package:flutter_common/commonModel/live/LiveData.dart'
;
import
'package:flutter_common/commonModel/live/LiveData.dart'
;
import
'package:flutter_common/commonModel/view/iOSLoading.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:gm_flutter/commonModel/GMBase.dart'
;
import
'package:gm_flutter/commonModel/bean/Pair.dart'
;
import
'package:gm_flutter/commonModel/bean/Pair.dart'
;
import
'package:gm_flutter/commonModel/util/DartUtil.dart'
;
import
'package:gm_flutter/commonModel/util/DartUtil.dart'
;
import
'package:gm_flutter/commonModel/view/ImagesAnimation.dart'
;
import
'package:gm_flutter/commonModel/view/baseRefreshIndicator.dart'
;
import
'package:gm_flutter/commonModel/view/baseTabIndicator.dart'
;
import
'package:gm_flutter/commonModel/view/baseTabIndicator.dart'
;
import
'package:lottie/lottie.dart'
;
import
'package:lottie/lottie.dart'
;
import
'package:pull_to_refresh/pull_to_refresh.dart'
;
import
'package:pull_to_refresh/pull_to_refresh.dart'
;
...
@@ -86,7 +79,11 @@ AppBar _baseAppBarChangeTitle(
...
@@ -86,7 +79,11 @@ AppBar _baseAppBarChangeTitle(
);
);
}
}
Text
baseText
(
String
text
,
double
fontSize
,
Color
color
,
{
bool
bold
=
false
})
{
Text
baseText
(
String
text
,
double
fontSize
,
Color
color
,
{
bool
bold
=
false
,
TextAlign
textAlign
=
TextAlign
.
left
,
int
maxLines
=
1
,
TextOverflow
overflow
})
{
return
Text
(
return
Text
(
text
,
text
,
textScaleFactor:
1.0
,
textScaleFactor:
1.0
,
...
@@ -96,6 +93,9 @@ Text baseText(String text, double fontSize, Color color, {bool bold = false}) {
...
@@ -96,6 +93,9 @@ Text baseText(String text, double fontSize, Color color, {bool bold = false}) {
color:
color
,
color:
color
,
fontStyle:
FontStyle
.
normal
,
fontStyle:
FontStyle
.
normal
,
fontWeight:
bold
?
FontWeight
.
w500
:
FontWeight
.
w400
),
fontWeight:
bold
?
FontWeight
.
w500
:
FontWeight
.
w400
),
textAlign:
textAlign
,
maxLines:
maxLines
,
overflow:
overflow
==
null
?
TextOverflow
.
ellipsis
:
overflow
,
);
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment