I'm building an App for iOS on Flutter. in the ColorScheme there's the brightness property and on Windows there's no error and it works, but when i open the code on the mac OS it says "undefined name 'Brightness'
Can anyone help me how to fix it?
I set the whole enviroment new, updated my flutter and everything, but still no success.
UPDATE:
This is the Code of the MaterialApp and Theme Build:
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme(
brightness: Brightness.light,
primary: Color(0xffa8a92f),
onPrimary: Colors.white,
secondary: Color(0xff7b7c80),
onSecondary: Colors.white,
surfaceVariant: Colors.red,
error: Colors.red,
onError: Colors.white,
background: Colors.white,
onBackground: Colors.black,
surface: Colors.yellow,
onSurface: Colors.white
),
cardTheme: CardTheme(
color: Color(0xff7b7c80),
)
),
UPDATE 2:
Output of flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.8, on macOS 12.5 21G72 darwin-arm (Rosetta), locale de-CH)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[!] Xcode - develop for iOS and macOS (Xcode 14.1)
✗ CocoaPods installed but not working.
You appear to have CocoaPods installed but it is not working.
This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
This can usually be fixed by re-installing CocoaPods.
To re-install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.72.2)
[✓] VS Code (version 1.73.1)
[✓] Connected device (1 available)
[✓] HTTP Host Availability
Output of flutter --version:
Flutter 3.3.8 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 52b3dc25f6 (8 days ago) • 2022-11-09 12:09:26 +0800
Engine • revision 857bd6b74c
Tools • Dart 2.18.4 • DevTools 2.15.0
UPDATE 3: i set up the whole project from scratch, installed everything new and it's still not working.