public override Widget build(BuildContext context) { BottomAppBarTheme babTheme = BottomAppBarTheme.of(context); NotchedShape notchedShape = widget.shape ?? babTheme?.shape; CustomClipper <Path> clipper = notchedShape != null ? (CustomClipper <Path>) new _BottomAppBarClipper( geometry: geometryListenable, shape: notchedShape, notchMargin: widget.notchMargin ) : new ShapeBorderClipper(shape: new RoundedRectangleBorder()); float elevation = widget.elevation ?? babTheme?.elevation ?? _defaultElevation; Color color = widget.color ?? babTheme?.color ?? Theme.of(context).bottomAppBarColor; Color effectiveColor = ElevationOverlay.applyOverlay(context, color, elevation); return(new PhysicalShape( clipper: clipper, elevation: elevation, color: effectiveColor, clipBehavior: widget.clipBehavior, child: new Material( type: MaterialType.transparency, child: widget.child == null ? null : new SafeArea(child: widget.child) ) )); }
public _DemoBottomAppBar( Color color = null, FloatingActionButtonLocation fabLocation = null, NotchedShape shape = null ) { this.color = color; this.fabLocation = fabLocation; this.shape = shape; }
public BottomAppBarTheme( Color color = null, float?elevation = null, NotchedShape shape = null ) { this.color = color; this.elevation = elevation; this.shape = shape; }
BottomAppBarTheme copyWith( Color color = null, float?elevation = null, NotchedShape shape = null ) { return(new BottomAppBarTheme( color: color ?? this.color, elevation: elevation ?? this.elevation, shape: shape ?? this.shape )); }
public _BottomAppBarClipper( ValueListenable <ScaffoldGeometry> geometry, NotchedShape shape, float notchMargin ) : base(reclip: geometry) { D.assert(geometry != null); D.assert(shape != null); this.geometry = geometry; this.shape = shape; this.notchMargin = notchMargin; }
public BottomAppBar( Key key = null, Color color = null, float?elevation = null, NotchedShape shape = null, Clip clipBehavior = Clip.none, float notchMargin = 4.0f, Widget child = null ) : base(key: key) { D.assert(elevation == null || elevation >= 0.0f); this.child = child; this.color = color; this.elevation = elevation; this.shape = shape; this.clipBehavior = clipBehavior; this.notchMargin = notchMargin; }