mirror of
				https://github.com/ImranR98/Obtainium.git
				synced 2025-10-31 13:33:28 +01:00 
			
		
		
		
	Make delete confirmation button red (#741)
This commit is contained in:
		| @@ -11,7 +11,8 @@ class GeneratedFormModal extends StatefulWidget { | |||||||
|       this.initValid = false, |       this.initValid = false, | ||||||
|       this.message = '', |       this.message = '', | ||||||
|       this.additionalWidgets = const [], |       this.additionalWidgets = const [], | ||||||
|       this.singleNullReturnButton}); |       this.singleNullReturnButton, | ||||||
|  |       this.primaryActionColour}); | ||||||
|  |  | ||||||
|   final String title; |   final String title; | ||||||
|   final String message; |   final String message; | ||||||
| @@ -19,6 +20,7 @@ class GeneratedFormModal extends StatefulWidget { | |||||||
|   final bool initValid; |   final bool initValid; | ||||||
|   final List<Widget> additionalWidgets; |   final List<Widget> additionalWidgets; | ||||||
|   final String? singleNullReturnButton; |   final String? singleNullReturnButton; | ||||||
|  |   final Color? primaryActionColour; | ||||||
|  |  | ||||||
|   @override |   @override | ||||||
|   State<GeneratedFormModal> createState() => _GeneratedFormModalState(); |   State<GeneratedFormModal> createState() => _GeneratedFormModalState(); | ||||||
| @@ -71,6 +73,10 @@ class _GeneratedFormModalState extends State<GeneratedFormModal> { | |||||||
|                 : widget.singleNullReturnButton!)), |                 : widget.singleNullReturnButton!)), | ||||||
|         widget.singleNullReturnButton == null |         widget.singleNullReturnButton == null | ||||||
|             ? TextButton( |             ? TextButton( | ||||||
|  |                 style: widget.primaryActionColour == null | ||||||
|  |                     ? null | ||||||
|  |                     : TextButton.styleFrom( | ||||||
|  |                         foregroundColor: widget.primaryActionColour), | ||||||
|                 onPressed: !valid |                 onPressed: !valid | ||||||
|                     ? null |                     ? null | ||||||
|                     : () { |                     : () { | ||||||
|   | |||||||
| @@ -892,6 +892,7 @@ class AppsProvider with ChangeNotifier { | |||||||
|         context: context, |         context: context, | ||||||
|         builder: (BuildContext ctx) { |         builder: (BuildContext ctx) { | ||||||
|           return GeneratedFormModal( |           return GeneratedFormModal( | ||||||
|  |             primaryActionColour: Theme.of(context).colorScheme.error, | ||||||
|             title: plural('removeAppQuestion', apps.length), |             title: plural('removeAppQuestion', apps.length), | ||||||
|             items: !showUninstallOption |             items: !showUninstallOption | ||||||
|                 ? [] |                 ? [] | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user