TypingIndicatorData

public final class TypingIndicatorData : ObservableObject, Identifiable

The data model for the typing indicator SwiftUI view TypingIndicatorView. Implements ObservableObject protocol.

  • Dot

    A single circle.

    See more

    Declaration

    Swift

    public struct Dot : Identifiable

Public properties

  • Update start and color with one defined color. Sets color to startColor and endColor gets a 80% transparency applied

    Declaration

    Swift

    public var dotColor: Color { get set }
  • Undocumented

    Declaration

    Swift

    public var startColor: Color { get set }
  • Undocumented

    Declaration

    Swift

    public var endColor: Color { get set }
  • Time for the dot to animate (one direction). Default is 0.5s

    Declaration

    Swift

    public var animationDuration: TimeInterval { get set }
  • Time while the dot animation is idle before starting again. Default is 0.5s

    Declaration

    Swift

    public var idleDuration: TimeInterval
  • Sets dot size. Default is 12x12

    Declaration

    Swift

    @Published
    public var dotSize: CGSize { get set }
  • Sets grow scale ratio of each dot during animation. Default is 1.25.

    Declaration

    Swift

    @Published
    public var scaleRatio: CGFloat { get set }

Public APIs

  • Undocumented

    Declaration

    Swift

    public init()
  • Undocumented

    Declaration

    Swift

    public init(dots: [Dot])
  • Starts animation.

    Declaration

    Swift

    public func startAnimation()
  • Stop animation.

    Declaration

    Swift

    public func stopAnimation()