Flutterで
final ThemeData darkTheme = ThemeData(
fontFamily: 'NotoSansJP',
primarySwatch: Colors.blue,
);のようにprimarySwatch は使えなくなっています。
どうすれば良いか?
現在(25年5月)全体の色変更するには
final ThemeData darkTheme = ThemeData(
fontFamily: 'NotoSansJP',
colorScheme: ColorScheme.fromSeed (
seedColor: Colors.blue,
brightness: Brightness.dark,
dynamicSchemeVariant: DynamicSchemeVariant.tonalSpot
),
);のように colorScheme を使用する必要があります。
- 全体の所謂メインカラーを調整するには seedColor を使用してください。
- ダークモードの設定はColorScheme内でbrightness: Brightness.darkのように指定すればOK
- トーン(色合い)を変更するにはdynamicSchemeVariant を設定します。
各プロパティの値については公式ドキュメントを参考にするのが一番です!


各色の設定については公式ドキュメントの中断あたりにある例がめちゃくちゃわかりやすいです。ぜひ参考に

参考
https://api.flutter.dev/flutter/material/ColorScheme-class.html
https://api.flutter.dev/flutter/material/MaterialColor-class.html





![══════════ No valid code signing certificates were found You can connect to your Apple Developer account by signing in with your Apple ID in Xcode and create an iOS Development Certificate as well as a Provisioning Profile for your project by: 1- Open the Flutter project's Xcode target with open ios/Runner.xcworkspace 2- Select the 'Runner' project in the navigator then the 'Runner' target in the project settings 3- Make sure a 'Development Team' is selected under Signing & Capabilities > Team. You may need to: - Log in with your Apple ID in Xcode first - Ensure you have a valid unique Bundle ID - Register your device with your Apple Developer Account - Let Xcode automatically provision a profile for your app 4- Build or run your project again 5- Trust your newly created Development Certificate on your iOS device via Settings > General > Device Management > [your new certificate] > Trust For more information, please visit: https://developer.apple.com/library/content/documentation/IDEs/Conce ptual/ AppDistributionGuide/MaintainingCertificates/MaintainingCertificates .html Or run on an iOS simulator without code signing ══════════════════════════════════════════════════════════════════════ ══════════ No development certificates available to code sign app for device deployment](https://coiai.boy.jp/wp-content/uploads/2025/01/スクリーンショット-2025-01-31-23.15.28.png)


