WIP restore mnemonic password ui

This commit is contained in:
julian 2023-02-10 08:25:03 -06:00
parent 218017ca51
commit c275f09869

View file

@ -468,9 +468,10 @@ class _RestoreOptionsViewState extends ConsumerState<RestoreOptionsView> {
header: Container( header: Container(
color: Colors.transparent, color: Colors.transparent,
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.only(
vertical: 8.0, top: 8.0,
horizontal: 16, bottom: 8.0,
right: 10,
), ),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -504,67 +505,90 @@ class _RestoreOptionsViewState extends ConsumerState<RestoreOptionsView> {
), ),
body: Container( body: Container(
color: Colors.transparent, color: Colors.transparent,
child: ClipRRect( child: Column(
borderRadius: BorderRadius.circular( children: [
Constants.size.circularBorderRadius, ClipRRect(
), borderRadius: BorderRadius.circular(
child: TextField( Constants.size.circularBorderRadius,
key: const Key("mnemonicPassphraseFieldKey1"), ),
focusNode: passwordFocusNode, child: TextField(
controller: passwordController, key: const Key("mnemonicPassphraseFieldKey1"),
style: isDesktop focusNode: passwordFocusNode,
? STextStyles.desktopTextMedium(context).copyWith( controller: passwordController,
height: 2, style: isDesktop
) ? STextStyles.desktopTextMedium(context)
: STextStyles.field(context), .copyWith(
obscureText: hidePassword, height: 2,
enableSuggestions: false, )
autocorrect: false, : STextStyles.field(context),
decoration: standardInputDecoration( obscureText: hidePassword,
"Recovery phrase password", enableSuggestions: false,
passwordFocusNode, autocorrect: false,
context, decoration: standardInputDecoration(
).copyWith( "Recovery phrase password",
suffixIcon: UnconstrainedBox( passwordFocusNode,
child: ConditionalParent( context,
condition: isDesktop, ).copyWith(
builder: (child) => SizedBox( suffixIcon: UnconstrainedBox(
height: 70, child: ConditionalParent(
child: child, condition: isDesktop,
), builder: (child) => SizedBox(
child: Row( height: 70,
children: [ child: child,
SizedBox(
width: isDesktop ? 24 : 16,
), ),
GestureDetector( child: Row(
key: const Key( children: [
"mnemonicPassphraseFieldShowPasswordButtonKey"), SizedBox(
onTap: () async { width: isDesktop ? 24 : 16,
setState(() { ),
hidePassword = !hidePassword; GestureDetector(
}); key: const Key(
}, "mnemonicPassphraseFieldShowPasswordButtonKey"),
child: SvgPicture.asset( onTap: () async {
hidePassword setState(() {
? Assets.svg.eye hidePassword = !hidePassword;
: Assets.svg.eyeSlash, });
color: Theme.of(context) },
.extension<StackColors>()! child: SvgPicture.asset(
.textDark3, hidePassword
width: isDesktop ? 24 : 16, ? Assets.svg.eye
height: isDesktop ? 24 : 16, : Assets.svg.eyeSlash,
), color: Theme.of(context)
.extension<StackColors>()!
.textDark3,
width: isDesktop ? 24 : 16,
height: isDesktop ? 24 : 16,
),
),
const SizedBox(
width: 12,
),
],
), ),
const SizedBox( ),
width: 12,
),
],
), ),
), ),
), ),
), ),
), const SizedBox(
height: 8,
),
RoundedWhiteContainer(
child: Center(
child: Text(
"If the recovery phrase you are about to restore was created with an optional passphrase you can enter it here.",
style: isDesktop
? STextStyles.desktopTextExtraSmall(context)
.copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textSubtitle1,
)
: STextStyles.itemSubtitle(context),
),
),
),
],
), ),
), ),
), ),