From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-flutter-frontend 05/10] move to TextButton from FlatButton
Date: Thu, 8 Sep 2022 11:55:45 +0200 [thread overview]
Message-ID: <20220908095550.2913416-9-d.csapak@proxmox.com> (raw)
In-Reply-To: <20220908095550.2913416-1-d.csapak@proxmox.com>
flutter 3.0 removed FlatButton
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
lib/pages/main_layout_slim.dart | 2 +-
| 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',
--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<PveWelcome> 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<PveWelcome> 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<PveWelcome> 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<PveWelcome> 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<PveConfigurationDialog> {
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
next prev parent reply other threads:[~2022-09-08 9:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-08 9:55 [pve-devel] [PATCH proxmox-login-manager/pve-flutter-frontend] fixes & update to flutter 3.3 Dominik Csapak
2022-09-08 9:55 ` [pve-devel] [PATCH proxmox-login-manager 1/3] login_form: keep Continue button above Android softnav Dominik Csapak
2022-09-08 9:55 ` [pve-devel] [PATCH proxmox-login-manager 2/3] migrate from FlatButton to TextButton Dominik Csapak
2022-09-08 9:55 ` [pve-devel] [PATCH proxmox-login-manager 3/3] improve colors of login screen Dominik Csapak
2022-09-08 9:55 ` [pve-devel] [PATCH pve-flutter-frontend 01/10] avoid elements hiding behind Android softnav buttons Dominik Csapak
2022-09-08 9:55 ` [pve-devel] [PATCH pve-flutter-frontend 02/10] increase compileSdkVersion to 32 Dominik Csapak
2022-09-08 9:55 ` [pve-devel] [PATCH pve-flutter-frontend 03/10] fix null handling in MainActivity.kt Dominik Csapak
2022-09-08 9:55 ` [pve-devel] [PATCH pve-flutter-frontend 04/10] move to OutlinedButton from OutlineButton Dominik Csapak
2022-09-08 9:55 ` Dominik Csapak [this message]
2022-09-08 9:55 ` [pve-devel] [PATCH pve-flutter-frontend 06/10] move to ElevatedButton from RaisedButton Dominik Csapak
2022-09-08 9:55 ` [pve-devel] [PATCH pve-flutter-frontend 07/10] improve colors for indicator/toggles Dominik Csapak
2022-09-08 9:55 ` [pve-devel] [PATCH pve-flutter-frontend 08/10] fix typo Opague -> Opaque Dominik Csapak
2022-09-08 9:55 ` [pve-devel] [PATCH pve-flutter-frontend 09/10] fix guest backup widget start display Dominik Csapak
2022-09-08 9:55 ` [pve-devel] [PATCH pve-flutter-frontend 10/10] fix options view when ostype is null Dominik Csapak
2022-09-08 15:31 ` [pve-devel] applied-series: [PATCH proxmox-login-manager/pve-flutter-frontend] fixes & update to flutter 3.3 Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220908095550.2913416-9-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox