From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 03F5191605 for ; Thu, 8 Sep 2022 11:56:53 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0C2941ADE9 for ; Thu, 8 Sep 2022 11:55:59 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Thu, 8 Sep 2022 11:55:53 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 099D644569 for ; Thu, 8 Sep 2022 11:55:53 +0200 (CEST) From: Dominik Csapak To: pve-devel@lists.proxmox.com Date: Thu, 8 Sep 2022 11:55:45 +0200 Message-Id: <20220908095550.2913416-9-d.csapak@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220908095550.2913416-1-d.csapak@proxmox.com> References: <20220908095550.2913416-1-d.csapak@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.092 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com] Subject: [pve-devel] [PATCH pve-flutter-frontend 05/10] move to TextButton from FlatButton X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2022 09:56:53 -0000 flutter 3.0 removed FlatButton Signed-off-by: Dominik Csapak --- lib/pages/main_layout_slim.dart | 2 +- lib/widgets/pve_console_menu_widget.dart | 4 +-- lib/widgets/pve_first_welcome_screen.dart | 32 ++++++++++++------- lib/widgets/pve_guest_backup_widget.dart | 6 ++-- .../pve_subscription_alert_dialog.dart | 2 +- 5 files changed, 27 insertions(+), 19 deletions(-) diff --git a/lib/pages/main_layout_slim.dart b/lib/pages/main_layout_slim.dart index 9839428..ba95fe8 100644 --- a/lib/pages/main_layout_slim.dart +++ b/lib/pages/main_layout_slim.dart @@ -853,7 +853,7 @@ class _MobileResourceFilterSheet extends StatelessWidget { 'Filter Results', ), trailing: rBloc.isFiltered - ? FlatButton( + ? TextButton( onPressed: () => rBloc.events.add(ResetFilter()), child: Text( 'Reset', diff --git a/lib/widgets/pve_console_menu_widget.dart b/lib/widgets/pve_console_menu_widget.dart index 17be9a3..ac5ad26 100644 --- a/lib/widgets/pve_console_menu_widget.dart +++ b/lib/widgets/pve_console_menu_widget.dart @@ -83,7 +83,7 @@ class PveConsoleMenu extends StatelessWidget { title: Text('Got Exception'), content: Text(e.message!), actions: [ - FlatButton( + TextButton( onPressed: () => Navigator.of(context).pop(), child: Text('Close')) @@ -154,7 +154,7 @@ class PveConsoleMenu extends StatelessWidget { title: Text(title), content: Text(content), actions: [ - FlatButton( + TextButton( onPressed: () => Navigator.of(context).pop(), child: Text('Close')) ], diff --git a/lib/widgets/pve_first_welcome_screen.dart b/lib/widgets/pve_first_welcome_screen.dart index 3a09943..46d2ee0 100644 --- a/lib/widgets/pve_first_welcome_screen.dart +++ b/lib/widgets/pve_first_welcome_screen.dart @@ -67,9 +67,11 @@ class _PveWelcomeState extends State with TickerProviderStateMixin { Widget nextDoneButton() { if (_isLast) { - return FlatButton( - textColor: _buttonTextColor, - disabledTextColor: _buttonDisabledTextColor, + return TextButton( + style: TextButton.styleFrom( + foregroundColor: _buttonTextColor, + disabledForegroundColor: _buttonDisabledTextColor, + ), child: Text( "Done", ), @@ -78,10 +80,12 @@ class _PveWelcomeState extends State with TickerProviderStateMixin { }, ); } else { - return FlatButton( + return TextButton( child: Text("Next"), - textColor: _buttonTextColor, - disabledTextColor: _buttonDisabledTextColor, + style: TextButton.styleFrom( + foregroundColor: _buttonTextColor, + disabledForegroundColor: _buttonDisabledTextColor, + ), onPressed: () { _controller! .nextPage(duration: _pageChangeDuration, curve: _pageChangeCurve); @@ -92,9 +96,11 @@ class _PveWelcomeState extends State with TickerProviderStateMixin { Widget skipPrevButton() { if (_isFirst) { - return FlatButton( - textColor: _buttonTextColor, - disabledTextColor: _buttonDisabledTextColor, + return TextButton( + style: TextButton.styleFrom( + foregroundColor: _buttonTextColor, + disabledForegroundColor: _buttonDisabledTextColor, + ), onPressed: () { skipDone(); }, @@ -103,9 +109,11 @@ class _PveWelcomeState extends State with TickerProviderStateMixin { ), ); } else { - return FlatButton( - textColor: _buttonTextColor, - disabledTextColor: _buttonDisabledTextColor, + return TextButton( + style: TextButton.styleFrom( + foregroundColor: _buttonTextColor, + disabledForegroundColor: _buttonDisabledTextColor, + ), child: Text( "Prev", ), diff --git a/lib/widgets/pve_guest_backup_widget.dart b/lib/widgets/pve_guest_backup_widget.dart index b766efb..e6aebde 100644 --- a/lib/widgets/pve_guest_backup_widget.dart +++ b/lib/widgets/pve_guest_backup_widget.dart @@ -302,14 +302,14 @@ class PveGuestBackupContent extends StatelessWidget { title: Text(title), content: Text(body), actions: [ - FlatButton( + TextButton( onPressed: () => Navigator.of(context).pop(false), child: Text( 'Cancel', style: TextStyle(fontWeight: FontWeight.bold), ), ), - FlatButton( + TextButton( onPressed: () => Navigator.of(context).pop(true), child: Text( 'Confirm', @@ -371,7 +371,7 @@ class _PveConfigurationDialogState extends State { child: CircularProgressIndicator(), ), actions: [ - FlatButton( + TextButton( onPressed: () => Navigator.of(context).pop(true), child: Text( 'Close', diff --git a/lib/widgets/pve_subscription_alert_dialog.dart b/lib/widgets/pve_subscription_alert_dialog.dart index df880f7..e5d85a4 100644 --- a/lib/widgets/pve_subscription_alert_dialog.dart +++ b/lib/widgets/pve_subscription_alert_dialog.dart @@ -11,7 +11,7 @@ class PveSubscriptionAlertDialog extends StatelessWidget { ' software and getting stable updates and security enhancements,' ' as well as quick enterprise support.\n\nPlease consider to buy a subscription.'), actions: [ - FlatButton( + TextButton( onPressed: () async { final url = 'https://www.proxmox.com/proxmox-ve/pricing'; if (await canLaunch(url)) { -- 2.30.2