public SnackBar( Key key = null, Widget content = null, Color backgroundColor = null, float?elevation = null, ShapeBorder shape = null, SnackBarBehavior?behavior = null, SnackBarAction action = null, TimeSpan?duration = null, Animation <float> animation = null, VoidCallback onVisible = null ) : base(key: key) { duration = duration ?? SnackBarUtils._snackBarDisplayDuration; D.assert(content != null); D.assert(elevation == null || elevation >= 0.0); this.content = content; this.backgroundColor = backgroundColor; this.elevation = elevation; this.shape = shape; this.behavior = behavior; this.action = action; this.duration = duration.Value; this.animation = animation; this.onVisible = onVisible; }
public SnackBar( Key key = null, Widget content = null, Color backgroundColor = null, SnackBarAction action = null, TimeSpan?duration = null, Animation <float> animation = null ) : base(key: key) { duration = duration ?? SnackBarUtils._kSnackBarDisplayDuration; D.assert(content != null); this.content = content; this.backgroundColor = backgroundColor; this.action = action; this.duration = duration.Value; this.animation = animation; }