mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
26 lines
903 B
Dart
26 lines
903 B
Dart
import 'dart:io';
|
|
|
|
import 'package:flutter/material.dart';
|
|
import 'package:stackwallet/utilities/cfcolors.dart';
|
|
import 'package:stackwallet/utilities/text_styles.dart';
|
|
|
|
InputDecoration standardInputDecoration(
|
|
String? labelText, FocusNode textFieldFocusNode) {
|
|
final isDesktop = Platform.isWindows || Platform.isMacOS || Platform.isLinux;
|
|
|
|
return InputDecoration(
|
|
labelText: labelText,
|
|
fillColor: textFieldFocusNode.hasFocus
|
|
? CFColors.textFieldActive
|
|
: CFColors.textFieldInactive,
|
|
labelStyle:
|
|
isDesktop ? STextStyles.desktopTextFieldLabel : STextStyles.fieldLabel,
|
|
hintStyle:
|
|
isDesktop ? STextStyles.desktopTextFieldLabel : STextStyles.fieldLabel,
|
|
enabledBorder: InputBorder.none,
|
|
focusedBorder: InputBorder.none,
|
|
errorBorder: InputBorder.none,
|
|
disabledBorder: InputBorder.none,
|
|
focusedErrorBorder: InputBorder.none,
|
|
);
|
|
}
|