Skip to content

Instantly share code, notes, and snippets.

@vishw33
Created August 3, 2024 07:51
Show Gist options
  • Select an option

  • Save vishw33/a826daaf9b95e2209655618b7c1275cd to your computer and use it in GitHub Desktop.

Select an option

Save vishw33/a826daaf9b95e2209655618b7c1275cd to your computer and use it in GitHub Desktop.
SwiftUI model
//
// CountryModel.swift
// Country_List
//
// Created by vishwas ng on 17/07/24.
//
import Foundation
import SwiftData
import UIKit
@Model
class Country {
var country:String
var state:String
var flag:String
init(country: String, state: String, flag: String) {
self.country = country
self.state = state
self.flag = flag
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment