diff --git a/lib/features/key_manager/key_management_screen.dart b/lib/features/key_manager/key_management_screen.dart index f0283efe..35103eca 100644 --- a/lib/features/key_manager/key_management_screen.dart +++ b/lib/features/key_manager/key_management_screen.dart @@ -643,43 +643,39 @@ class _KeyManagementScreenState extends ConsumerState { ), ), actions: [ - Flexible( - child: TextButton( - onPressed: () => Navigator.of(dialogContext).pop(), - child: Text( - S.of(context)!.cancel, - style: const TextStyle( - color: AppTheme.textSecondary, - fontSize: 16, - fontWeight: FontWeight.w500, - ), - textAlign: TextAlign.center, + TextButton( + onPressed: () => Navigator.of(dialogContext).pop(), + child: Text( + S.of(context)!.cancel, + style: const TextStyle( + color: AppTheme.textSecondary, + fontSize: 16, + fontWeight: FontWeight.w500, ), + textAlign: TextAlign.center, ), ), - const SizedBox(width: 8), - Flexible( - child: ElevatedButton( - onPressed: () { - Navigator.of(dialogContext).pop(); - _generateNewMasterKey(); - }, - style: ElevatedButton.styleFrom( - backgroundColor: AppTheme.activeColor, - foregroundColor: Colors.black, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8), - ), - padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 12), + const SizedBox(width: 12), + ElevatedButton( + onPressed: () { + Navigator.of(dialogContext).pop(); + _generateNewMasterKey(); + }, + style: ElevatedButton.styleFrom( + backgroundColor: AppTheme.activeColor, + foregroundColor: Colors.black, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), ), - child: Text( - S.of(context)!.continueButton, - style: const TextStyle( - fontSize: 16, - fontWeight: FontWeight.w500, - ), - textAlign: TextAlign.center, + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 12), + ), + child: Text( + S.of(context)!.continueButton, + style: const TextStyle( + fontSize: 16, + fontWeight: FontWeight.w500, ), + textAlign: TextAlign.center, ), ), ], diff --git a/lib/features/relays/widgets/relay_selector.dart b/lib/features/relays/widgets/relay_selector.dart index b6084c00..51ff470c 100644 --- a/lib/features/relays/widgets/relay_selector.dart +++ b/lib/features/relays/widgets/relay_selector.dart @@ -101,49 +101,45 @@ class RelaySelector extends ConsumerWidget { ), ), actions: [ - Flexible( - child: TextButton( - onPressed: () { - Navigator.pop(dialogContext); - }, - child: Text( - S.of(context)!.cancel, - style: const TextStyle( - color: AppTheme.textSecondary, - fontSize: 16, - fontWeight: FontWeight.w500, - ), - textAlign: TextAlign.center, + TextButton( + onPressed: () { + Navigator.pop(dialogContext); + }, + child: Text( + S.of(context)!.cancel, + style: const TextStyle( + color: AppTheme.textSecondary, + fontSize: 16, + fontWeight: FontWeight.w500, ), + textAlign: TextAlign.center, ), ), - const SizedBox(width: 8), - Flexible( - child: ElevatedButton( - onPressed: () { - final url = controller.text.trim(); - if (url.isNotEmpty) { - final newRelay = Relay(url: url, isHealthy: true); - ref.read(relaysProvider.notifier).addRelay(newRelay); - Navigator.pop(dialogContext); - } - }, - style: ElevatedButton.styleFrom( - backgroundColor: AppTheme.activeColor, - foregroundColor: Colors.black, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8), - ), - padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 12), + const SizedBox(width: 12), + ElevatedButton( + onPressed: () { + final url = controller.text.trim(); + if (url.isNotEmpty) { + final newRelay = Relay(url: url, isHealthy: true); + ref.read(relaysProvider.notifier).addRelay(newRelay); + Navigator.pop(dialogContext); + } + }, + style: ElevatedButton.styleFrom( + backgroundColor: AppTheme.activeColor, + foregroundColor: Colors.black, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), ), - child: Text( - S.of(context)!.add, - style: const TextStyle( - fontSize: 16, - fontWeight: FontWeight.w500, - ), - textAlign: TextAlign.center, + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 12), + ), + child: Text( + S.of(context)!.add, + style: const TextStyle( + fontSize: 16, + fontWeight: FontWeight.w500, ), + textAlign: TextAlign.center, ), ), ], @@ -189,49 +185,45 @@ class RelaySelector extends ConsumerWidget { ), ), actions: [ - Flexible( - child: TextButton( - onPressed: () => Navigator.pop(dialogContext), - child: Text( - S.of(context)!.cancel, - style: const TextStyle( - color: AppTheme.textSecondary, - fontSize: 16, - fontWeight: FontWeight.w500, - ), - textAlign: TextAlign.center, + TextButton( + onPressed: () => Navigator.pop(dialogContext), + child: Text( + S.of(context)!.cancel, + style: const TextStyle( + color: AppTheme.textSecondary, + fontSize: 16, + fontWeight: FontWeight.w500, ), + textAlign: TextAlign.center, ), ), - const SizedBox(width: 8), - Flexible( - child: ElevatedButton( - onPressed: () { - final newUrl = controller.text.trim(); - if (newUrl.isNotEmpty && newUrl != relay.url) { - final updatedRelay = relay.copyWith(url: newUrl); - ref - .read(relaysProvider.notifier) - .updateRelay(relay, updatedRelay); - } - Navigator.pop(dialogContext); - }, - style: ElevatedButton.styleFrom( - backgroundColor: AppTheme.activeColor, - foregroundColor: Colors.black, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8), - ), - padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 12), + const SizedBox(width: 12), + ElevatedButton( + onPressed: () { + final newUrl = controller.text.trim(); + if (newUrl.isNotEmpty && newUrl != relay.url) { + final updatedRelay = relay.copyWith(url: newUrl); + ref + .read(relaysProvider.notifier) + .updateRelay(relay, updatedRelay); + } + Navigator.pop(dialogContext); + }, + style: ElevatedButton.styleFrom( + backgroundColor: AppTheme.activeColor, + foregroundColor: Colors.black, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), ), - child: Text( - S.of(context)!.save, - style: const TextStyle( - fontSize: 16, - fontWeight: FontWeight.w600, - ), - textAlign: TextAlign.center, + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 12), + ), + child: Text( + S.of(context)!.save, + style: const TextStyle( + fontSize: 16, + fontWeight: FontWeight.w500, ), + textAlign: TextAlign.center, ), ), ], diff --git a/lib/features/trades/screens/trade_detail_screen.dart b/lib/features/trades/screens/trade_detail_screen.dart index 8b63a929..59f56d3f 100644 --- a/lib/features/trades/screens/trade_detail_screen.dart +++ b/lib/features/trades/screens/trade_detail_screen.dart @@ -594,40 +594,36 @@ class TradeDetailScreen extends ConsumerWidget { ), ), actions: [ - Flexible( - child: TextButton( - onPressed: () => Navigator.of(dialogContext).pop(false), - child: Text( - S.of(context)!.no, - style: const TextStyle( - color: AppTheme.textSecondary, - fontSize: 16, - fontWeight: FontWeight.w500, - ), - textAlign: TextAlign.center, + TextButton( + onPressed: () => Navigator.of(dialogContext).pop(false), + child: Text( + S.of(context)!.no, + style: const TextStyle( + color: AppTheme.textSecondary, + fontSize: 16, + fontWeight: FontWeight.w500, ), + textAlign: TextAlign.center, ), ), - const SizedBox(width: 8), - Flexible( - child: ElevatedButton( - onPressed: () => Navigator.of(dialogContext).pop(true), - style: ElevatedButton.styleFrom( - backgroundColor: AppTheme.activeColor, - foregroundColor: Colors.black, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8), - ), - padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 12), + const SizedBox(width: 12), + ElevatedButton( + onPressed: () => Navigator.of(dialogContext).pop(true), + style: ElevatedButton.styleFrom( + backgroundColor: AppTheme.activeColor, + foregroundColor: Colors.black, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), ), - child: Text( - S.of(context)!.yes, - style: const TextStyle( - fontSize: 16, - fontWeight: FontWeight.w600, - ), - textAlign: TextAlign.center, + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 12), + ), + child: Text( + S.of(context)!.yes, + style: const TextStyle( + fontSize: 16, + fontWeight: FontWeight.w500, ), + textAlign: TextAlign.center, ), ), ],