[英]flutter : How to change selectetion cursor color
Try changing the primary color in your theme or the cursorColor
in the theme or TextField尝试更改主题中的cursorColor
或主题或 TextField 中的cursorColor
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
MaterialApp(
title: "Rate your Colleagues",
theme: ThemeData(
// for iOS
cupertinoOverrideTheme: CupertinoThemeData(
primaryColor: Colors.red,
),
// for others(Android, Fuchsia)
cursorColor: Colors.red,
home: SplashScreen(),
);
...
Or或者
new MaterialApp(
title: "Flutter App",
theme: ThemeData(
cursorColor: Colors.red,
home: HomeScreen(),
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.