Skip to content

Commit

Permalink
Fix tile spacing (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
SankethBK authored Oct 26, 2024
1 parent 8e0c260 commit 3fdf93a
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 48 deletions.
6 changes: 3 additions & 3 deletions lib/core/pages/settings_details.dart
Original file line number Diff line number Diff line change
Expand Up @@ -149,16 +149,16 @@ class _SettingsDetailPageState extends State<SettingsDetailPage> {
];
case SettingCategoriesConstants.reminders:
return [
const SizedBox(height: 20),
const SizedBox(height: 10),
const DailyReminders(),
];
case SettingCategoriesConstants.themeFontAndLanguage:
return [
const SizedBox(height: 10),
const ThemeDropdown(),
const SizedBox(height: 20),
const SizedBox(height: 15),
const FontDropdown(),
const SizedBox(height: 20),
const SizedBox(height: 15),
const LanguageDropDown(),
];

Expand Down
87 changes: 42 additions & 45 deletions lib/core/widgets/language_dropdown.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,60 +16,57 @@ class LanguageDropDown extends StatelessWidget {
.extension<NoteCreatePageThemeExtensions>()!
.mainTextColor;

return Padding(
padding: const EdgeInsets.symmetric(vertical: 5),
child: Row(
children: [
Expanded(
child: Text(
S.current.appLanguage,
style: TextStyle(
fontSize: 16.0,
color: mainTextColor,
),
return Row(
children: [
Expanded(
child: Text(
S.current.appLanguage,
style: TextStyle(
fontSize: 16.0,
color: mainTextColor,
),
),
PopupMenuButton<Locale>(
itemBuilder: (context) {
return S.delegate.supportedLocales.map((Locale locale) {
return PopupMenuItem(
value: locale,
child: Text(
LanguageLocal
.isoLangs[locale.toLanguageTag()]!["nativeName"]!,
style: TextStyle(
color: mainTextColor,
),
),
);
}).toList();
},
padding: const EdgeInsets.only(bottom: 0.0),
onSelected: (value) async {
// Update the selected value
await localeCubit.setLocale(value);
},
child: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text(
LanguageLocal.isoLangs[localeCubit.state.currentLocale
.toLanguageTag()]!["nativeName"]!,
),
PopupMenuButton<Locale>(
itemBuilder: (context) {
return S.delegate.supportedLocales.map((Locale locale) {
return PopupMenuItem(
value: locale,
child: Text(
LanguageLocal
.isoLangs[locale.toLanguageTag()]!["nativeName"]!,
style: TextStyle(
color: mainTextColor,
fontSize: 16,
),
),
const SizedBox(width: 10),
Icon(
Icons.arrow_drop_down,
);
}).toList();
},
padding: const EdgeInsets.only(bottom: 0.0),
onSelected: (value) async {
// Update the selected value
await localeCubit.setLocale(value);
},
child: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text(
LanguageLocal.isoLangs[localeCubit.state.currentLocale
.toLanguageTag()]!["nativeName"]!,
style: TextStyle(
color: mainTextColor,
fontSize: 16,
),
],
),
),
const SizedBox(width: 10),
Icon(
Icons.keyboard_arrow_down,
color: mainTextColor,
),
],
),
],
),
),
],
);
}
}

0 comments on commit 3fdf93a

Please sign in to comment.