day_sdk library

Classes

DayProfile
The employee's profile as the SDK reports it - the identity fields only.
DaySdk
The Day.io SDK - one per app, nothing to create or keep, like the native DaySdk. Set it up once when your app starts with initialize (it makes no network calls). Then, after the employee signs in to your app:
DaySdkAttendance
The SDK's attendance screen - clocking in and out, breaks, punch history - as a widget. Give it the whole screen, e.g. as a route's body; it handles its own navigation (punch details, time and location pickers) and back.
DaySdkColors
The host app's colors for the SDK screens. Only the brand, background and text colors are yours: colors with a meaning (errors, success, pending punches) stay the SDK's, so they read the same in every app. A color left null keeps Day.io's.
DaySdkConfiguration
How DaySdkAttendance looks - mirrors the native DaySdkConfiguration. Everything is optional: const DaySdkConfiguration() is Day.io's look. Pass a new one to the widget (e.g. when your app's theme changes) and the screen follows it right away.
DaySdkFailed
A network or server error - retry later, with a new one-time token if it was DaySdk.start.
DaySdkFont
The host app's font for the SDK screens, from font files your app already ships as Flutter assets. Only the typeface is yours - text sizes and weights stay the SDK's.
DaySdkIdle
Initialized; nobody signed in yet, or after DaySdk.signOut. Call DaySdk.start or DaySdk.resume.
DaySdkMissingCompany
The profile came back without a company - contact Day.io support.
DaySdkNoActiveProfile
The employee has no active Day.io profile - check the employee in Day.io.
DaySdkProfileNotFound
The session's profile no longer exists - check the employee in Day.io.
DaySdkProfileSelectionRequired
The session gives access to several profiles and none was chosen - not expected with a session from DaySdk.start.
DaySdkReady
The employee is signed in and DaySdkAttendance can be shown.
DaySdkSessionInvalid
No usable session, or Day.io rejected it - request a new one-time token and call DaySdk.start.
DaySdkStarting
DaySdk.start or DaySdk.resume is running.
DaySdkState
The outcome of DaySdk.start or DaySdk.resume, and what DaySdk.state reports - mirrors the native DaySdkState.

Enums

DayEnvironment
Which Day.io servers the SDK talks to - mirrors the native ApiEnvironment. Use the environment your backend requests one-time tokens from.