getting things in place to get average color of an image
This commit is contained in:
@@ -9,42 +9,35 @@ import SwiftUI
|
||||
|
||||
struct HeaderView: View {
|
||||
@EnvironmentObject var authStore:AuthSessionStore
|
||||
private var averageColor: UIColor?
|
||||
|
||||
var body: some View {
|
||||
HStack(alignment:.center) {
|
||||
if self.authStore.sessionState == SessionState.isAuthenticated {
|
||||
Image(systemName: "list.bullet.circle")
|
||||
.font(Font.system(.largeTitle))
|
||||
.padding()
|
||||
.foregroundColor(NirvanaColor.teal)
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
||||
HStack {
|
||||
Image("undraw_handcrafts_leaf")
|
||||
.resizable()
|
||||
.frame(width: 20.0, height: 32.132)
|
||||
|
||||
Text("nirvana")
|
||||
.font(Font.custom("Satisfy-Regular", size: 35))
|
||||
.foregroundColor(NirvanaColor.teal)
|
||||
.multilineTextAlignment(.center)
|
||||
}
|
||||
Image("undraw_handcrafts_leaf")
|
||||
.resizable()
|
||||
.frame(width: 20.0, height: 32.132)
|
||||
.padding(.leading, 20)
|
||||
|
||||
Spacer()
|
||||
|
||||
if self.authStore.sessionState == SessionState.isAuthenticated {
|
||||
RemoteImage(url: "https://avatars.githubusercontent.com/u/41487836")
|
||||
.background(NirvanaColor.teal)
|
||||
.aspectRatio(contentMode: .fit)
|
||||
.aspectRatio(contentMode: .fill)
|
||||
.frame(width: 40, height: 40)
|
||||
.clipShape(Circle())
|
||||
.padding()
|
||||
.shadow(radius:5)
|
||||
.onAppear {
|
||||
self.setAverageColor()
|
||||
}
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
|
||||
private func setAverageColor() {
|
||||
}
|
||||
}
|
||||
|
||||
struct HeaderView_Previews: PreviewProvider {
|
||||
|
||||
Reference in New Issue
Block a user