mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-09-07 04:26:56 +00:00
31 lines
981 B
Dart
31 lines
981 B
Dart
// ignore_for_file: always_specify_types
|
|
|
|
library elevation_extension;
|
|
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
extension ElevationExtension on BoxDecoration {
|
|
BoxDecoration copyWith({
|
|
final Color? color,
|
|
final DecorationImage? image,
|
|
final BoxBorder? border,
|
|
final BorderRadiusGeometry? borderRadius,
|
|
final List<BoxShadow>? boxShadow,
|
|
final Gradient? gradient,
|
|
final BlendMode? backgroundBlendMode,
|
|
final BoxShape? shape,
|
|
}) => BoxDecoration(
|
|
color: color ?? this.color,
|
|
image: image ?? this.image,
|
|
border: border ?? this.border,
|
|
borderRadius: borderRadius ?? this.borderRadius,
|
|
boxShadow: this.boxShadow != null || boxShadow != null
|
|
? [...this.boxShadow ?? [], ...boxShadow ?? []]
|
|
: null,
|
|
gradient: gradient ?? this.gradient,
|
|
backgroundBlendMode: backgroundBlendMode ?? this.backgroundBlendMode,
|
|
shape: shape ?? this.shape,
|
|
);
|
|
}
|