Commit daa11045 authored by 林生雨's avatar 林生雨

Merge branch 'zcc/flutter' into 'test'

Zcc/flutter

See merge request !20
parents 320ad415 38d11802
...@@ -153,7 +153,7 @@ class _PopView implements ICenterPicker { ...@@ -153,7 +153,7 @@ class _PopView implements ICenterPicker {
margin: EdgeInsets.only(bottom: 25), margin: EdgeInsets.only(bottom: 25),
child: baseText( child: baseText(
_model.popViewLive.data.second.title, 18, Color(0xff464646), _model.popViewLive.data.second.title, 18, Color(0xff464646),
bold: true, align: TextAlign.center)), bold: true, textAlign: TextAlign.center)),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(7), borderRadius: BorderRadius.circular(7),
......
...@@ -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;
...@@ -50,49 +51,25 @@ class ProjectDetailsItemView extends StatelessWidget { ...@@ -50,49 +51,25 @@ class ProjectDetailsItemView extends StatelessWidget {
width: double.maxFinite, width: double.maxFinite,
margin: EdgeInsets.only(bottom: 25, left: 15, right: 15), margin: EdgeInsets.only(bottom: 25, left: 15, right: 15),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
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)),
Expanded( Expanded(
child: Container( child: Container(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: Text( child: baseText(attrs.attrValue, 14, Color(0xFF282828),
attrs.attrValue, textAlign: TextAlign.left,
textScaleFactor: 1.0, maxLines: 2,
softWrap: true, overflow: TextOverflow.ellipsis)),
style: TextStyle(
decoration: TextDecoration.none,
fontSize: 14,
color: Color(0xFF282828),
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w400),
)
// baseText(attrs.attrValue, 14, Color(0xFF282828))
),
), ),
], ],
), ),
); );
} }
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,
);
}
} }
...@@ -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';
...@@ -87,10 +80,13 @@ AppBar _baseAppBarChangeTitle( ...@@ -87,10 +80,13 @@ AppBar _baseAppBarChangeTitle(
} }
Text baseText(String text, double fontSize, Color color, Text baseText(String text, double fontSize, Color color,
{bool bold = false, TextAlign align}) { {bool bold = false,
TextAlign textAlign,
int maxLines = 1,
TextOverflow overflow}) {
return Text( return Text(
text, text,
textAlign: align ?? TextAlign.start, textAlign: textAlign ?? TextAlign.start,
textScaleFactor: 1.0, textScaleFactor: 1.0,
style: TextStyle( style: TextStyle(
decoration: TextDecoration.none, decoration: TextDecoration.none,
...@@ -98,6 +94,8 @@ Text baseText(String text, double fontSize, Color color, ...@@ -98,6 +94,8 @@ Text baseText(String text, double fontSize, Color color,
color: color, color: color,
fontStyle: FontStyle.normal, fontStyle: FontStyle.normal,
fontWeight: bold ? FontWeight.w500 : FontWeight.w400), fontWeight: bold ? FontWeight.w500 : FontWeight.w400),
maxLines: maxLines,
overflow: overflow == null ? TextOverflow.ellipsis : overflow,
); );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment