mirror of
https://github.com/xvrh/lottie-flutter.git
synced 2025-08-06 16:39:36 +08:00
130 lines
3.3 KiB
Dart
130 lines
3.3 KiB
Dart
import 'dart:ui';
|
|
|
|
/// Property values are the same type as the generic type of their corresponding
|
|
/// {@link LottieValueCallback}. With this, we can use generics to maintain type safety
|
|
/// of the callbacks.
|
|
///
|
|
/// Supported properties:
|
|
/// Transform:
|
|
/// {@link #TRANSFORM_ANCHOR_POINT}
|
|
/// {@link #TRANSFORM_POSITION}
|
|
/// {@link #TRANSFORM_OPACITY}
|
|
/// {@link #TRANSFORM_SCALE}
|
|
/// {@link #TRANSFORM_ROTATION}
|
|
/// {@link #TRANSFORM_SKEW}
|
|
/// {@link #TRANSFORM_SKEW_ANGLE}
|
|
///
|
|
/// Fill:
|
|
/// {@link #COLOR} (non-gradient)
|
|
/// {@link #OPACITY}
|
|
/// {@link #COLOR_FILTER}
|
|
///
|
|
/// Stroke:
|
|
/// {@link #COLOR} (non-gradient)
|
|
/// {@link #STROKE_WIDTH}
|
|
/// {@link #OPACITY}
|
|
/// {@link #COLOR_FILTER}
|
|
///
|
|
/// Ellipse:
|
|
/// {@link #POSITION}
|
|
/// {@link #ELLIPSE_SIZE}
|
|
///
|
|
/// Polystar:
|
|
/// {@link #POLYSTAR_POINTS}
|
|
/// {@link #POLYSTAR_ROTATION}
|
|
/// {@link #POSITION}
|
|
/// {@link #POLYSTAR_INNER_RADIUS} (star)
|
|
/// {@link #POLYSTAR_OUTER_RADIUS}
|
|
/// {@link #POLYSTAR_INNER_ROUNDEDNESS} (star)
|
|
/// {@link #POLYSTAR_OUTER_ROUNDEDNESS}
|
|
///
|
|
/// Repeater:
|
|
/// All transform properties
|
|
/// {@link #REPEATER_COPIES}
|
|
/// {@link #REPEATER_OFFSET}
|
|
/// {@link #TRANSFORM_ROTATION}
|
|
/// {@link #TRANSFORM_START_OPACITY}
|
|
/// {@link #TRANSFORM_END_OPACITY}
|
|
///
|
|
/// Layers:
|
|
/// All transform properties
|
|
/// {@link #TIME_REMAP} (composition layers only)
|
|
abstract class LottieProperty {
|
|
/// ColorInt **/
|
|
static final Color color = Color(1);
|
|
static final Color strokeColor = Color(2);
|
|
|
|
/// Opacity value are 0-100 to match after effects **/
|
|
static final int transformOpacity = 3;
|
|
|
|
/// [0,100] */
|
|
static final int opacity = 4;
|
|
|
|
/// In Px */
|
|
static final Offset transformAnchorPoint = Offset(5, 5);
|
|
|
|
/// In Px */
|
|
static final Offset transformPosition = Offset(6, 6);
|
|
|
|
/// In Px */
|
|
static final Offset ellipseSize = Offset(7, 7);
|
|
|
|
/// In Px */
|
|
static final Offset rectangleSize = Offset(8, 8);
|
|
|
|
/// In degrees */
|
|
static final double cornerRadius = 9.0;
|
|
|
|
/// In Px */
|
|
static final Offset position = Offset(10, 10);
|
|
static final Offset transformScale = Offset(11, 11);
|
|
|
|
/// In degrees */
|
|
static final double transformRotation = 12.0;
|
|
|
|
/// 0-85 */
|
|
static final double transformSkew = 13.0;
|
|
|
|
/// In degrees */
|
|
static final double transformSkewAngle = 14.0;
|
|
|
|
/// In Px */
|
|
static final double strokeWidth = 15.0;
|
|
static final double textTracking = 16.0;
|
|
static final double repeaterCopies = 17.0;
|
|
static final double repeaterOffset = 18.0;
|
|
static final double polystarPoints = 19.0;
|
|
|
|
/// In degrees */
|
|
static final double polystarRotation = 20.0;
|
|
|
|
/// In Px */
|
|
static final double polystarInnerRadius = 21.0;
|
|
|
|
/// In Px */
|
|
static final double polystarOuterRadius = 22.0;
|
|
|
|
/// [0,100] */
|
|
static final double polystarInnerRoundedness = 23.0;
|
|
|
|
/// [0,100] */
|
|
static final double polystarOuterRoundedness = 24.0;
|
|
|
|
/// [0,100] */
|
|
static final double transformStartOpacity = 25.0;
|
|
|
|
/// [0,100] */
|
|
static final double transformEndOpacity = 26.0;
|
|
|
|
/// The time value in seconds */
|
|
static final double timeRemap = 27.0;
|
|
|
|
/// In Dp
|
|
static final double textSize = 28.0;
|
|
|
|
static final ColorFilter colorFilter =
|
|
ColorFilter.mode(Color(0xFF000000), BlendMode.dst);
|
|
|
|
static final List<Color> gradientColor = [];
|
|
}
|