Skip to content

Instantly share code, notes, and snippets.

@dimebt
Created September 8, 2020 15:37
Show Gist options
  • Save dimebt/0e28146d23f694617e6613d922e742bb to your computer and use it in GitHub Desktop.
Save dimebt/0e28146d23f694617e6613d922e742bb to your computer and use it in GitHub Desktop.
struct WalletWidgetEntryView : View {
var entry: Provider.Entry
@Environment(\.widgetFamily) var family
@ViewBuilder
var body: some View {
//Text(entry.date, style: .time)
switch family {
case .systemSmall:
WWidgetSmall()
case .systemMedium:
WWidgetMedium(transactions: mockLast2Transactions)
case .systemLarge:
WWidgetLarge(transactions: mockTransactions, card: masterCardPay)
@unknown default:
fatalError()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment