MCPcopy Create free account
hub / github.com/altic-dev/FluidVoice / settingsToggleRow

Method settingsToggleRow

Sources/Fluid/UI/SettingsView.swift:1777–1815  ·  view source on GitHub ↗
(title: String, description: String, footnote: String?, errorMessage: String?, isOn: Binding<Bool>)

Source from the content-addressed store, hash-verified

1775 // MARK: - Helper Views
1776
1777 private func settingsToggleRow(
1778 title: String,
1779 description: String,
1780 footnote: String? = nil,
1781 errorMessage: String? = nil,
1782 isOn: Binding<Bool>
1783 ) -> some View {
1784 VStack(alignment: .leading, spacing: 6) {
1785 HStack(alignment: .center) {
1786 VStack(alignment: .leading, spacing: 2) {
1787 Text(title)
1788 .font(self.theme.typography.bodyStrong)
1789 .foregroundStyle(self.settingsTitleText)
1790 Text(description)
1791 .font(self.theme.typography.bodySmall)
1792 .foregroundStyle(self.settingsSecondaryText)
1793 }
1794
1795 Spacer()
1796
1797 Toggle("", isOn: isOn)
1798 .toggleStyle(.switch)
1799 .tint(self.theme.palette.accent)
1800 .labelsHidden()
1801 }
1802
1803 if let footnote = footnote {
1804 Text(footnote)
1805 .font(self.theme.typography.bodySmall)
1806 .foregroundStyle(self.settingsSecondaryText)
1807 }
1808
1809 if let errorMessage = errorMessage {
1810 Text(errorMessage)
1811 .font(.caption)
1812 .foregroundStyle(self.theme.palette.warning)
1813 }
1814 }
1815 }
1816
1817 private func backupUtilityRow() -> some View {
1818 HStack(alignment: .top, spacing: 12) {

Callers 1

SettingsViewStruct · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected