Bläddra i källkod

fix:v1.3版本的UI

Primroses 3 år sedan
förälder
incheckning
3f3dad3984

+ 2 - 2
lib/pages/game/game_info.dart

@@ -292,8 +292,8 @@ class GameItem extends StatelessWidget {
                   Text(
                     "$name",
                     style: bold
-                        ? Theme.of(context).textTheme.subtitle1.copyWith(fontSize: 16.0, fontWeight: FontWeight.w600)
-                        : Theme.of(context).textTheme.subtitle1.copyWith(fontSize: 16.0),
+                        ? Theme.of(context).textTheme.headline1.copyWith(fontSize: 16.0, fontWeight: FontWeight.w600)
+                        : Theme.of(context).textTheme.headline1.copyWith(fontSize: 16.0,fontWeight: FontWeight.bold),
                   ),
                   SizedBox(
                     height: 3,

+ 1 - 1
lib/pages/game/rank_info.dart

@@ -72,7 +72,7 @@ class _RankInfoState extends State<RankInfo> with InjectApi, AutomaticKeepAliveC
             ),
             // label
             Padding(
-              padding: const EdgeInsets.only(top: 5.0),
+              padding: const EdgeInsets.only(top: 0.0),
               child: buildLabelWidget(context, "运动评分榜"),
             ),
             // 游戏评分榜

+ 2 - 1
lib/pages/home/sport_history_all_page.dart

@@ -72,13 +72,14 @@ class _PageState extends ViewStateLifecycle<SportHistoryAllPage, SimpleModel> wi
                                 return GestureDetector(
                                   onTap: () => NavigatorUtil.goPage(context, (context) => SportHistoryPage(item.game)),
                                   child: Container(
-                                      margin: const EdgeInsets.only(top: ui_padding),
+                                      margin: index == 0 ?const EdgeInsets.only(top: 0) :const EdgeInsets.only(top: ui_padding),
                                       decoration: circular(),
                                       child: Column(
                                         children: <Widget>[
                                           Padding(
                                             padding: const EdgeInsets.fromLTRB(ui_padding, 14.0, ui_padding, 14.0),
                                             child: Row(
+                                              crossAxisAlignment: CrossAxisAlignment.start,
                                               children: <Widget>[
                                                 GestureDetector(
                                                   onTap: () => NavigatorUtil.goPage(context, (context) => GameDetailsPage(item.game)),

+ 4 - 1
lib/pages/my/achievement_detail_page.dart

@@ -521,7 +521,10 @@ Future<bool> showSharePopup(
                                                 "${relateAchievements[value].name}",
                                                 style: TextStyle(
                                                     fontSize: 18.0,
-                                                    color: Colors.white),
+                                                    color: Colors.white,
+                                                    fontWeight:
+                                                    FontWeight.bold
+                                                ),
                                               ),
                                               Space(
                                                 height: 10.0,

+ 342 - 182
lib/pages/my/feedback_page.dart

@@ -40,13 +40,17 @@ class _PageState extends State<FeedbackPage> with InjectLoginApi, InjectApi {
   FocusNode _focusNode;
   var _posting = false;
   int joinTime = 0;
+  ValueNotifier<bool> _postable = ValueNotifier(false);
 
   @override
   void initState() {
     initData();
 
     _focusNode = FocusNode();
-    _controller = TextEditingController();
+    _controller = TextEditingController()
+      ..addListener(() {
+        _postable.value = _controller.value.text.isNotEmpty;
+      });
 
     _isLoading = true;
     super.initState();
@@ -85,7 +89,10 @@ class _PageState extends State<FeedbackPage> with InjectLoginApi, InjectApi {
       list.insert(index, FeedBackInfoData(from: "-1", createTime: now));
       list.insert(index, FeedBackInfoData(from: "-2", createTime: now));
     } else {
-      list = [FeedBackInfoData(from: "-1", createTime: now), FeedBackInfoData(from: "-2", createTime: now)];
+      list = [
+        FeedBackInfoData(from: "-1", createTime: now),
+        FeedBackInfoData(from: "-2", createTime: now)
+      ];
       joinTime = now;
     }
 
@@ -96,7 +103,8 @@ class _PageState extends State<FeedbackPage> with InjectLoginApi, InjectApi {
       if (t == 0) {
         t = e.createTime;
       }
-      print("$t ${e.createTime} ${day} ${e.createTime + day} ${t > e.createTime + day}");
+      print(
+          "$t ${e.createTime} ${day} ${e.createTime + day} ${t > e.createTime + day}");
       if (t > e.createTime + day) {
         fixed.add(FeedBackInfoData(from: "-3", createTime: t));
       }
@@ -104,7 +112,8 @@ class _PageState extends State<FeedbackPage> with InjectLoginApi, InjectApi {
       t = e.createTime;
     }
     if (fixed.length > 2) {
-      fixed.add(FeedBackInfoData(from: "-3", createTime: fixed[fixed.length - 1].createTime));
+      fixed.add(FeedBackInfoData(
+          from: "-3", createTime: fixed[fixed.length - 1].createTime));
     }
 
     data.data = fixed;
@@ -127,177 +136,249 @@ class _PageState extends State<FeedbackPage> with InjectLoginApi, InjectApi {
                   builder: (context, model, child) {
                     return _isLoading
                         ? RequestLoadingWidget()
-                        : CustomScrollView(reverse: (_data.data?.length ?? 0) > 2, slivers: [
-                            SliverList(
-                              delegate: SliverChildListDelegate(
-                                _data.data
-                                    .map((e) => e.from == "-3"
-                                        ? Center(
-                                            child: Padding(
-                                                padding: EdgeInsets.symmetric(vertical: 8.0),
-                                                child: Text(
-                                                  "${DateFormat.formatTime(e.createTime)}",
-                                                  style: Theme.of(context).textTheme.bodyText1,
-                                                )),
-                                          )
-                                        : e.from == "-1"
-                                            ? Padding(
-                                                padding: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 12.0),
-                                                child: Row(
-                                                  crossAxisAlignment: CrossAxisAlignment.start,
-                                                  children: <Widget>[
-                                                    CircleAvatar(
-                                                      backgroundImage: CachedNetworkImageProvider(
-                                                          "https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2661558467,1288211245&fm=26&gp=0.jpg"),
-                                                      radius: 20,
-                                                    ),
-                                                    Space(
-                                                      width: 12,
-                                                    ),
-                                                    CustomPaint(
-                                                      painter: _BubblePainter(),
-                                                      child: Padding(
-                                                        padding: const EdgeInsets.fromLTRB(20.0, 8.0, 12, 8),
-                                                        child: Container(
-                                                          child: Text(
-                                                            "很高兴认识你",
-                                                            style: Theme.of(context).textTheme.subtitle1.copyWith(fontSize: 16),
-                                                          ),
-                                                        ),
-                                                      ),
-                                                    )
-                                                  ],
-                                                ),
+                        : CustomScrollView(
+                            reverse: (_data.data?.length ?? 0) > 2,
+                            slivers: [
+                                SliverList(
+                                  delegate: SliverChildListDelegate(
+                                    _data.data
+                                        .map((e) => e.from == "-3"
+                                            ? Center(
+                                                child: Padding(
+                                                    padding:
+                                                        EdgeInsets.symmetric(
+                                                            vertical: 8.0),
+                                                    child: Text(
+                                                      "${DateFormat.formatTime(e.createTime)}",
+                                                      style: Theme.of(context)
+                                                          .textTheme
+                                                          .bodyText1,
+                                                    )),
                                               )
-                                            : e.from == "-2"
+                                            : e.from == "-1"
                                                 ? Padding(
-                                                    padding: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 12.0),
+                                                    padding: const EdgeInsets
+                                                            .symmetric(
+                                                        vertical: 8.0,
+                                                        horizontal: 12.0),
                                                     child: Row(
-                                                      crossAxisAlignment: CrossAxisAlignment.start,
+                                                      crossAxisAlignment:
+                                                          CrossAxisAlignment
+                                                              .start,
                                                       children: <Widget>[
                                                         CircleAvatar(
-                                                          backgroundImage: CachedNetworkImageProvider(
-                                                              "https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2661558467,1288211245&fm=26&gp=0.jpg"),
+                                                          backgroundImage:
+                                                              CachedNetworkImageProvider(
+                                                                  "https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2661558467,1288211245&fm=26&gp=0.jpg"),
                                                           radius: 20,
                                                         ),
                                                         Space(
                                                           width: 12,
                                                         ),
                                                         CustomPaint(
-                                                          painter: _BubblePainter(),
+                                                          painter:
+                                                              _BubblePainter(),
                                                           child: Padding(
-                                                            padding: const EdgeInsets.fromLTRB(20.0, 8.0, 12, 8),
+                                                            padding:
+                                                                const EdgeInsets
+                                                                        .fromLTRB(
+                                                                    20.0,
+                                                                    8.0,
+                                                                    12,
+                                                                    8),
                                                             child: Container(
-                                                                child: Column(
-                                                              crossAxisAlignment: CrossAxisAlignment.start,
-                                                              children: <Widget>[
-                                                                Text(
-                                                                  "常见问题",
-                                                                  style: Theme.of(context).textTheme.subtitle1.copyWith(fontSize: 16),
-                                                                ),
-                                                                Column(
-                                                                  crossAxisAlignment: CrossAxisAlignment.start,
-                                                                  children: model.data.data
-                                                                      .map((e) => InkWell(
-                                                                          onTap: () {
-                                                                            NavigatorUtil.goPage(context, (context) => FeedbackDetailPage(e));
-                                                                            // NavigatorUtil.go(context, "${Routes.feedbackDetail}?data=${Uri.encodeComponent(json.encode(e))}");
-                                                                          },
-                                                                          child: Padding(
-                                                                            padding: EdgeInsets.symmetric(vertical: 5.0),
-                                                                            child: Text("${model.data.data.indexOf(e) + 1}.${e.groupName}",
-                                                                                style: Theme.of(context)
-                                                                                    .textTheme
-                                                                                    .subtitle1
-                                                                                    .copyWith(color: Color(0xff666666), fontSize: 16)),
-                                                                          )))
-                                                                      .toList(),
-                                                                ),
-                                                              ],
-                                                            )),
+                                                              child: Text(
+                                                                "很高兴认识你",
+                                                                style: Theme.of(
+                                                                        context)
+                                                                    .textTheme
+                                                                    .subtitle1
+                                                                    .copyWith(
+                                                                        fontSize:
+                                                                            16),
+                                                              ),
+                                                            ),
                                                           ),
-                                                        ),
+                                                        )
                                                       ],
                                                     ),
                                                   )
-                                                : Padding(
-                                                    padding: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 12.0),
-                                                    child: Row(
-                                                      crossAxisAlignment: CrossAxisAlignment.start,
-                                                      mainAxisAlignment: e.from == "user" ? MainAxisAlignment.end : MainAxisAlignment.start,
-                                                      children: e.from == "user"
-                                                          ? <Widget>[
-                                                              CustomPaint(
-                                                                  painter: _BubblePainterRight(),
-                                                                  child: ConstrainedBox(
-                                                                    constraints: BoxConstraints(maxWidth: MediaQuery.of(context).size.width * 0.6),
-                                                                    child: Container(
-                                                                      padding: EdgeInsets.fromLTRB(12, 6, 20, 8),
-                                                                      child: Column(
-                                                                        children: <Widget>[
-                                                                          Text(
-                                                                            "${e.content}",
-                                                                            style: Theme.of(context)
-                                                                                .textTheme
-                                                                                .subtitle1
-                                                                                .copyWith(fontSize: 16, color: Colors.white),
-                                                                          ),
-                                                                          if (e.images?.isNotEmpty == true)
-                                                                            GridView.count(
-                                                                                physics: new NeverScrollableScrollPhysics(),
-                                                                                shrinkWrap: true,
-                                                                                padding: EdgeInsets.zero,
-                                                                                crossAxisSpacing: 10.0,
-                                                                                crossAxisCount: e.images?.length ?? 0,
-                                                                                children: e.images
-                                                                                    .asMap()
-                                                                                    .keys
-                                                                                    .map((i) => CachedNetworkImage(
-                                                                                          imageUrl: e.images[i],
-                                                                                          fit: BoxFit.cover,
-                                                                                        ))
-                                                                                    .toList())
-                                                                        ],
-                                                                        crossAxisAlignment: CrossAxisAlignment.start,
-                                                                      ),
+                                                : e.from == "-2"
+                                                    ? Padding(
+                                                        padding:
+                                                            const EdgeInsets
+                                                                    .symmetric(
+                                                                vertical: 8.0,
+                                                                horizontal:
+                                                                    12.0),
+                                                        child: Row(
+                                                          crossAxisAlignment:
+                                                              CrossAxisAlignment
+                                                                  .start,
+                                                          children: <Widget>[
+                                                            CircleAvatar(
+                                                              backgroundImage:
+                                                                  CachedNetworkImageProvider(
+                                                                      "https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2661558467,1288211245&fm=26&gp=0.jpg"),
+                                                              radius: 20,
+                                                            ),
+                                                            Space(
+                                                              width: 12,
+                                                            ),
+                                                            CustomPaint(
+                                                              painter:
+                                                                  _BubblePainter(),
+                                                              child: Padding(
+                                                                padding:
+                                                                    const EdgeInsets
+                                                                            .fromLTRB(
+                                                                        20.0,
+                                                                        8.0,
+                                                                        12,
+                                                                        8),
+                                                                child: Container(
+                                                                    child: Column(
+                                                                  crossAxisAlignment:
+                                                                      CrossAxisAlignment
+                                                                          .start,
+                                                                  children: <
+                                                                      Widget>[
+                                                                    Text(
+                                                                      "常见问题",
+                                                                      style: Theme.of(
+                                                                              context)
+                                                                          .textTheme
+                                                                          .subtitle1
+                                                                          .copyWith(
+                                                                              fontSize: 16),
                                                                     ),
-                                                                  )),
-                                                              Space(
-                                                                width: 12,
-                                                              ),
-                                                              CircleAvatar(
-                                                                backgroundImage: userAvatarProvider(_user?.avatar),
-                                                                radius: 20,
-                                                              ),
-                                                            ]
-                                                          : <Widget>[
-                                                              CircleAvatar(
-                                                                backgroundImage: CachedNetworkImageProvider(
-                                                                    "https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2661558467,1288211245&fm=26&gp=0.jpg"),
-                                                                radius: 20,
-                                                              ),
-                                                              Space(
-                                                                width: 12,
+                                                                    Column(
+                                                                      crossAxisAlignment:
+                                                                          CrossAxisAlignment
+                                                                              .start,
+                                                                      children: model
+                                                                          .data
+                                                                          .data
+                                                                          .map((e) => InkWell(
+                                                                              onTap: () {
+                                                                                NavigatorUtil.goPage(context, (context) => FeedbackDetailPage(e));
+                                                                                // NavigatorUtil.go(context, "${Routes.feedbackDetail}?data=${Uri.encodeComponent(json.encode(e))}");
+                                                                              },
+                                                                              child: Padding(
+                                                                                padding: EdgeInsets.symmetric(vertical: 5.0),
+                                                                                child: Text("${model.data.data.indexOf(e) + 1}.${e.groupName}", style: Theme.of(context).textTheme.subtitle1.copyWith(color: Color(0xff666666), fontSize: 16)),
+                                                                              )))
+                                                                          .toList(),
+                                                                    ),
+                                                                  ],
+                                                                )),
                                                               ),
-                                                              CustomPaint(
-                                                                  painter: _BubblePainter(),
-                                                                  child: ConstrainedBox(
-                                                                    constraints: BoxConstraints(maxWidth: MediaQuery.of(context).size.width * 0.6),
-                                                                    child: Container(
-                                                                      padding: EdgeInsets.fromLTRB(12, 6, 20, 8),
-                                                                      child: Text(
-                                                                        "${e.content}",
-                                                                        style: Theme.of(context).textTheme.subtitle1.copyWith(fontSize: 16),
+                                                            ),
+                                                          ],
+                                                        ),
+                                                      )
+                                                    : Padding(
+                                                        padding:
+                                                            const EdgeInsets
+                                                                    .symmetric(
+                                                                vertical: 8.0,
+                                                                horizontal:
+                                                                    12.0),
+                                                        child: Row(
+                                                          crossAxisAlignment:
+                                                              CrossAxisAlignment
+                                                                  .start,
+                                                          mainAxisAlignment: e
+                                                                      .from ==
+                                                                  "user"
+                                                              ? MainAxisAlignment
+                                                                  .end
+                                                              : MainAxisAlignment
+                                                                  .start,
+                                                          children:
+                                                              e.from == "user"
+                                                                  ? <Widget>[
+                                                                      CustomPaint(
+                                                                          painter:
+                                                                              _BubblePainterRight(),
+                                                                          child:
+                                                                              ConstrainedBox(
+                                                                            constraints:
+                                                                                BoxConstraints(maxWidth: MediaQuery.of(context).size.width * 0.6),
+                                                                            child:
+                                                                                Container(
+                                                                              padding: EdgeInsets.fromLTRB(12, 6, 20, 8),
+                                                                              child: Column(
+                                                                                children: <Widget>[
+                                                                                  Text(
+                                                                                    "${e.content}",
+                                                                                    style: Theme.of(context).textTheme.subtitle1.copyWith(fontSize: 16, color: Color(0xff333333)),
+                                                                                  ),
+                                                                                  if (e.images?.isNotEmpty == true)
+                                                                                    GridView.count(
+                                                                                        physics: new NeverScrollableScrollPhysics(),
+                                                                                        shrinkWrap: true,
+                                                                                        padding: EdgeInsets.zero,
+                                                                                        crossAxisSpacing: 10.0,
+                                                                                        crossAxisCount: e.images?.length ?? 0,
+                                                                                        children: e.images
+                                                                                            .asMap()
+                                                                                            .keys
+                                                                                            .map((i) => CachedNetworkImage(
+                                                                                                  imageUrl: e.images[i],
+                                                                                                  fit: BoxFit.cover,
+                                                                                                ))
+                                                                                            .toList())
+                                                                                ],
+                                                                                crossAxisAlignment: CrossAxisAlignment.start,
+                                                                              ),
+                                                                            ),
+                                                                          )),
+                                                                      Space(
+                                                                        width:
+                                                                            12,
                                                                       ),
-                                                                    ),
-                                                                  )),
-                                                            ],
-                                                    ),
-                                                  ))
-                                    .toList(),
-                              ),
-                            )
-                          ]);
+                                                                      CircleAvatar(
+                                                                        backgroundImage:
+                                                                            userAvatarProvider(_user?.avatar),
+                                                                        radius:
+                                                                            20,
+                                                                      ),
+                                                                    ]
+                                                                  : <Widget>[
+                                                                      CircleAvatar(
+                                                                        backgroundImage:
+                                                                            CachedNetworkImageProvider("https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2661558467,1288211245&fm=26&gp=0.jpg"),
+                                                                        radius:
+                                                                            20,
+                                                                      ),
+                                                                      Space(
+                                                                        width:
+                                                                            12,
+                                                                      ),
+                                                                      CustomPaint(
+                                                                          painter:
+                                                                              _BubblePainter(),
+                                                                          child:
+                                                                              ConstrainedBox(
+                                                                            constraints:
+                                                                                BoxConstraints(maxWidth: MediaQuery.of(context).size.width * 0.6),
+                                                                            child:
+                                                                                Container(
+                                                                              padding: EdgeInsets.fromLTRB(12, 6, 20, 8),
+                                                                              child: Text(
+                                                                                "${e.content}",
+                                                                                style: Theme.of(context).textTheme.subtitle1.copyWith(fontSize: 16),
+                                                                              ),
+                                                                            ),
+                                                                          )),
+                                                                    ],
+                                                        ),
+                                                      ))
+                                        .toList(),
+                                  ),
+                                )
+                              ]);
                   },
                 ),
               ),
@@ -313,8 +394,10 @@ class _PageState extends State<FeedbackPage> with InjectLoginApi, InjectApi {
                         _postImage();
                       },
                       child: Padding(
-                        padding: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 12.0),
-                        child: Image.asset("lib/assets/img/bbs_icon_picture.png"),
+                        padding: const EdgeInsets.symmetric(
+                            vertical: 8.0, horizontal: 12.0),
+                        child:
+                            Image.asset("lib/assets/img/bbs_icon_picture.png"),
                       ),
                     ),
                     Expanded(
@@ -323,17 +406,25 @@ class _PageState extends State<FeedbackPage> with InjectLoginApi, InjectApi {
                           controller: _controller,
                           focusNode: _focusNode,
                           keyboardType: TextInputType.multiline,
-                          strutStyle: StrutStyle(forceStrutHeight: true, height: 1.4),
+                          strutStyle:
+                              StrutStyle(forceStrutHeight: true, height: 1.4),
                           minLines: 1,
                           maxLines: 3,
                           maxLength: 200,
+                          style: TextStyle(fontSize: 16.0),
                           onChanged: (value) {
-                             setState(() {
+                            setState(() {
                               _textFieldValue = value;
-                             });
+                            });
                           },
                           decoration: InputDecoration(
-                              counterText: "", hintText: "提交你的反馈...", contentPadding: EdgeInsets.symmetric(vertical: 16.0), border: InputBorder.none),
+                              counterText: "",
+                              hintText: "提交你的反馈...",
+                              contentPadding:
+                                  EdgeInsets.symmetric(vertical: 16.0),
+                              border: InputBorder.none,
+                            hintStyle: TextStyle(color: Color(0xff999999))
+                          ),
                         ),
                       ),
                     ),
@@ -345,18 +436,21 @@ class _PageState extends State<FeedbackPage> with InjectLoginApi, InjectApi {
                               width: 22,
                               child: CircularProgressIndicator(),
                             )
-                          : PrimaryButton(
-                              width: 80,
-                              height: 35,
-                              callback: _textFieldValue.isEmpty
-                                  ? null
-                                  : () async {
+                          :
+                          ValueListenableBuilder(
+                              valueListenable: _postable,
+                              builder: (_, able, __) => PrimaryButton(
+                                    content: "提交",
+                                    width: 80,
+                                    height: 35,
+                                    callback: () async {
                                       setState(() {
                                         _posting = true;
                                       });
                                       _controller.clear();
 
-                                      await _postFeedBackpostFeedBack(_textFieldValue);
+                                      await _postFeedBackpostFeedBack(
+                                          _textFieldValue);
                                       // ToastUtil.show("提交成功");
 
                                       setState(() {
@@ -364,10 +458,12 @@ class _PageState extends State<FeedbackPage> with InjectLoginApi, InjectApi {
                                         _posting = false;
                                       });
                                       refresh();
-//                      SystemChannels.textInput.invokeMethod('TextInput.hide');
                                     },
-                              content: "提交",
-                            ),
+                                    shadow: able == true,
+                                    buttonColor: able == false
+                                        ? Color(0xffFFC400).withOpacity(0.3)
+                                        : null,
+                                  )),
                     )
                   ],
                 ),
@@ -412,7 +508,8 @@ class _PageState extends State<FeedbackPage> with InjectLoginApi, InjectApi {
 
   _postFeedBackpostFeedBack(String content, {int typeId = 0}) async {
     typeId == null ? typeId = 0 : typeId = typeId;
-    await api.postFeedback(typeId, content, extra: await Application.getDeviceInfo());
+    await api.postFeedback(typeId, content,
+        extra: await Application.getDeviceInfo());
   }
 }
 
@@ -459,7 +556,8 @@ class PostActionState extends State<PostAction> with InjectApi {
         Asset asset = imageList[i];
         if (upload.containsKey(asset)) continue;
         ByteData byteData = await asset.getByteData(quality: 85);
-        File file = File('${directory.path}/${DateTime.now().millisecondsSinceEpoch}_$i.jpg');
+        File file = File(
+            '${directory.path}/${DateTime.now().millisecondsSinceEpoch}_$i.jpg');
         List<int> bytes = byteData.buffer.asUint8List().toList();
         print('临时文件 ${file.path} ${bytes.length}');
         file.writeAsBytesSync(bytes);
@@ -474,7 +572,9 @@ class PostActionState extends State<PostAction> with InjectApi {
 
     _msg.value = "发布中...";
     // await Future.delayed(Duration(seconds: 3));
-    var data = await api.postFeedback(0, '图片', images: json.encode(upload.values.toList()), extra: await Application.getDeviceInfo());
+    var data = await api.postFeedback(0, '图片',
+        images: json.encode(upload.values.toList()),
+        extra: await Application.getDeviceInfo());
     print(data);
     if (data.code == 0) {
       Navigator.of(context).pop(true);
@@ -492,7 +592,10 @@ class PostActionState extends State<PostAction> with InjectApi {
           CircularProgressIndicator(),
           Padding(
             padding: const EdgeInsets.only(top: 15),
-            child: ValueListenableBuilder(valueListenable: _msg, builder: (BuildContext context, String value, Widget child) => Text(value)),
+            child: ValueListenableBuilder(
+                valueListenable: _msg,
+                builder: (BuildContext context, String value, Widget child) =>
+                    Text(value)),
           )
         ],
       ),
@@ -500,6 +603,55 @@ class PostActionState extends State<PostAction> with InjectApi {
   }
 }
 
+//class _BubblePainter extends CustomPainter {
+//  final circular = Radius.circular(10);
+//  final Paint _paint = Paint()..color = Colors.white;
+//  final double _bubbleWidth = 10;
+//
+//  @override
+//  void paint(Canvas canvas, Size size) {
+////    Path path = Path()..moveTo(size.width,  size.height / 2)..quadraticBezierTo(size.width / 3*2, size.height / 2 + 50, 0, size.height / 2)
+////    ..quadraticBezierTo(size.width / 3, size.height,size.width,size.height)..close();
+//    Path path = Path()
+//      ..moveTo(_bubbleWidth + 1, _bubbleWidth)
+//      ..quadraticBezierTo(_bubbleWidth / 3 * 2, _bubbleWidth + 4, 0, _bubbleWidth)
+//      ..quadraticBezierTo(_bubbleWidth / 3, _bubbleWidth + _bubbleWidth / 2, _bubbleWidth + 1, _bubbleWidth * 2)
+//      ..close();
+//    canvas.drawPath(path, _paint);
+//    canvas.drawRRect(RRect.fromLTRBR(_bubbleWidth, 0, size.width, size.height, circular), _paint);
+//  }
+//
+//  @override
+//  bool shouldRepaint(CustomPainter oldDelegate) {
+//    return oldDelegate != this;
+//  }
+//}
+//
+//class _BubblePainterRight extends CustomPainter {
+//  final circular = Radius.circular(10);
+//  final Paint _paint = Paint()..color = Color(0xffFFC400);
+//  final double _bubbleWidth = 10;
+//
+//  @override
+//  void paint(Canvas canvas, Size size) {
+////    Path path = Path()..moveTo(size.width,  size.height / 2)..quadraticBezierTo(size.width / 3*2, size.height / 2 + 50, 0, size.height / 2)
+////    ..quadraticBezierTo(size.width / 3, size.height,size.width,size.height)..close();
+//    double left = size.width - _bubbleWidth;
+//    Path path = Path()
+//      ..moveTo(left, _bubbleWidth)
+//      ..quadraticBezierTo(left + _bubbleWidth / 3 * 2, _bubbleWidth + 4, size.width, _bubbleWidth)
+//      ..quadraticBezierTo(left + _bubbleWidth / 3, _bubbleWidth + _bubbleWidth / 2, left, _bubbleWidth * 2)
+//      ..close();
+//    canvas.drawPath(path, _paint);
+//    canvas.drawRRect(RRect.fromLTRBR(0, 0, size.width - _bubbleWidth, size.height, circular), _paint);
+//  }
+//
+//  @override
+//  bool shouldRepaint(CustomPainter oldDelegate) {
+//    return oldDelegate != this;
+//  }
+//}
+
 class _BubblePainter extends CustomPainter {
   final circular = Radius.circular(10);
   final Paint _paint = Paint()..color = Colors.white;
@@ -511,11 +663,15 @@ class _BubblePainter extends CustomPainter {
 //    ..quadraticBezierTo(size.width / 3, size.height,size.width,size.height)..close();
     Path path = Path()
       ..moveTo(_bubbleWidth + 1, _bubbleWidth)
-      ..quadraticBezierTo(_bubbleWidth / 3 * 2, _bubbleWidth + 4, 0, _bubbleWidth)
-      ..quadraticBezierTo(_bubbleWidth / 3, _bubbleWidth + _bubbleWidth / 2, _bubbleWidth + 1, _bubbleWidth * 2)
+      ..quadraticBezierTo(
+          _bubbleWidth / 3 * 2, _bubbleWidth + 4, 0, _bubbleWidth)
+      ..quadraticBezierTo(_bubbleWidth / 3, _bubbleWidth + _bubbleWidth / 2,
+          _bubbleWidth + 1, _bubbleWidth * 2)
       ..close();
     canvas.drawPath(path, _paint);
-    canvas.drawRRect(RRect.fromLTRBR(_bubbleWidth, 0, size.width, size.height, circular), _paint);
+    canvas.drawRRect(
+        RRect.fromLTRBR(_bubbleWidth, 0, size.width, size.height, circular),
+        _paint);
   }
 
   @override
@@ -526,7 +682,7 @@ class _BubblePainter extends CustomPainter {
 
 class _BubblePainterRight extends CustomPainter {
   final circular = Radius.circular(10);
-  final Paint _paint = Paint()..color = Color(0xffFFC400);
+  final Paint _paint = Paint()..color = Color(0xffffe400).withOpacity(0.7);
   final double _bubbleWidth = 10;
 
   @override
@@ -536,11 +692,15 @@ class _BubblePainterRight extends CustomPainter {
     double left = size.width - _bubbleWidth;
     Path path = Path()
       ..moveTo(left, _bubbleWidth)
-      ..quadraticBezierTo(left + _bubbleWidth / 3 * 2, _bubbleWidth + 4, size.width, _bubbleWidth)
-      ..quadraticBezierTo(left + _bubbleWidth / 3, _bubbleWidth + _bubbleWidth / 2, left, _bubbleWidth * 2)
+      ..quadraticBezierTo(left + _bubbleWidth / 3 * 2, _bubbleWidth + 2,
+          size.width, _bubbleWidth)
+      ..quadraticBezierTo(left + _bubbleWidth / 3,
+          _bubbleWidth + _bubbleWidth / 2, left, _bubbleWidth * 2)
       ..close();
     canvas.drawPath(path, _paint);
-    canvas.drawRRect(RRect.fromLTRBR(0, 0, size.width - _bubbleWidth, size.height, circular), _paint);
+    canvas.drawRRect(
+        RRect.fromLTRBR(0, 0, size.width - _bubbleWidth, size.height, circular),
+        _paint);
   }
 
   @override

+ 14 - 1
lib/pages/my/game_list_page.dart

@@ -123,7 +123,20 @@ class _GameListPageState extends State<GameListPage> with InjectApi, WidgetsBind
           children: <Widget>[
             Row(
               children: <Widget>[
-                CircleAvatar(backgroundImage: CachedNetworkImageProvider(data.cover), radius: 35.0),
+//                CircleAvatar(backgroundImage: CachedNetworkImageProvider(data.cover), radius: 35.0),
+                Container(
+                  width: 70.0,
+                  height: 70.0,
+//                  margin: EdgeInsets.only(right: 12.0),
+                  child: ClipRRect(
+                    child: CachedNetworkImage(
+                      imageUrl: data.cover,
+                      fit: BoxFit.cover,
+                    ),
+                    // 也可控件一边圆角大小
+                    borderRadius: new BorderRadius.all(Radius.circular(6.0)),
+                  ),
+                ),
                 Expanded(
                   child: Padding(
                     padding: const EdgeInsets.symmetric(horizontal: 12.0),

+ 1 - 1
lib/pages/my/level_page.dart

@@ -185,7 +185,7 @@ class _PageState extends State<LevelPage> with InjectLoginApi {
                                         imageUrl: _data.level.logo ?? "",fit: BoxFit.contain,))),
                             Text(
                               "Lv.${_data.level.level}",
-                              style: Theme.of(context).textTheme.headline3,
+                              style: Theme.of(context).textTheme.headline3.copyWith(fontSize: 20.0),
                             ),
                             Space(
                               height: 24,

+ 1 - 1
lib/pages/social/post_widget.dart

@@ -431,7 +431,7 @@ class _PostWidgetState extends State<PostWidget> with InjectApi {
                     crossAxisAlignment: CrossAxisAlignment.start,
                     children: <Widget>[
                       Padding(
-                        padding: const EdgeInsets.only(top: 12.0),
+                        padding: const EdgeInsets.only(top: 6.0),
                         child: Column(
                           crossAxisAlignment: CrossAxisAlignment.start,
                           children: <Widget>[

+ 30 - 21
lib/widgets/dialog/share_popup.dart

@@ -1,4 +1,5 @@
 import 'dart:math';
+import 'dart:ui';
 
 import 'package:cached_network_image/cached_network_image.dart';
 import 'package:flutter/cupertino.dart';
@@ -268,28 +269,36 @@ class _sharePopupState extends State<sharePopup> {
   Widget build(BuildContext context) {
     print(widget.list);
     // TODO: implement build
-    return Material(
-      color: Colors.black.withOpacity(0.5),
-      child: Column(
-        mainAxisAlignment: MainAxisAlignment.start,
-        children: <Widget>[
-          Expanded(
-            child: Center(
-              // stack 需要一个高度进行搞一搞
-              child: Stack(
-                children: widget.list.reversed.map((e) {
-                  return Transform.translate(
-                      offset: Offset((widget.list.indexOf(e) + 1) * 5.0,
-                          -(widget.list.indexOf(e)) * 5.0),
+    return BackdropFilter(
+      //背景滤镜
+      filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
+      child: Scaffold(
+          backgroundColor: Colors.black.withOpacity(0.8),
+          body: GestureDetector(
+              onTap: () {
+                Navigator.maybePop(context);
+              },
+              behavior: HitTestBehavior.opaque,
+              child: Column(
+                mainAxisAlignment: MainAxisAlignment.start,
+                children: <Widget>[
+                  Expanded(
+                    child: Center(
+                      // stack 需要一个高度进行搞一搞
+                      child: Stack(
+                        children: widget.list.reversed.map((e) {
+                          return Transform.translate(
+                              offset: Offset((widget.list.indexOf(e) + 1) * 5.0,
+                                  -(widget.list.indexOf(e)) * 5.0),
 //                      padding: EdgeInsets.only(
 //                          right: (data.indexOf(e)) * 10.0,
 //                          top: (data.indexOf(e)) * 10.0),
-                      child: content(
-                          e, widget.list.indexOf(e), widget.list.length));
-                }).toList(),
-              ),
-            ),
-          ),
+                              child: content(e, widget.list.indexOf(e),
+                                  widget.list.length));
+                        }).toList(),
+                      ),
+                    ),
+                  ),
 //          if (data.length > 0)
 //            InkWell(
 //              child: Image.asset("lib/assets/img/pop_share_chose.png"),
@@ -303,8 +312,8 @@ class _sharePopupState extends State<sharePopup> {
 //                }
 //              },
 //            )
-        ],
-      ),
+                ],
+              ))),
     );
   }
 }

+ 3 - 2
lib/widgets/menu_bar.dart

@@ -451,8 +451,9 @@ class _MenuBarState extends State<MenuBar> with WidgetsBindingObserver, InjectAp
                               // 这里可能传不了 callback 所有需要的值都在menu bar里面 只能通过传 不同的 场景 进行 不同的操作
                             },
                             shadow: able == true,
-                            buttonColor: able == false  ? Color(0xffd2d2d2) : null,
-                          )),
+//                            buttonColor: able == false  ? Color(0xffd2d2d2) : null,
+                              buttonColor: able == false ? Color(0xffFFC400).withOpacity(0.3) : null,
+                      )),
                 ],
               )),
         // 底部的骚操作

+ 3 - 2
lib/widgets/misc.dart

@@ -47,7 +47,7 @@ Widget buildLabelWidget(BuildContext context, String title) {
       padding: EdgeInsets.fromLTRB(ui_padding, 10.0, ui_padding, 10.0),
       child: Text(
         title,
-        style: Theme.of(context).textTheme.headline1,
+        style: Theme.of(context).textTheme.headline1.copyWith(fontSize: 16.0,),
       ));
 }
 
@@ -117,7 +117,8 @@ Widget achievementWidget(BuildContext context, Achievement item, {double w = 70,
             ),
             Text(
               item.seriesName  != null ? item.seriesName : item.name,
-              style: Theme.of(context).textTheme.subtitle1.copyWith(fontSize: w < 80 ? 12 : 14),
+//              style: Theme.of(context).textTheme.subtitle1.copyWith(fontSize: w < 80 ? 12 : 14),
+            style:Theme.of(context).textTheme.subtitle1.copyWith(fontSize: 12)
             )
           ],
         ),

+ 76 - 18
lib/widgets/text_input.dart

@@ -21,7 +21,15 @@ class TextInput extends StatefulWidget {
   final bool autoFocus;
   final bool atUser;
 
-  TextInput(this.subjectId, {this.focusNode, this.parentCommentId, this.toCommentId, this.callback, this.comment = false, this.user, this.autoFocus = false, this.atUser = true});
+  TextInput(this.subjectId,
+      {this.focusNode,
+      this.parentCommentId,
+      this.toCommentId,
+      this.callback,
+      this.comment = false,
+      this.user,
+      this.autoFocus = false,
+      this.atUser = true});
 
   @override
   State<StatefulWidget> createState() {
@@ -34,12 +42,17 @@ class _TextInputState extends State<TextInput> with InjectApi {
   TextEditingController _controller;
   FocusNode _focusNode;
   var _posting = false;
+  ValueNotifier<bool> _postable = ValueNotifier(false);
 
   @override
   void initState() {
     super.initState();
     _focusNode = widget.focusNode ?? FocusNode();
-    _controller = TextEditingController();
+    _controller = TextEditingController()
+      ..addListener(() {
+        _postable.value = _controller.value.text.isNotEmpty;
+      });
+
     if (widget.comment) {
       WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
         FocusScope.of(context).requestFocus(_focusNode);
@@ -82,14 +95,16 @@ class _TextInputState extends State<TextInput> with InjectApi {
                     decoration: InputDecoration(
                         counterText: "",
                         hintText: "发表你的看法...",
-                        hintStyle: TextStyle(color: Color(0xff999999),fontSize: 15.0),
+                        hintStyle:
+                            TextStyle(color: Color(0xff999999), fontSize: 15.0),
                         prefixIconConstraints: BoxConstraints(minWidth: 36),
                         prefixIcon: Padding(
-                          padding: const EdgeInsets.fromLTRB(12.0 ,0,0,0),
+                          padding: const EdgeInsets.fromLTRB(12.0, 0, 0, 0),
                           child: Row(
                             mainAxisSize: MainAxisSize.min,
                             children: <Widget>[
-                              Image.asset("lib/assets/img/bbs_icon_reportx.png"),
+                              Image.asset(
+                                  "lib/assets/img/bbs_icon_reportx.png"),
                               SizedBox(
                                 width: 4,
                               ),
@@ -117,21 +132,58 @@ class _TextInputState extends State<TextInput> with InjectApi {
                         width: 22,
                         child: CircularProgressIndicator(),
                       )
-                    : PrimaryButton(
-                        width: 80,
-                        height: 35,
-                        callback: _textFieldValue.isEmpty
-                            ? null
-                            : () async {
-                                if (await showBindPhoneDialog(context) != true) {
+                    :
+//                PrimaryButton(
+//                        width: 80,
+//                        height: 35,
+//                        callback: _textFieldValue.isEmpty
+//                            ? null
+//                            : () async {
+//                                if (await showBindPhoneDialog(context) != true) {
+//                                  return;
+//                                }
+//                                setState(() {
+//                                  _posting = true;
+//                                });
+//                                var resp = await api
+//                                    .postForumComment(widget.subjectId, _textFieldValue,
+//                                        parentCommentId: widget.parentCommentId, toCommentId: widget.toCommentId)
+//                                    .catchError((e) {});
+//                                if (resp != null && resp.code == 0) {
+//                                  ToastUtil.show("发表成功");
+//                                  _controller?.clear();
+//                                  _focusNode?.unfocus();
+//                                  widget.callback?.call();
+//                                  _textFieldValue = '';
+//                                  CommentNotification(Comment(id: resp.data.commentId, subjectId: widget.subjectId), CommentNotification.TYPE_ADD)
+//                                      .dispatch(context);
+//                                }
+//                                setState(() {
+//                                  _posting = false;
+//                                });
+////                      SystemChannels.textInput.invokeMethod('TextInput.hide');
+//                              },
+//                        content: "发表",
+//                      ),
+                    ValueListenableBuilder(
+                        valueListenable: _postable,
+                        builder: (_, able, __) => PrimaryButton(
+                              content: "发表",
+                              width: 80,
+                              height: 35,
+                              callback: () async {
+                                if (await showBindPhoneDialog(context) !=
+                                    true) {
                                   return;
                                 }
                                 setState(() {
                                   _posting = true;
                                 });
                                 var resp = await api
-                                    .postForumComment(widget.subjectId, _textFieldValue,
-                                        parentCommentId: widget.parentCommentId, toCommentId: widget.toCommentId)
+                                    .postForumComment(
+                                        widget.subjectId, _textFieldValue,
+                                        parentCommentId: widget.parentCommentId,
+                                        toCommentId: widget.toCommentId)
                                     .catchError((e) {});
                                 if (resp != null && resp.code == 0) {
                                   ToastUtil.show("发表成功");
@@ -139,16 +191,22 @@ class _TextInputState extends State<TextInput> with InjectApi {
                                   _focusNode?.unfocus();
                                   widget.callback?.call();
                                   _textFieldValue = '';
-                                  CommentNotification(Comment(id: resp.data.commentId, subjectId: widget.subjectId), CommentNotification.TYPE_ADD)
+                                  CommentNotification(
+                                          Comment(
+                                              id: resp.data.commentId,
+                                              subjectId: widget.subjectId),
+                                          CommentNotification.TYPE_ADD)
                                       .dispatch(context);
                                 }
                                 setState(() {
                                   _posting = false;
                                 });
-//                      SystemChannels.textInput.invokeMethod('TextInput.hide');
                               },
-                        content: "发表",
-                      ),
+                              shadow: able == true,
+                              buttonColor: able == false
+                                  ? Color(0xffFFC400).withOpacity(0.3)
+                                  : null,
+                            )),
               )
             ],
           ),