This commit is contained in:
Ankit Mahato
2024-03-17 01:25:50 +05:30
parent 10348c7358
commit 4548e1dd67

View File

@ -68,44 +68,48 @@ class SettingsPage extends ConsumerWidget {
'$kDefaultUri${settings.defaultUriScheme}://$kDefaultUri'), '$kDefaultUri${settings.defaultUriScheme}://$kDefaultUri'),
trailing: Container( trailing: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all(color: Colors.grey, width: 2.0), // Adjust border width as needed border: Border.all(
borderRadius: BorderRadius.circular(8.0), // Adjust border radius as needed color: Theme.of(context).colorScheme.onSurface,
),
borderRadius: kBorderRadius8,
), ),
child: DropdownButton<String>( child: DropdownButtonHideUnderline(
onChanged: (value) { child: DropdownButton<String>(
ref borderRadius: kBorderRadius8,
.read(settingsProvider.notifier) onChanged: (value) {
.update(defaultUriScheme: value); ref
}, .read(settingsProvider.notifier)
value: settings.defaultUriScheme, .update(defaultUriScheme: value);
items: kSupportedUriSchemes.map<DropdownMenuItem<String>>((String value) { },
return DropdownMenuItem<String>( value: settings.defaultUriScheme,
value: value, items: kSupportedUriSchemes
child: Padding( .map<DropdownMenuItem<String>>((String value) {
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 16), // Adjust padding to increase size return DropdownMenuItem<String>(
child: Text(value), value: value,
), child: Padding(
); padding: kP10,
}).toList(), child: Text(value),
underline: Container(), ),
iconSize: 30, );
}).toList(),
),
), ),
), ),
), ),
ListTile( ListTile(
contentPadding: kPb10, contentPadding: kPb10,
hoverColor: kColorTransparent, hoverColor: kColorTransparent,
title: const Text('Default Code Generator'), title: const Text('Default Code Generator'),
trailing: Container( trailing: Container(
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 15), // Adjust padding to increase size
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all(color: Colors.grey, width: 2.0), // Add border styling border: Border.all(
borderRadius: BorderRadius.circular(5), // Optional: Add border radius color: Theme.of(context).colorScheme.onSurface,
),
borderRadius: kBorderRadius8,
), ),
child: DropdownButtonHideUnderline( // Hide the default underline child: DropdownButtonHideUnderline(
child: DropdownButton<CodegenLanguage>( child: DropdownButton<CodegenLanguage>(
borderRadius: kBorderRadius8,
value: settings.defaultCodeGenLang, value: settings.defaultCodeGenLang,
onChanged: (value) { onChanged: (value) {
ref ref
@ -115,14 +119,16 @@ class SettingsPage extends ConsumerWidget {
items: CodegenLanguage.values.map((value) { items: CodegenLanguage.values.map((value) {
return DropdownMenuItem<CodegenLanguage>( return DropdownMenuItem<CodegenLanguage>(
value: value, value: value,
child: Text(value.label), child: Padding(
padding: kP10,
child: Text(value.label),
),
); );
}).toList(), }).toList(),
onTap: () {}, // Prevent dropdown from opening on tap ),
), ),
), ),
), ),
),
CheckboxListTile( CheckboxListTile(
contentPadding: EdgeInsets.zero, contentPadding: EdgeInsets.zero,
title: const Text("Save Responses"), title: const Text("Save Responses"),