From 1309cf813114bf84e9430c1a08aba11bc3bdaaad Mon Sep 17 00:00:00 2001 From: magic Date: Fri, 23 Dec 2022 09:41:42 +0800 Subject: [PATCH] [FIX] Made animation items optional --- Sources/dotLottieLoader/DotLottieAnimation.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/dotLottieLoader/DotLottieAnimation.swift b/Sources/dotLottieLoader/DotLottieAnimation.swift index 71bc806..cc57948 100644 --- a/Sources/dotLottieLoader/DotLottieAnimation.swift +++ b/Sources/dotLottieLoader/DotLottieAnimation.swift @@ -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