From 60b332ad8ae135efb36c9a391f6b447d0112ace0 Mon Sep 17 00:00:00 2001 From: ryleedavis Date: Tue, 1 Nov 2022 14:16:31 -0600 Subject: [PATCH] auto backup drop down menu --- .../create_auto_backup.dart | 57 ++++++++++++------- 1 file changed, 38 insertions(+), 19 deletions(-) diff --git a/lib/pages_desktop_specific/home/settings_menu/backup_and_restore/create_auto_backup.dart b/lib/pages_desktop_specific/home/settings_menu/backup_and_restore/create_auto_backup.dart index 0c8c47c9e..16bda2ff7 100644 --- a/lib/pages_desktop_specific/home/settings_menu/backup_and_restore/create_auto_backup.dart +++ b/lib/pages_desktop_specific/home/settings_menu/backup_and_restore/create_auto_backup.dart @@ -34,7 +34,7 @@ class _CreateAutoBackup extends State { String _currentDropDownValue = "Every 10 minutes"; - final List _dropDOwnItems = [ + final List _dropDownItems = [ "Every 10 minutes", "Every 20 minutes", "Every 30 minutes", @@ -352,25 +352,44 @@ class _CreateAutoBackup extends State { const SizedBox( height: 10, ), - DropdownButton( - value: _currentDropDownValue, - items: _dropDOwnItems - .map( - (e) => DropdownMenuItem( - value: e, - child: Text(e), - ), - ) - .toList(), - onChanged: (value) { - if (value is String) { - setState(() { - _currentDropDownValue = value; - }); - } - }, + Padding( + padding: const EdgeInsets.only( + left: 32, + right: 32, + ), + child: DropdownButtonFormField( + isExpanded: true, + elevation: 0, + style: STextStyles.desktopTextExtraSmall(context).copyWith( + color: Theme.of(context).extension()!.textDark, + ), + icon: SvgPicture.asset( + Assets.svg.chevronDown, + width: 10, + height: 5, + color: Theme.of(context).extension()!.textDark3, + ), + dropdownColor: + Theme.of(context).extension()!.textFieldActiveBG, + // focusColor: , + value: _currentDropDownValue, + items: _dropDownItems + .map( + (e) => DropdownMenuItem( + value: e, + child: Text(e), + ), + ) + .toList(), + onChanged: (value) { + if (value is String) { + setState(() { + _currentDropDownValue = value; + }); + } + }, + ), ), - const Spacer(), Padding( padding: const EdgeInsets.all(32), child: Row(