🐕
text fieldのcolor
text fieldのcolor指定しない場合、どこの部分を参照するのか確認してみた。
確認したのはよく用いるborder, labelstyle, cursor
border
boder sideのクラスに通常時では、colorは黒、線の幅は1.0と記載されてある。
フォーカス時のboderのcolorについては、ColorScheme.primaryを参照、線の幅は2.0
label style
フォーカス時、labelのcolorも同様にColorScheme.primaryを参照
cursor
cursor colorプロパティがnullなら、こちらも同様にColorScheme.primaryを参照
If this is null it will default to the ambient
[DefaultSelectionStyle.cursorColor]. If that is null, and the
[ThemeData.platform] is [TargetPlatform.iOS] or [TargetPlatform.macOS]
it will use [CupertinoThemeData.primaryColor]. Otherwise it will use
the value of [ColorScheme.primary] of [ThemeData.colorScheme].
Discussion