2022-08-26 08:11:35 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:stackwallet/utilities/text_styles.dart';
|
2022-09-22 23:48:50 +00:00
|
|
|
import 'package:stackwallet/utilities/theme/stack_colors.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(
|
2022-09-22 22:17:21 +00:00
|
|
|
String? labelText, FocusNode textFieldFocusNode, BuildContext context) {
|
2022-09-19 20:18:31 +00:00
|
|
|
final isDesktop = Util.isDesktop;
|
2022-09-15 19:48:28 +00:00
|
|
|
|
2022-08-26 08:11:35 +00:00
|
|
|
return InputDecoration(
|
|
|
|
labelText: labelText,
|
|
|
|
fillColor: textFieldFocusNode.hasFocus
|
2022-09-22 23:48:50 +00:00
|
|
|
? Theme.of(context).extension<StackColors>()!.textFieldActiveBG
|
|
|
|
: Theme.of(context).extension<StackColors>()!.textFieldDefaultBG,
|
2022-09-22 22:17:21 +00:00
|
|
|
labelStyle: isDesktop
|
|
|
|
? STextStyles.desktopTextFieldLabel(context)
|
|
|
|
: STextStyles.fieldLabel(context),
|
|
|
|
hintStyle: isDesktop
|
|
|
|
? STextStyles.desktopTextFieldLabel(context)
|
|
|
|
: STextStyles.fieldLabel(context),
|
2022-08-26 08:11:35 +00:00
|
|
|
enabledBorder: InputBorder.none,
|
|
|
|
focusedBorder: InputBorder.none,
|
|
|
|
errorBorder: InputBorder.none,
|
|
|
|
disabledBorder: InputBorder.none,
|
|
|
|
focusedErrorBorder: InputBorder.none,
|
|
|
|
);
|
|
|
|
}
|