mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-16 17:27:39 +00:00
54 lines
1.7 KiB
Dart
54 lines
1.7 KiB
Dart
/*
|
|
* This file is part of Stack Wallet.
|
|
*
|
|
* Copyright (c) 2023 Cypher Stack
|
|
* All Rights Reserved.
|
|
* The code is distributed under GPLv3 license, see LICENSE file for details.
|
|
* Generated by Cypher Stack on 2023-05-26
|
|
*
|
|
*/
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import '../themes/stack_colors.dart';
|
|
import '../utilities/text_styles.dart';
|
|
import '../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,
|
|
);
|
|
}
|