stack_wallet/lib/widgets/stack_text_field.dart

26 lines
936 B
Dart
Raw Normal View History

2022-08-26 08:11:35 +00:00
import 'package:flutter/material.dart';
import 'package:stackwallet/utilities/text_styles.dart';
2022-09-21 00:46:07 +00:00
import 'package:stackwallet/utilities/theme/stack_theme.dart';
2022-09-19 20:18:31 +00:00
import 'package:stackwallet/utilities/util.dart';
2022-08-26 08:11:35 +00:00
InputDecoration standardInputDecoration(
String? labelText, FocusNode textFieldFocusNode) {
2022-09-19 20:18:31 +00:00
final isDesktop = Util.isDesktop;
2022-08-26 08:11:35 +00:00
return InputDecoration(
labelText: labelText,
fillColor: textFieldFocusNode.hasFocus
2022-09-21 00:46:07 +00:00
? StackTheme.instance.color.textFieldActiveBG
: StackTheme.instance.color.textFieldDefaultBG,
labelStyle:
isDesktop ? STextStyles.desktopTextFieldLabel : STextStyles.fieldLabel,
hintStyle:
isDesktop ? STextStyles.desktopTextFieldLabel : STextStyles.fieldLabel,
2022-08-26 08:11:35 +00:00
enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none,
errorBorder: InputBorder.none,
disabledBorder: InputBorder.none,
focusedErrorBorder: InputBorder.none,
);
}