kidd3166 3 gadi atpakaļ
vecāks
revīzija
f943e7b37c

+ 1 - 0
lib/pages/my/feedback_page.dart

@@ -323,6 +323,7 @@ class _PageState extends State<FeedbackPage> with InjectLoginApi, InjectApi {
                           controller: _controller,
                           focusNode: _focusNode,
                           keyboardType: TextInputType.multiline,
+                          strutStyle: StrutStyle(forceStrutHeight: true, height: 1.4),
                           minLines: 1,
                           maxLines: 3,
                           maxLength: 200,

+ 28 - 1
lib/pages/social/new_social_index_page.dart

@@ -488,7 +488,8 @@ class _PageState extends ViewStateLifecycle<NewSocialIndexPage, SocialDetailMode
               });
         },
       ),
-      floatingActionButtonLocation: _EndFloatFloatingActionButtonLocation(),
+      floatingActionButtonLocation: const _EndFloatFloatingActionButtonLocation(),
+      floatingActionButtonAnimator:const _ScalingFabMotionAnimator(),
       floatingActionButton: InkWell(
         child: Image.asset("lib/assets/img/bbs_icon_edit.png"),
         onTap: () async {
@@ -545,3 +546,29 @@ class _EndFloatFloatingActionButtonLocation extends FloatingActionButtonLocation
   @override
   String toString() => 'FloatingActionButtonLocation.endFloat';
 }
+
+class _ScalingFabMotionAnimator extends FloatingActionButtonAnimator {
+  const _ScalingFabMotionAnimator();
+
+  @override
+  Offset getOffset({ Offset begin, Offset end, double progress }) {
+
+    return end;
+  }
+
+  @override
+  Animation<double> getScaleAnimation({ Animation<double> parent }) {
+    return AlwaysStoppedAnimation(1.0);
+  }
+
+  @override
+  Animation<double> getRotationAnimation({ Animation<double> parent }) {
+    return AlwaysStoppedAnimation(1.0);
+  }
+
+  // If the animation was just starting, we'll continue from where we left off.
+  // If the animation was finishing, we'll treat it as if we were starting at that point in reverse.
+  // This avoids a size jump during the animation.
+  @override
+  double getAnimationRestart(double previousValue) => 1.0;
+}

+ 27 - 22
lib/pages/social/search_page.dart

@@ -119,32 +119,37 @@ class _PageState extends State<SearchPage> with UserId, InjectApi {
                     width: 12,
                   ),
                   Image.asset("lib/assets/img/searchbar_icon_search.png"),
+                  Space(
+                    width: 6,
+                  ),
                   Expanded(
                       child: Selector<SearchModel, String>(
                     selector: (_, model) => model.searchValue,
-                    builder: (context, _value, child) => TextField(
-                      controller: _controller,
-                      maxLines: 1,
-                      focusNode: _focusNode,
-                      decoration: InputDecoration(
-                          hintText: '请输入搜索内容',
-                          contentPadding: EdgeInsets.symmetric(
-                              vertical: 11.5, horizontal: 6.0),
-                          border: InputBorder.none,
-                          hintStyle: TextStyle(color: Color(0xff999999))),
-                      onChanged: debounceValueChanged((value) {
-                        if(value != ""){
+                    builder: (context, _value, child) => Container(
+                      constraints: BoxConstraints(maxHeight: 30),
+                      child: TextField(
+                        controller: _controller,
+                        maxLines: 1,
+                        focusNode: _focusNode,
+                        decoration: InputDecoration(
+                            hintText: '请输入搜索内容',
+                            contentPadding: const EdgeInsets.symmetric(vertical: 4.0),
+                            border: OutlineInputBorder(borderSide: BorderSide.none),
+                            hintStyle: TextStyle(color: Color(0xff999999))),
+                        onChanged: debounceValueChanged((value) {
+                          if(value != ""){
+                            _submitValue(value);
+                          }
+                          _model.queryValue(value);
+                          Provider.of<SearchModel>(context, listen: false)
+                              .updateSearchValue(value);
+                        }),
+                        onSubmitted: (value) {
                           _submitValue(value);
-                        }
-                        _model.queryValue(value);
-                        Provider.of<SearchModel>(context, listen: false)
-                            .updateSearchValue(value);
-                      }),
-                      onSubmitted: (value) {
-                        _submitValue(value);
-                        // _searchModel.setKeyword(value);
-                        // Provider.of<SearchModel>(context, listen: false).queryValue(value);
-                      },
+                          // _searchModel.setKeyword(value);
+                          // Provider.of<SearchModel>(context, listen: false).queryValue(value);
+                        },
+                      ),
                     ),
                   )),
                   Visibility(

+ 2 - 4
lib/widgets/circular_percent_indicator.dart

@@ -475,15 +475,13 @@ class CirclePainter extends CustomPainter {
     }
   }
 
-  final Color _o = const Color(0xff16A2FF);
-  final Color _o1 = const Color(0xff8DF7FF);
+  final Color _o = const Color(0xff8DF7FF);
+  final Color _o1 = const Color(0xff16A2FF);
   _setColor(int val,int mCount) {
-    double one = (255 + 255) / (mCount * 2 / 3);
     int r = 0, g = 0, b = 0;
     r = (_o.red + (_o1.red - _o.red) * val / mCount).toInt();
     g = (_o.green + (_o1.green - _o.green) * val / mCount).toInt();
     b = (_o.blue + (_o1.blue - _o.blue) * val / mCount).toInt();
-    int d =  -val;
     return Color.fromRGBO(r,g,b, 1.0);
   }
   @override

+ 5 - 23
lib/widgets/menu_bar.dart

@@ -420,7 +420,7 @@ class _MenuBarState extends State<MenuBar>
                     ),
                   ),
                   Expanded(
-                    child: TextField(
+                    child: CupertinoTextField(
                       controller: _controller,
                       focusNode: _focusNode,
                       keyboardType: TextInputType.multiline,
@@ -442,28 +442,10 @@ class _MenuBarState extends State<MenuBar>
                         });
                         widget.scrollToBottom();
                       },
-                      decoration: InputDecoration(
-                        filled: true,
-                        fillColor: Color(0xfff1f1f1),
-                        counterText: "",
-                        hintText: "${widget.inputField}",
-                        contentPadding:
-                        EdgeInsets.symmetric(horizontal: 10.0, vertical: 0.0),
-                        border: OutlineInputBorder(
-                          borderSide:
-                          BorderSide(color: Color(0xfff1f1f1), width: 0.5),
-                          borderRadius: BorderRadius.all(Radius.circular(44.0)),
-                        ),
-                        focusedBorder: OutlineInputBorder(
-                          borderSide:
-                          BorderSide(color: Color(0xfff1f1f1), width: 1.0),
-                          borderRadius: BorderRadius.all(Radius.circular(10.0)),
-                        ),
-                        enabledBorder: OutlineInputBorder(
-                          borderSide:
-                          BorderSide(color: Color(0xfff1f1f1), width: 0.5),
-                          borderRadius: BorderRadius.all(Radius.circular(10.0)),
-                        ),
+                      decoration:  BoxDecoration(
+                        shape: BoxShape.rectangle,
+                        borderRadius: BorderRadius.all(Radius.circular(10)),
+                        color: Color(0xfff1f1f1)
                       ),
                     ),
                   ),