Пример #1
0
 public CustomButton(
     Key key = null,
     GestureTapCallback onPressed = null,
     EdgeInsets padding           = null,
     Color backgroundColor        = null,
     Widget child = null
     ) : base(key)
 {
     this.onPressed       = onPressed;
     this.padding         = padding ?? EdgeInsets.all(8.0f);
     this.backgroundColor = backgroundColor;
     this.child           = child;
 }
Пример #2
0
 public MoreListTile(
     string imageName,
     string title,
     EdgeInsets padding         = null,
     GestureTapCallback onPress = null,
     Key key = null
     ) : base(key: key)
 {
     this.imageName = imageName;
     this.title     = title;
     this.padding   = padding;
     this.onPress   = onPress;
 }
Пример #3
0
 public ArticleCard(
     Article article,
     GestureTapCallback onTap        = null,
     GestureTapCallback moreCallBack = null,
     string fullName = null,
     Key key         = null
     ) : base(key)
 {
     this.article      = article;
     this.fullName     = fullName;
     this.onTap        = onTap;
     this.moreCallBack = moreCallBack;
 }
Пример #4
0
 public BlankView(
     string title,
     string imageName,
     bool canRefresh = false,
     GestureTapCallback tapCallback = null,
     Key key = null
     ) : base(key: key)
 {
     this.title       = title;
     this.imageName   = imageName;
     this.canRefresh  = canRefresh;
     this.tapCallback = tapCallback;
 }
Пример #5
0
 public ActionCard(
     IconData iconData,
     string title,
     bool done,
     GestureTapCallback onTap = null,
     Key key = null
     ) : base(key)
 {
     this.title    = title;
     this.iconData = iconData;
     this.done     = done;
     this.onTap    = onTap;
 }
Пример #6
0
 public MemberCard(
     ChannelMember member,
     GestureTapCallback onTap    = null,
     UserType userType           = UserType.unFollow,
     GestureTapCallback onFollow = null,
     Key key = null
     ) : base(key: key)
 {
     this.member   = member;
     this.onTap    = onTap;
     this.userType = userType;
     this.onFollow = onFollow;
 }
Пример #7
0
 public TeamCard(
     Team team,
     GestureTapCallback onTap    = null,
     UserType userType           = UserType.unFollow,
     GestureTapCallback onFollow = null,
     Key key = null
     ) : base(key: key)
 {
     this.team     = team;
     this.onTap    = onTap;
     this.userType = userType;
     this.onFollow = onFollow;
 }
Пример #8
0
 RelatedArticleCard(
     Article article,
     User user = null,
     Team team = null,
     GestureTapCallback onTap = null,
     Key key = null
     ) : base(key)
 {
     this.article = article;
     this.onTap   = onTap;
     this.user    = user;
     this.team    = team;
 }
Пример #9
0
 public CustomButton(
     Key key = null,
     GestureTapCallback onPressed = null,
     EdgeInsets padding           = null,
     Color backgroundColor        = null,
     Widget child = null
     ) : base(key: key)
 {
     this.onPressed       = onPressed;
     this.padding         = padding ?? EdgeInsets.all(8.0f);
     this.backgroundColor = backgroundColor ?? AsScreenCanvas.CLColors.transparent;
     this.child           = child;
 }
Пример #10
0
 public RelatedArticleCard(
     Article article,
     string fullName,
     GestureTapCallback onTap = null,
     bool topPadding          = false,
     Key key = null
     ) : base(key: key)
 {
     this.article    = article;
     this.fullName   = fullName;
     this.topPadding = topPadding;
     this.onTap      = onTap;
 }
Пример #11
0
        public TextField(Key key = null, TextEditingController controller                = null, FocusNode focusNode         = null,
                         InputDecoration decoration            = null, bool noDecoration = false, TextInputType keyboardType = null,
                         TextInputAction?textInputAction       = null,
                         TextCapitalization textCapitalization = TextCapitalization.none, TextStyle style = null,
                         TextAlign textAlign               = TextAlign.left, TextDirection textDirection = TextDirection.ltr,
                         bool autofocus                    = false, bool obscureText      = false, bool autocorrect = false, int?maxLines = 1,
                         int?maxLength                     = null, bool maxLengthEnforced = true, ValueChanged <string> onChanged = null,
                         VoidCallback onEditingComplete    = null,
                         ValueChanged <string> onSubmitted = null, List <TextInputFormatter> inputFormatters = null,
                         bool?enabled = null, float?cursorWidth = 2.0f, Radius cursorRadius = null, Color cursorColor = null,
                         Brightness?keyboardAppearance          = null, EdgeInsets scrollPadding = null,
                         DragStartBehavior dragStartBehavior    = DragStartBehavior.down,
                         bool?enableInteractiveSelection        = null,
                         GestureTapCallback onTap               = null,
                         InputCounterWidgetBuilder buildCounter = null
                         ) : base(key: key)
        {
            D.assert(maxLines == null || maxLines > 0);
            D.assert(maxLength == null || maxLength == TextField.noMaxLength || maxLength > 0);

            this.controller         = controller;
            this.focusNode          = focusNode;
            this.decoration         = noDecoration ? null : (decoration ?? new InputDecoration());
            this.textInputAction    = textInputAction;
            this.textCapitalization = textCapitalization;
            this.style                      = style;
            this.textAlign                  = textAlign;
            this.textDirection              = textDirection;
            this.autofocus                  = autofocus;
            this.obscureText                = obscureText;
            this.autocorrect                = autocorrect;
            this.maxLines                   = maxLines;
            this.maxLength                  = maxLength;
            this.maxLengthEnforced          = maxLengthEnforced;
            this.onChanged                  = onChanged;
            this.onEditingComplete          = onEditingComplete;
            this.onSubmitted                = onSubmitted;
            this.inputFormatters            = inputFormatters;
            this.enabled                    = enabled;
            this.cursorWidth                = cursorWidth;
            this.cursorColor                = cursorColor;
            this.cursorRadius               = cursorRadius;
            this.onSubmitted                = onSubmitted;
            this.keyboardAppearance         = keyboardAppearance;
            this.enableInteractiveSelection = enableInteractiveSelection;
            this.onTap                      = onTap;
            this.keyboardType               = keyboardType ?? (maxLines == 1 ? TextInputType.text : TextInputType.multiline);
            this.scrollPadding              = scrollPadding ?? EdgeInsets.all(20.0f);
            this.dragStartBehavior          = dragStartBehavior;
            this.buildCounter               = buildCounter;
        }
Пример #12
0
 public InkResponse(
     Key key                                    = null,
     Widget child                               = null,
     GestureTapCallback onTap                   = null,
     GestureTapDownCallback onTapDown           = null,
     GestureTapCancelCallback onTapCancel       = null,
     GestureTapCallback onDoubleTap             = null,
     GestureLongPressCallback onLongPress       = null,
     ValueChanged <bool> onHighlightChanged     = null,
     ValueChanged <bool> onHover                = null,
     bool containedInkWell                      = false,
     BoxShape highlightShape                    = BoxShape.circle,
     float?radius                               = null,
     BorderRadius borderRadius                  = null,
     ShapeBorder customBorder                   = null,
     Color focusColor                           = null,
     Color hoverColor                           = null,
     Color highlightColor                       = null,
     Color splashColor                          = null,
     InteractiveInkFeatureFactory splashFactory = null,
     bool enableFeedback                        = true,
     FocusNode focusNode                        = null,
     bool canRequestFocus                       = true,
     ValueChanged <bool> onFocusChange          = null,
     bool autofocus                             = false) : base(key: key)
 {
     this.child              = child;
     this.onTap              = onTap;
     this.onTapDown          = onTapDown;
     this.onTapCancel        = onTapCancel;
     this.onDoubleTap        = onDoubleTap;
     this.onLongPress        = onLongPress;
     this.onHighlightChanged = onHighlightChanged;
     this.onHover            = onHover;
     this.containedInkWell   = containedInkWell;
     this.highlightShape     = highlightShape;
     this.radius             = radius;
     this.borderRadius       = borderRadius;
     this.customBorder       = customBorder;
     this.focusColor         = focusColor;
     this.hoverColor         = hoverColor;
     this.highlightColor     = highlightColor;
     this.splashColor        = splashColor;
     this.splashFactory      = splashFactory;
     this.enableFeedback     = enableFeedback;
     this.focusNode          = focusNode;
     this.canRequestFocus    = canRequestFocus;
     this.onFocusChange      = onFocusChange;
     this.autofocus          = autofocus;
 }
Пример #13
0
        static Widget _buildShareItem(IconData icon, string title, Color color, Color background,
                                      GestureTapCallback onTap, bool isBorder = false)
        {
            var border = isBorder
                ? Border.all(
                Color.fromRGBO(216, 216, 216, 1)
                )
                : null;

            return(new GestureDetector(
                       onTap: () => {
                if (Router.navigator.canPop())
                {
                    Router.navigator.pop();
                }

                onTap();
            },
                       child: new Container(
                           padding: EdgeInsets.symmetric(horizontal: 16),
                           decoration: new BoxDecoration(
                               CColors.White
                               ),
                           child: new Column(children: new List <Widget> {
                new Container(
                    width: 48,
                    height: 48,
                    decoration: new BoxDecoration(
                        background,
                        borderRadius: BorderRadius.all(24),
                        border: border
                        ),
                    child: new Icon(
                        icon,
                        size: 30,
                        color: color
                        )
                    ),
                new Container(
                    margin: EdgeInsets.only(top: 8),
                    height: 20,
                    child: new Text(
                        title,
                        style: CTextStyle.PSmallBody4
                        )
                    )
            })
                           )
                       ));
        }
Пример #14
0
 protected SlideAction(
     float width              = 80,
     EdgeInsets padding       = null,
     GestureTapCallback onTap = null,
     bool closeOnTap          = true,
     Key key = null
     ) : base(key: key)
 {
     D.assert(this.closeOnTap != null);
     this.width      = width;
     this.padding    = padding;
     this.onTap      = onTap;
     this.closeOnTap = closeOnTap;
 }
Пример #15
0
 public ArticleCard(
     Article article,
     GestureTapCallback onTap        = null,
     GestureTapCallback moreCallBack = null,
     string fullName = null,
     bool topPadding = false,
     Key key         = null
     ) : base(key: key)
 {
     this.article      = article;
     this.fullName     = fullName;
     this.onTap        = onTap;
     this.moreCallBack = moreCallBack;
     this.topPadding   = topPadding;
 }
Пример #16
0
 public CustomAppBar(
     GestureTapCallback onBack = null,
     Widget title               = null,
     Widget rightWidget         = null,
     Color bottomSeparatorColor = null,
     float height               = CustomAppBarUtil.appBarHeight,
     Key key = null
     ) : base(key: key)
 {
     this.onBack = onBack;
     this.title  = title;
     this.bottomSeparatorColor = bottomSeparatorColor ?? CColors.Separator2;
     this.height      = height;
     this.rightWidget = rightWidget ?? new Container(width: 56);
 }
Пример #17
0
 public CustomButton(
     Key key = null,
     GestureTapCallback onPressed = null,
     EdgeInsets padding           = null,
     bool enable           = true,
     Decoration decoration = null,
     Widget child          = null
     ) : base(key)
 {
     this.onPressed  = onPressed;
     this.padding    = padding ?? EdgeInsets.all(8.0f);
     this.decoration = decoration ?? new BoxDecoration();
     this.enable     = enable;
     this.child      = child;
 }
Пример #18
0
 public ArticleTabBar(
     bool like,
     GestureTapCallback addCommentCallback = null,
     GestureTapCallback commentCallback    = null,
     GestureTapCallback favorCallback      = null,
     GestureTapCallback shareCallback      = null,
     Key key = null
     ) : base(key: key)
 {
     this.like = like;
     this.addCommentCallback = addCommentCallback;
     this.commentCallback    = commentCallback;
     this.favorCallback      = favorCallback;
     this.shareCallback      = shareCallback;
 }
Пример #19
0
 public BlankView(
     string title,
     string imageName = null,
     bool canRefresh  = false,
     GestureTapCallback tapCallback = null,
     Decoration decoration          = null,
     Key key = null
     ) : base(key: key)
 {
     this.title       = title;
     this.imageName   = imageName;
     this.canRefresh  = canRefresh;
     this.tapCallback = tapCallback;
     this.decoration  = decoration ?? new BoxDecoration(color: CColors.White);
 }
Пример #20
0
 public LeaderBoard(
     List <string> data,
     Dictionary <string, RankData> rankDict,
     Dictionary <string, FavoriteTag> favoriteTagDict,
     GestureTapCallback onPressMore = null,
     StringCallback onPressItem     = null,
     Key key = null
     ) : base(key: key)
 {
     this.data            = data;
     this.rankDict        = rankDict;
     this.favoriteTagDict = favoriteTagDict;
     this.onPressMore     = onPressMore;
     this.onPressItem     = onPressItem;
 }
Пример #21
0
 public LeaderBoardCollectionCard(
     RankData collection,
     Dictionary <string, FavoriteTag> favoriteTags,
     Dictionary <string, FavoriteTagArticle> favoriteTagArticles,
     int index = 0,
     GestureTapCallback onPress = null,
     Key key = null
     ) : base(key: key)
 {
     this.collection          = collection;
     this.favoriteTags        = favoriteTags;
     this.favoriteTagArticles = favoriteTagArticles;
     this.index   = index;
     this.onPress = onPress;
 }
Пример #22
0
 public CustomListTile(
     Widget leading           = null,
     string title             = null,
     Widget trailing          = null,
     EdgeInsets padding       = null,
     GestureTapCallback onTap = null,
     Key key = null
     ) : base(key: key)
 {
     this.leading  = leading;
     this.title    = title;
     this.trailing = trailing;
     this.padding  = padding ?? EdgeInsets.symmetric(horizontal: 16);
     this.onTap    = onTap;
 }
Пример #23
0
 public TeamCard(
     Team team,
     GestureTapCallback onTap    = null,
     UserType userType           = UserType.unFollow,
     GestureTapCallback onFollow = null,
     bool isSearchCard           = false,
     Key key = null
     ) : base(key: key)
 {
     this.team         = team;
     this.onTap        = onTap;
     this.userType     = userType;
     this.onFollow     = onFollow;
     this.isSearchCard = isSearchCard;
 }
Пример #24
0
 public LeaderBoardColumnCard(
     RankData column,
     User user,
     UserArticle userArticle,
     int index = 0,
     GestureTapCallback onPress = null,
     Key key = null
     ) : base(key: key)
 {
     this.column      = column;
     this.user        = user;
     this.userArticle = userArticle;
     this.index       = index;
     this.onPress     = onPress;
 }
Пример #25
0
 public UserCard(
     User user,
     string license,
     GestureTapCallback onTap    = null,
     UserType userType           = UserType.unFollow,
     GestureTapCallback onFollow = null,
     bool isSearchCard           = false,
     Key key = null
     ) : base(key: key)
 {
     this.user         = user;
     this.license      = license;
     this.onTap        = onTap;
     this.userType     = userType;
     this.onFollow     = onFollow;
     this.isSearchCard = isSearchCard;
 }
Пример #26
0
 public CommentCard(
     Message message,
     bool isPraised,
     string parentName = null,
     GestureTapCallback moreCallBack   = null,
     GestureTapCallback praiseCallBack = null,
     GestureTapCallback replyCallBack  = null,
     Key key = null
     ) : base(key)
 {
     this.message        = message;
     this.isPraised      = isPraised;
     this.parentName     = parentName;
     this.moreCallBack   = moreCallBack;
     this.praiseCallBack = praiseCallBack;
     this.replyCallBack  = replyCallBack;
 }
Пример #27
0
 public TableRowInkWell(
     Key key                                = null,
     Widget child                           = null,
     GestureTapCallback onTap               = null,
     GestureTapCallback onDoubleTap         = null,
     GestureLongPressCallback onLongPress   = null,
     ValueChanged <bool> onHighlightChanged = null
     ) : base(
         key: key,
         child: child,
         onTap: onTap,
         onDoubleTap: onDoubleTap,
         onLongPress: onLongPress,
         onHighlightChanged: onHighlightChanged,
         containedInkWell: true,
         highlightShape: BoxShape.rectangle
         )
 {
 }
Пример #28
0
 public CustomNavigationBar(
     Widget titleWidget         = null,
     List <Widget> rightWidgets = null,
     Widget topRightWidget      = null,
     Decoration decoration      = null,
     float offset              = 0,
     EdgeInsets padding        = null,
     GestureTapCallback onBack = null,
     Key key = null
     ) : base(key: key)
 {
     this.titleWidget    = titleWidget;
     this.rightWidgets   = rightWidgets;
     this.topRightWidget = topRightWidget;
     this.decoration     = decoration ?? new BoxDecoration(color: CColors.White);
     this.offset         = offset;
     this.padding        = padding ?? EdgeInsets.only(bottom: 8, left: 16, right: 16);
     this.onBack         = onBack;
 }
Пример #29
0
 public CommentCard(
     Message message,
     bool isPraised,
     string parentName = null,
     string parentAuthorId = null,
     GestureTapCallback moreCallBack = null,
     GestureTapCallback praiseCallBack = null,
     GestureTapCallback replyCallBack = null,
     Action<string> pushToUserDetail = null,
     Key key = null
 ) : base(key: key) {
     this.message = message;
     this.isPraised = isPraised;
     this.parentName = parentName;
     this.parentAuthorId = parentAuthorId;
     this.moreCallBack = moreCallBack;
     this.praiseCallBack = praiseCallBack;
     this.replyCallBack = replyCallBack;
     this.pushToUserDetail = pushToUserDetail;
 }
Пример #30
0
 public InkWell(
     Key key                                    = null,
     Widget child                               = null,
     GestureTapCallback onTap                   = null,
     GestureTapCallback onDoubleTap             = null,
     GestureLongPressCallback onLongPress       = null,
     GestureTapDownCallback onTapDown           = null,
     GestureTapCancelCallback onTapCancel       = null,
     ValueChanged <bool> onHighlightChanged     = null,
     Color highlightColor                       = null,
     Color splashColor                          = null,
     InteractiveInkFeatureFactory splashFactory = null,
     float?radius                               = null,
     BorderRadius borderRadius                  = null,
     ShapeBorder customBorder                   = null
     ) : base(
         key: key,
         child: child,
         onTap: onTap,
         onDoubleTap: onDoubleTap,
         onLongPress: onLongPress,
         onTapDown: onTapDown,
         onTapCancel: () => {
     if (onTapCancel != null)
     {
         onTapCancel();
     }
 },
         onHighlightChanged: onHighlightChanged,
         containedInkWell: true,
         highlightShape: BoxShape.rectangle,
         highlightColor: highlightColor,
         splashColor: splashColor,
         splashFactory: splashFactory,
         radius: radius,
         borderRadius: borderRadius,
         customBorder: customBorder) {
 }