feat:更新主题色兼容

This commit is contained in:
2025-11-21 14:58:11 +08:00
parent 3ea162f33e
commit f133e5ce13
11 changed files with 112 additions and 75 deletions

View File

@@ -77,8 +77,6 @@ class _FlispFormState extends State<FlispForm> {
decoration: InputDecoration(
hintText: '记录你的灵感瞬间...',
hintStyle: TextStyle(color: Colors.grey),
counterText: '',
suffixText: '${provider.formItem.content.length}/$maxContentCount',
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide: BorderSide(color: Colors.grey.shade200),
@@ -98,6 +96,22 @@ class _FlispFormState extends State<FlispForm> {
minLines: 4,
maxLines: 8,
maxLength: maxContentCount,
buildCounter: (
context, {
required currentLength,
required isFocused,
maxLength,
}) {
return Text(
'$currentLength/$maxContentCount',
style: TextStyle(
color:
currentLength > maxLength!
? Colors.red
: Theme.of(context).colorScheme.primary,
),
);
},
validator: (value) {
if (value != null && value.isEmpty) {
return '请输入内容';
@@ -204,7 +218,7 @@ class _FlispFormState extends State<FlispForm> {
width: 90,
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
color: Colors.white,
color: Theme.of(context).colorScheme.surface,
borderRadius: BorderRadius.circular(8),
boxShadow: [
BoxShadow(