Skip to content

Commit

Permalink
Make list of languages scrollable
Browse files Browse the repository at this point in the history
Limit the size of the languages list and make it scrollable so that
the other settings are directly visible.
  • Loading branch information
holybiber committed Oct 24, 2023
1 parent a6a302d commit 8d803d5
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions lib/routes/settings_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ class SettingsPage extends StatelessWidget {
appBar: AppBar(title: Text(context.l10n.title)),
body: Padding(
padding: const EdgeInsets.all(16),
child: SingleChildScrollView(
child: Column(children: [
child: Column(children: [
// Set app language
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
Expand All @@ -32,11 +31,11 @@ class SettingsPage extends StatelessWidget {
],
),
const SizedBox(height: 10),
const LanguageSettings(),
const Expanded(child: LanguageSettings()),
const UpdateSettings()
// const SizedBox(height: 10),
// const DesignSettings()
])),
]),
),
);
}
Expand Down Expand Up @@ -68,7 +67,7 @@ class LanguageSettings extends ConsumerWidget {
style: Theme.of(context).textTheme.bodyMedium,
),
const SizedBox(height: 10),
const LanguagesTable(),
const Expanded(child: SingleChildScrollView(child: LanguagesTable())),
Text(
"${context.l10n.diskUsage}: $sizeInKB kB",
style: Theme.of(context).textTheme.bodyMedium,
Expand All @@ -94,19 +93,15 @@ class UpdateSettings extends ConsumerWidget {
alignment: Alignment.topLeft,
child: Text(context.l10n.automaticUpdate,
style: Theme.of(context).textTheme.titleLarge)),
const SizedBox(height: 10),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(context.l10n.updateText,
style: Theme.of(context).textTheme.bodyMedium),
],
),
const SizedBox(height: 10),
const Row(
mainAxisAlignment: MainAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
DropdownButtonCheckFrequency(),
Expanded(
child: Text(context.l10n.updateText,
style: Theme.of(context).textTheme.bodyMedium)),
const SizedBox(width: 20),
const DropdownButtonCheckFrequency(),
],
),
const SizedBox(height: 10),
Expand Down

0 comments on commit 8d803d5

Please sign in to comment.