Skip to content

Commit 4548e1d

Browse files
committed
fixes
1 parent 10348c7 commit 4548e1d

File tree

1 file changed

+36
-30
lines changed

1 file changed

+36
-30
lines changed

lib/screens/settings_page.dart

Lines changed: 36 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -68,44 +68,48 @@ class SettingsPage extends ConsumerWidget {
6868
'$kDefaultUri → ${settings.defaultUriScheme}://$kDefaultUri'),
6969
trailing: Container(
7070
decoration: BoxDecoration(
71-
border: Border.all(color: Colors.grey, width: 2.0), // Adjust border width as needed
72-
borderRadius: BorderRadius.circular(8.0), // Adjust border radius as needed
71+
border: Border.all(
72+
color: Theme.of(context).colorScheme.onSurface,
73+
),
74+
borderRadius: kBorderRadius8,
7375
),
74-
child: DropdownButton<String>(
75-
onChanged: (value) {
76-
ref
77-
.read(settingsProvider.notifier)
78-
.update(defaultUriScheme: value);
79-
},
80-
value: settings.defaultUriScheme,
81-
items: kSupportedUriSchemes.map<DropdownMenuItem<String>>((String value) {
82-
return DropdownMenuItem<String>(
83-
value: value,
84-
child: Padding(
85-
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 16), // Adjust padding to increase size
86-
child: Text(value),
87-
),
88-
);
89-
}).toList(),
90-
underline: Container(),
91-
iconSize: 30,
92-
76+
child: DropdownButtonHideUnderline(
77+
child: DropdownButton<String>(
78+
borderRadius: kBorderRadius8,
79+
onChanged: (value) {
80+
ref
81+
.read(settingsProvider.notifier)
82+
.update(defaultUriScheme: value);
83+
},
84+
value: settings.defaultUriScheme,
85+
items: kSupportedUriSchemes
86+
.map<DropdownMenuItem<String>>((String value) {
87+
return DropdownMenuItem<String>(
88+
value: value,
89+
child: Padding(
90+
padding: kP10,
91+
child: Text(value),
92+
),
93+
);
94+
}).toList(),
95+
),
9396
),
9497
),
9598
),
96-
9799
ListTile(
98100
contentPadding: kPb10,
99101
hoverColor: kColorTransparent,
100102
title: const Text('Default Code Generator'),
101103
trailing: Container(
102-
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 15), // Adjust padding to increase size
103104
decoration: BoxDecoration(
104-
border: Border.all(color: Colors.grey, width: 2.0), // Add border styling
105-
borderRadius: BorderRadius.circular(5), // Optional: Add border radius
105+
border: Border.all(
106+
color: Theme.of(context).colorScheme.onSurface,
107+
),
108+
borderRadius: kBorderRadius8,
106109
),
107-
child: DropdownButtonHideUnderline( // Hide the default underline
110+
child: DropdownButtonHideUnderline(
108111
child: DropdownButton<CodegenLanguage>(
112+
borderRadius: kBorderRadius8,
109113
value: settings.defaultCodeGenLang,
110114
onChanged: (value) {
111115
ref
@@ -115,14 +119,16 @@ class SettingsPage extends ConsumerWidget {
115119
items: CodegenLanguage.values.map((value) {
116120
return DropdownMenuItem<CodegenLanguage>(
117121
value: value,
118-
child: Text(value.label),
122+
child: Padding(
123+
padding: kP10,
124+
child: Text(value.label),
125+
),
119126
);
120127
}).toList(),
121-
onTap: () {}, // Prevent dropdown from opening on tap
122-
),
128+
),
129+
),
123130
),
124131
),
125-
),
126132
CheckboxListTile(
127133
contentPadding: EdgeInsets.zero,
128134
title: const Text("Save Responses"),

0 commit comments

Comments
 (0)