mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 16:05:18 +00:00
chore: add lastfm login field autofill support
This commit is contained in:
parent
34b80a36b4
commit
8de2196b61
@ -59,29 +59,42 @@ class LastFMLoginPage extends HookConsumerWidget {
|
|||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
Text(context.l10n.login_with_your_lastfm),
|
Text(context.l10n.login_with_your_lastfm),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
TextFormField(
|
AutofillGroup(
|
||||||
controller: username,
|
child: Column(
|
||||||
validator: ValidationBuilder().required().build(),
|
children: [
|
||||||
decoration: InputDecoration(
|
TextFormField(
|
||||||
labelText: context.l10n.username,
|
autofillHints: const [
|
||||||
),
|
AutofillHints.username,
|
||||||
),
|
AutofillHints.email,
|
||||||
const SizedBox(height: 10),
|
],
|
||||||
TextFormField(
|
controller: username,
|
||||||
controller: password,
|
validator: ValidationBuilder().required().build(),
|
||||||
validator: ValidationBuilder().required().build(),
|
decoration: InputDecoration(
|
||||||
obscureText: !passwordVisible.value,
|
labelText: context.l10n.username,
|
||||||
decoration: InputDecoration(
|
),
|
||||||
labelText: context.l10n.password,
|
|
||||||
suffixIcon: IconButton(
|
|
||||||
icon: Icon(
|
|
||||||
passwordVisible.value
|
|
||||||
? SpotubeIcons.eye
|
|
||||||
: SpotubeIcons.noEye,
|
|
||||||
),
|
),
|
||||||
onPressed: () =>
|
const SizedBox(height: 10),
|
||||||
passwordVisible.value = !passwordVisible.value,
|
TextFormField(
|
||||||
),
|
autofillHints: const [
|
||||||
|
AutofillHints.password,
|
||||||
|
],
|
||||||
|
controller: password,
|
||||||
|
validator: ValidationBuilder().required().build(),
|
||||||
|
obscureText: !passwordVisible.value,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
labelText: context.l10n.password,
|
||||||
|
suffixIcon: IconButton(
|
||||||
|
icon: Icon(
|
||||||
|
passwordVisible.value
|
||||||
|
? SpotubeIcons.eye
|
||||||
|
: SpotubeIcons.noEye,
|
||||||
|
),
|
||||||
|
onPressed: () => passwordVisible.value =
|
||||||
|
!passwordVisible.value,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_desktop_tools/flutter_desktop_tools.dart';
|
|
||||||
|
|
||||||
ThemeData theme(Color seed, Brightness brightness, bool isAmoled) {
|
ThemeData theme(Color seed, Brightness brightness, bool isAmoled) {
|
||||||
final scheme = ColorScheme.fromSeed(
|
final scheme = ColorScheme.fromSeed(
|
||||||
|
Loading…
Reference in New Issue
Block a user