Git Product home page Git Product logo

marqueewidget's Introduction

  • 👋 Hi, I’m @baoolong
  • 👀 I’m interested in ...
  • 🌱 I’m currently learning ...
  • 💞️ I’m looking to collaborate on ...
  • 📫 How to reach me ...

marqueewidget's People

Contributors

baoolong 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

Watchers

 avatar  avatar

marqueewidget's Issues

Speed

Hello,

How to increase the speed?

添加了富文本支持,方便处理颜色变化

class MarqueeWidget extends StatefulWidget{

final String text;
final TextStyle textStyle;
final RichText richText;
///滚动方向,水平或者垂直
final Axis scrollAxis;
///空白部分占控件的百分比
final double ratioOfBlankToScreen;

MarqueeWidget({
this.text,
this.textStyle,
this.richText,
this.scrollAxis:Axis.horizontal,
this.ratioOfBlankToScreen:0.25,
}) :assert((text!=null)||(null!=richText));

@OverRide
State createState() {
return new MarqueeWidgetState();
}
}


Widget getBothEndsChild(){
if(widget.scrollAxis ==Axis.vertical){
assert(null != widget.text);
String newString=widget.text.split("").join("\n");
return new Center(
child: new Text(newString,style: widget.textStyle,textAlign: TextAlign.center,),
);
}
if (null != widget.richText){
return Center(child: widget.richText);
}

return new Center(
    child:new Text(widget.text,style: widget.textStyle,)
);

}

这两个定义/方法加了一点内容,不知道怎么提交。。。

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.