Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
[FIX] Made animation items optional
Browse files Browse the repository at this point in the history
  • Loading branch information
eharrison committed Dec 23, 2022
1 parent 0a42e19 commit 1309cf8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Sources/dotLottieLoader/DotLottieAnimation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ public struct DotLottieAnimation: Codable {
public var id: String

/// Loop enabled
public var loop: Bool
public var loop: Bool?

// appearance color in HEX
public var themeColor: String
public var themeColor: String?

/// Animation Playback Speed
public var speed: Float
public var speed: Float?

/// 1 or -1
public var direction: Int = 1
public var direction: Int?

/// mode - "bounce" | "normal"
public var mode: String = "normal"
public var mode: String?

public init(id: String, loop: Bool, themeColor: String, speed: Float, direction: Int = 1, mode: String = "normal") {
init(id: String, loop: Bool? = nil, themeColor: String? = nil, speed: Float? = nil, direction: Int? = nil, mode: String? = nil) {
self.id = id
self.loop = loop
self.themeColor = themeColor
Expand Down

0 comments on commit 1309cf8

Please sign in to comment.