要更改文本选择颜色,您可以使用textSelectionTheme
光标线的cursorColor
光标下方气泡的selectionHandleColor
selectionColor 高亮颜色
textSelectionTheme: _theme.textSelectionTheme.copyWith(
cursorColor: AppColors.purple,
selectionHandleColor: AppColors.purple,
selectionColor: AppColors.grey4,
),
要更改文本工具栏选项样式,可以使用按钮文本主题
textTheme: _theme.textTheme
.copyWith(
button: _theme.textTheme.button?.copyWith(
//change it in this part
),
)
.apply(fontFamily: GoogleFonts.roboto().fontFamily),
surface
和 onSurface
属性为我做到了
theme: ThemeData(
colorScheme: ColorScheme(
surface: Colors.green,
onSurface: Colors.white
)
)