Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdownmenu #78

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 13 additions & 16 deletions lib/pages/login.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,22 +96,19 @@ class LoginScreen extends StatelessWidget {
children: [
Padding(
padding: const EdgeInsets.symmetric(vertical: 5),
child: ValueListenableBuilder(
valueListenable: urlErrorText,
builder: (ctx, value, child) {
return TextFormField(
controller: _urlController,
autocorrect: false,
decoration: InputDecoration(
labelText: Texts.loginUrlFieldLabel.i18n(),
errorText: value,
),
validator: (value) {
if (value == null || value.isEmpty) return Texts.loginUrlFieldHint.i18n();
return null;
},
);
}),
child: DropdownMenu(
enableFilter: true,
requestFocusOnTap: true,
width: 290,
label: Text(Texts.loginUrlFieldLabel.i18n()),
helperText: "Nenašli jste svoji školu? Klikněte sem",
dropdownMenuEntries: const [
DropdownMenuEntry(value: "jidelna.trebesin.cz", label: 'Střední průmyslová škola a Gymnázium Třebešín'),
DropdownMenuEntry(value: "jidelna smichov", label: 'Smíchovská střední průmyslová škola'),
DropdownMenuEntry(value: "jidelna jecna", label: 'Střední průmyslová škola elektrotechnická Ječná'),
DropdownMenuEntry(value: "jidelna women (coffee emoji)", label: 'Dívčí katolická střední škola')
],
),
),
AutofillGroup(
child: Column(
Expand Down