import 'package:flutter/material.dart'; /// 退出登录按钮 class LogoutButton extends StatelessWidget { final VoidCallback onLogout; const LogoutButton({super.key, required this.onLogout}); @override Widget build(BuildContext context) { final colorScheme = Theme.of(context).colorScheme; return SizedBox( width: double.infinity, height: 48, child: OutlinedButton( onPressed: onLogout, style: OutlinedButton.styleFrom( foregroundColor: colorScheme.error, side: BorderSide(color: colorScheme.error), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(14), ), ), child: const Text( '退出登錄', style: TextStyle(fontSize: 15, fontWeight: FontWeight.w500), ), ), ); } }