This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct TypeWriterEffect: View { | |
@State private var appearText: Bool = false | |
@State private var theText: String = "" | |
@State private var theSecondText: String = "" | |
let finishedText: String = "Hello there ☺️" | |
let secondFinishedText: String = "How are you this fine evening?" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct SelectedButton: View { | |
@State var tabButtons = tabs[0] | |
@Namespace var animation | |
var body: some View { | |
VStack { | |
HStack { | |
ScrollView(.horizontal, showsIndicators: false) { | |
ScrollViewReader { value in | |
LazyHStack(spacing: 20) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct AddText: View { | |
@Environment(\.presentationMode) var presentationMode | |
@EnvironmentObject var dataViewModel: DataViewModel | |
@State var addSomeText: String = "" | |
var body: some View { | |
Form { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct RepeatingViews: View { | |
@State private var disappearEast: Bool = false | |
@State private var appearEast: Bool = false | |
@State private var moveEast: Bool = false | |
@State private var disappearSugarBeet: Bool = false | |
@State private var appearSugarBeet: Bool = false | |
@State private var moveSugarBeet: Bool = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct CardView: View { | |
var item: ItemData | |
var animation: Namespace.ID | |
var body: some View { | |
HStack { | |
Circle() | |
.frame(width: 75) | |
.foregroundColor(item.color) | |
.overlay { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import SwiftUI | |
struct BetModel: Identifiable, Codable { // Identifiable so we have id on each item and codable so it can handle JSON data | |
let id: String | |
var league: String | |
let homeTeam: String | |
let awayTeam: String | |
var dateForBet: Date | |
let typeOfBet: String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
struct BetDataPoint: Identifiable { | |
var id = UUID() | |
let date: Date | |
let total: Double | |
let league: String | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import SwiftUI | |
struct BetModel: Identifiable, Codable { // Identifiable so we have id on each item and codable so it can handle JSON data | |
let id: String | |
var league: String | |
let homeTeam: String | |
let awayTeam: String | |
var dateForBet: Date | |
let typeOfBet: String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct AddBetView: View { | |
@Environment(\.presentationMode) var presentationMode | |
@EnvironmentObject var betViewModel: BetViewModel | |
@AppStorage("savehometeam") var homeTeamData: String = "Home Team" | |
@AppStorage("saveawayteam") var awayTeamData: String = "Away Team" | |
@AppStorage("Rikard") var startNewBettorArray: String = "" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct BetDetailsView: View { | |
var bet: BetModel | |
@ObservedObject var betViewModel: BetViewModel | |
// States for the button animations | |
@State var scaleWinButton: CGFloat = 1.0 | |
@State var scaleLooseButton: CGFloat = 1.0 | |
@State var scalePushButton: CGFloat = 1.0 |