Giter Site home page Giter Site logo

fsearch's People

Contributors

fliggyandroid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

fsearch's Issues

设置 margin 后输入文本整体偏下,刚好是未设置margin时居中的位置

[✓] Flutter (Channel stable, v1.17.1, on Mac OS X 10.15.5 19F101, locale zh-Hans-CN)
• Flutter version 1.17.1 at ***
• Framework revision f7a6a7906b (6 weeks ago), 2020-05-12 18:39:00 -0700
• Engine revision 6bc433c6b6
• Dart version 2.8.2

代码:
class SearchBar extends StatelessWidget implements PreferredSizeWidget {
Color appBarBackgroundColor;

SearchBar({this.appBarBackgroundColor});

@OverRide
Size get preferredSize => Size.fromHeight(kToolbarHeight);

@OverRide
Widget build(BuildContext context) {
appBarBackgroundColor ??= Theme.of(context).appBarTheme.color;
return Container(
color: appBarBackgroundColor,
child: SafeArea(
child: FSearch(
enable: true,
width: double.maxFinite,
height: double.maxFinite,
corner: FSearchCorner.all(18.0),
cornerStyle: FSearchCornerStyle.round,
strokeColor: UiColors.primaryColor,
strokeWidth: 0.5,
backgroundColor: appBarBackgroundColor,
shadowColor: UiColors.textGrey3,
shadowOffset: Offset(2.0, 2.0),
shadowBlur: 4.0,
padding: EdgeInsets.fromLTRB(10, 0, 20, 0),
// margin: EdgeInsets.fromLTRB(16, 10, 16, 10),
style: TextStyle(fontSize: 18, color: UiColors.textGrey0),
prefixes: [
Padding(
padding: EdgeInsets.only(left: 5, top: 6, bottom: 5),
child: Icon(Icons.search, color: UiColors.textGrey1),
)
],
hints: ['大家都在搜:李沁'],
hintStyle: TextStyle(fontSize: 18, color: UiColors.textGrey1),
onTap: () {
log('onTap');
},
),
),
);
}
}

device-2020-06-23-165812
device-2020-06-23-170213

hints设置一个 不显示,圆角设置了所有但是左上角的没有圆角

FSearch(
                  corner: FSearchCorner(
                      leftTopCorner: 18,
                      leftBottomCorner: 18,
                      rightTopCorner: 18,
                      rightBottomCorner: 18),
                  cornerStyle: FSearchCornerStyle.round,
                  strokeColor: Colors.blue,
                  center: true,
                  hints: ["请输入讲师姓名搜索"],
                  // hintPrefix: Icon(Icons.search),
                  width: width - 80,
                  height: 36,
                  backgroundColor: ColorUtil.fromHex("#F4F5F6"),
                  hintStyle: TextStyle(fontSize: 14),
                )

请问光标和输入的rearing会往下偏移是咋回事呀!

这个是我的代码
FSearch(
controller: controller,
height: 30,
backgroundColor: Colours.bg_gray,
corner: FSearchCorner.all(14),
style: TextStyle(fontSize: 12.0, color: Colors.black),
margin: EdgeInsets.only(left: 12.0, right: 12.0),
hints: ["", ""],
hintStyle: TextStyle(fontSize: 12.0, color: Colors.black),
prefixes: [
const SizedBox(width: 15.0),
Icon(
Icons.search,
size: 18,
color: Colours.text_tab_black,
),
const SizedBox(width: 3.0)
],
onSearch: (value) {
setState(() {});
},
),

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.