mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 03:49:22 +00:00
Hacked Textfield layout. Needs correct colors for hover/active/disabled etc. Fixes cursor height issue
This commit is contained in:
parent
bcb5075fb2
commit
fcecb0d6b2
1 changed files with 92 additions and 61 deletions
|
@ -22,6 +22,7 @@ import 'package:stackwallet/widgets/custom_buttons/blue_text_button.dart';
|
||||||
import 'package:stackwallet/widgets/desktop/desktop_scaffold.dart';
|
import 'package:stackwallet/widgets/desktop/desktop_scaffold.dart';
|
||||||
import 'package:stackwallet/widgets/desktop/primary_button.dart';
|
import 'package:stackwallet/widgets/desktop/primary_button.dart';
|
||||||
import 'package:stackwallet/widgets/loading_indicator.dart';
|
import 'package:stackwallet/widgets/loading_indicator.dart';
|
||||||
|
import 'package:stackwallet/widgets/rounded_container.dart';
|
||||||
import 'package:stackwallet/widgets/stack_text_field.dart';
|
import 'package:stackwallet/widgets/stack_text_field.dart';
|
||||||
|
|
||||||
class DesktopLoginView extends ConsumerStatefulWidget {
|
class DesktopLoginView extends ConsumerStatefulWidget {
|
||||||
|
@ -194,19 +195,26 @@ class _DesktopLoginViewState extends ConsumerState<DesktopLoginView> {
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 24,
|
height: 24,
|
||||||
),
|
),
|
||||||
ClipRRect(
|
RoundedContainer(
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
height: 74,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textFieldDefaultBG,
|
||||||
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(
|
borderRadius: BorderRadius.circular(
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
key: const Key("desktopLoginPasswordFieldKey"),
|
key: const Key("desktopLoginPasswordFieldKey"),
|
||||||
focusNode: passwordFocusNode,
|
focusNode: passwordFocusNode,
|
||||||
controller: passwordController,
|
controller: passwordController,
|
||||||
style: STextStyles.desktopTextMedium(context).copyWith(
|
style: STextStyles.desktopTextMedium(context),
|
||||||
height: 2,
|
|
||||||
),
|
|
||||||
obscureText: hidePassword,
|
obscureText: hidePassword,
|
||||||
enableSuggestions: false,
|
enableSuggestions: false,
|
||||||
|
textAlignVertical: TextAlignVertical.bottom,
|
||||||
autocorrect: false,
|
autocorrect: false,
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
onSubmitted: (_) {
|
onSubmitted: (_) {
|
||||||
|
@ -219,13 +227,33 @@ class _DesktopLoginViewState extends ConsumerState<DesktopLoginView> {
|
||||||
passwordFocusNode,
|
passwordFocusNode,
|
||||||
context,
|
context,
|
||||||
).copyWith(
|
).copyWith(
|
||||||
|
isDense: true,
|
||||||
|
fillColor: Colors.transparent,
|
||||||
|
focusColor: Colors.transparent,
|
||||||
|
hoverColor: Colors.transparent,
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: const BorderSide(
|
||||||
|
color: Colors.transparent, width: 1),
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
),
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: const BorderSide(
|
||||||
|
color: Colors.transparent, width: 1),
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
),
|
||||||
|
contentPadding: const EdgeInsets.only(
|
||||||
|
top: 0,
|
||||||
|
left: 16,
|
||||||
|
right: 16,
|
||||||
|
bottom: 0,
|
||||||
|
),
|
||||||
suffixIcon: UnconstrainedBox(
|
suffixIcon: UnconstrainedBox(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: 70,
|
height: 70,
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
width: 24,
|
width: 20,
|
||||||
),
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
key: const Key(
|
key: const Key(
|
||||||
|
@ -244,8 +272,8 @@ class _DesktopLoginViewState extends ConsumerState<DesktopLoginView> {
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
.extension<StackColors>()!
|
.extension<StackColors>()!
|
||||||
.textDark3,
|
.textDark3,
|
||||||
width: 24,
|
width: 20,
|
||||||
height: 24,
|
height: 20,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -259,11 +287,14 @@ class _DesktopLoginViewState extends ConsumerState<DesktopLoginView> {
|
||||||
),
|
),
|
||||||
onChanged: (newValue) {
|
onChanged: (newValue) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_continueEnabled = passwordController.text.isNotEmpty;
|
_continueEnabled =
|
||||||
|
passwordController.text.isNotEmpty;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 24,
|
height: 24,
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue