feat: save scheme gestures logic.

This commit is contained in:
2021-11-23 19:00:37 +08:00
parent aa367cf3ba
commit 7977116d75
8 changed files with 85 additions and 95 deletions
+1 -1
View File
@@ -143,7 +143,7 @@ class _DButtonState extends State<DButton> {
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
),
borderColor: _hovering
borderColor: _hovering && widget.onTap != null
? (widget.activeBorderColor ?? context.watch<SettingsProvider>().currentActiveColor)
: Color(0xff565656),
borderWidth: 2,
+4 -1
View File
@@ -7,12 +7,14 @@ import 'package:provider/provider.dart';
class DTextField extends StatefulWidget {
final String? initText;
final String? hint;
final bool readOnly;
final Function(String value) onComplete;
const DTextField({
Key? key,
this.initText,
this.hint,
this.readOnly = false,
required this.onComplete,
}) : super(key: key);
@@ -62,7 +64,7 @@ class _DTextFieldState extends State<DTextField> {
color: Colors.grey.withOpacity(.3),
border: Border.all(
width: 2,
color: Focus.of(context).hasFocus
color: Focus.of(context).hasFocus && !widget.readOnly
? context.watch<SettingsProvider>().activeColor ?? Color(0xff565656)
: Color(0xff565656)),
),
@@ -71,6 +73,7 @@ class _DTextFieldState extends State<DTextField> {
child: Padding(
padding: const EdgeInsets.only(left: 15),
child: TextField(
readOnly: widget.readOnly,
focusNode: _focusNode,
cursorColor: context.watch<SettingsProvider>().activeColor,
decoration: InputDecoration.collapsed(hintText: widget.hint),