Skip to content
Snippets Groups Projects
Commit 8908813d authored by Benoît Harrault's avatar Benoît Harrault
Browse files

Add username in settings page

parent 40881628
No related branches found
No related tags found
1 merge request!48Resolve "Add username in settings page"
Pipeline #4731 passed
This commit is part of merge request !48. Comments created here will be created in the context of that merge request.
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
app.versionName=0.0.46
app.versionCode=46
app.versionName=0.0.47
app.versionCode=47
......@@ -26,6 +26,7 @@
"top_artists_title": "Top artists ({daysCount} days)",
"settings_title": "Settings",
"settings_title_global": "Global:",
"settings_label_username": "Username: ",
"settings_label_security_token": "Security token: ",
"settings_title_days_count": "Days counts: ",
......
......@@ -26,6 +26,7 @@
"top_artists_title": "Top artistes ({daysCount} jours)",
"settings_title": "Paramètres",
"settings_title_global": "Généraux :",
"settings_label_username": "Utilisateur : ",
"settings_label_security_token": "Jeton de sécurité : ",
"settings_title_days_count": "Nombre de jours : ",
......
Add "username" parameter.
Ajout du paramètre "nom d'utilisateur".
......@@ -9,17 +9,17 @@ class ScreenSettings extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
SizedBox(height: 8),
AppTitle1(text: tr('settings_title')),
SizedBox(height: 8),
AppTitle2(text: tr('settings_title_days_count')),
SettingsForm(),
],
return Material(
color: Theme.of(context).colorScheme.background,
child: ListView(
padding: const EdgeInsets.symmetric(horizontal: 4),
physics: const BouncingScrollPhysics(),
children: <Widget>[
SizedBox(height: 8),
AppTitle1(text: tr('settings_title')),
SettingsForm(),
],
),
);
}
}
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:unicons/unicons.dart';
import 'package:scrobbles/config/default_settings.dart';
import 'package:scrobbles/cubit/settings_cubit.dart';
import 'package:scrobbles/ui/widgets/app_titles.dart';
class SettingsForm extends StatefulWidget {
const SettingsForm({super.key});
......@@ -81,25 +83,31 @@ class _SettingsFormState extends State<SettingsForm> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
SizedBox(height: 8),
AppTitle2(text: tr('settings_title_global')),
// Username
// Text('settings_label_username').tr(),
// TextFormField(
// controller: usernameController,
// decoration: InputDecoration(
// border: UnderlineInputBorder(),
// ),
// ),
// SizedBox(height: 16),
// Security token
// Text('settings_label_security_token').tr(),
// TextFormField(
// controller: securityTokenController,
// decoration: InputDecoration(
// border: UnderlineInputBorder(),
// ),
// ),
// SizedBox(height: 20),
Text('settings_label_username').tr(),
TextFormField(
controller: usernameController,
decoration: InputDecoration(
border: UnderlineInputBorder(),
suffixIcon: ElevatedButton(
style: ElevatedButton.styleFrom(
shape: new RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(6.0),
),
),
child: Icon(UniconsLine.save),
onPressed: () {
saveSettings();
},
),
),
),
SizedBox(height: 8),
AppTitle2(text: tr('settings_title_days_count')),
// Statistics (recent)
Row(
......
......@@ -3,7 +3,7 @@ description: Display scrobbles data and charts
publish_to: 'none'
version: 0.0.46+46
version: 0.0.47+47
environment:
sdk: '^3.0.0'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment