2022-09-15 19:48:28 +00:00
|
|
|
import 'dart:io';
|
|
|
|
|
2022-08-26 08:11:35 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:stackwallet/utilities/cfcolors.dart';
|
|
|
|
import 'package:stackwallet/utilities/text_styles.dart';
|
|
|
|
|
|
|
|
InputDecoration standardInputDecoration(
|
|
|
|
String? labelText, FocusNode textFieldFocusNode) {
|
2022-09-15 19:48:28 +00:00
|
|
|
final isDesktop = Platform.isWindows || Platform.isMacOS || Platform.isLinux;
|
|
|
|
|
2022-08-26 08:11:35 +00:00
|
|
|
return InputDecoration(
|
|
|
|
labelText: labelText,
|
|
|
|
fillColor: textFieldFocusNode.hasFocus
|
|
|
|
? CFColors.textFieldActive
|
|
|
|
: CFColors.textFieldInactive,
|
2022-09-15 19:48:28 +00:00
|
|
|
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,
|
|
|
|
);
|
|
|
|
}
|