示例#1
0
 public OverScrollHeaderStretchConfiguration(
     float stretchTriggerOffset     = 100.0f,
     AsyncCallback onStretchTrigger = null
     )
 {
     this.stretchTriggerOffset = stretchTriggerOffset;
     this.onStretchTrigger     = onStretchTrigger;
 }
示例#2
0
        public SliverAppBar(
            Key key        = null,
            Widget leading = null,
            bool automaticallyImplyLeading = true,
            Widget title                   = null,
            List <Widget> actions          = null,
            Widget flexibleSpace           = null,
            PreferredSizeWidget bottom     = null,
            float?elevation                = null,
            bool forceElevated             = false,
            Color backgroundColor          = null,
            Brightness?brightness          = null,
            IconThemeData iconTheme        = null,
            IconThemeData actionsIconTheme = null,
            TextTheme textTheme            = null,
            bool primary                   = true,
            bool?centerTitle               = null,
            float titleSpacing             = NavigationToolbar.kMiddleSpacing,
            float?expandedHeight           = null,
            bool floating                  = false,
            bool pinned  = false,
            bool snap    = false,
            bool stretch = false,
            float stretchTriggerOffset     = 100.0f,
            AsyncCallback onStretchTrigger = null,
            ShapeBorder shape = null
            ) : base(key: key)
        {
            D.assert(floating || !snap, () => "The 'snap' argument only makes sense for floating app bars.");
            D.assert(stretchTriggerOffset > 0.0);

            this.leading = leading;
            this.automaticallyImplyLeading = true;
            this.title                = title;
            this.actions              = actions;
            this.flexibleSpace        = flexibleSpace;
            this.bottom               = bottom;
            this.elevation            = elevation;
            this.forceElevated        = forceElevated;
            this.backgroundColor      = backgroundColor;
            this.brightness           = brightness;
            this.iconTheme            = iconTheme;
            this.actionsIconTheme     = actionsIconTheme;
            this.textTheme            = textTheme;
            this.primary              = primary;
            this.centerTitle          = centerTitle;
            this.titleSpacing         = NavigationToolbar.kMiddleSpacing;
            this.expandedHeight       = expandedHeight;
            this.floating             = floating;
            this.pinned               = pinned;
            this.snap                 = snap;
            this.stretch              = stretch;
            this.stretchTriggerOffset = stretchTriggerOffset;
            this.onStretchTrigger     = onStretchTrigger;
            this.shape                = shape;
        }