mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-06 04:17:42 +00:00
41 lines
1.5 KiB
Dart
41 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:stackwallet/utilities/text_styles.dart';
|
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
|
import 'package:stackwallet/utilities/util.dart';
|
|
|
|
InputDecoration standardInputDecoration(
|
|
String? labelText,
|
|
FocusNode textFieldFocusNode,
|
|
BuildContext context, {
|
|
bool desktopMed = false,
|
|
}) {
|
|
final isDesktop = Util.isDesktop;
|
|
|
|
return InputDecoration(
|
|
labelText: labelText,
|
|
fillColor: textFieldFocusNode.hasFocus
|
|
? Theme.of(context).extension<StackColors>()!.textFieldActiveBG
|
|
: Theme.of(context).extension<StackColors>()!.textFieldDefaultBG,
|
|
labelStyle: isDesktop
|
|
? desktopMed
|
|
? STextStyles.desktopTextExtraSmall(context).copyWith(
|
|
color: Theme.of(context)
|
|
.extension<StackColors>()!
|
|
.textFieldDefaultText)
|
|
: STextStyles.desktopTextFieldLabel(context)
|
|
: STextStyles.fieldLabel(context),
|
|
hintStyle: isDesktop
|
|
? desktopMed
|
|
? STextStyles.desktopTextExtraSmall(context).copyWith(
|
|
color: Theme.of(context)
|
|
.extension<StackColors>()!
|
|
.textFieldDefaultText)
|
|
: STextStyles.desktopTextFieldLabel(context)
|
|
: STextStyles.fieldLabel(context),
|
|
enabledBorder: InputBorder.none,
|
|
focusedBorder: InputBorder.none,
|
|
errorBorder: InputBorder.none,
|
|
disabledBorder: InputBorder.none,
|
|
focusedErrorBorder: InputBorder.none,
|
|
);
|
|
}
|