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 static BottomAppBarTheme lerp(BottomAppBarTheme a, BottomAppBarTheme b, float t) { return(new BottomAppBarTheme( color: Color.lerp(a?.color, b?.color, t), elevation: MathUtils.lerpNullableFloat(a?.elevation, b?.elevation, t), shape: t < 0.5f ? a?.shape : b?.shape )); }
public bool Equals(BottomAppBarTheme other) { return(other.color == color && other.elevation == elevation && other.shape == shape); }