Uso correto de app_colors.dart
This commit is contained in:
@@ -63,8 +63,8 @@ class _BluetoothConnectionScreenState extends State<BluetoothConnectionScreen> {
|
||||
} else {
|
||||
if (mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text(AppStrings.permissionDenied),
|
||||
SnackBar(
|
||||
content: Text(AppStrings.permissionsDenied),
|
||||
behavior: SnackBarBehavior.floating,
|
||||
),
|
||||
);
|
||||
@@ -80,7 +80,7 @@ class _BluetoothConnectionScreenState extends State<BluetoothConnectionScreen> {
|
||||
if (await FlutterBluePlus.adapterState.first != BluetoothAdapterState.on) {
|
||||
if (mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
SnackBar(
|
||||
content: Text(AppStrings.turnOnBluetooth),
|
||||
behavior: SnackBarBehavior.floating,
|
||||
),
|
||||
@@ -135,9 +135,9 @@ class _BluetoothConnectionScreenState extends State<BluetoothConnectionScreen> {
|
||||
});
|
||||
FlutterBluePlus.stopScan();
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text(AppStrings.connectionSuccess),
|
||||
backgroundColor: Colors.green,
|
||||
SnackBar(
|
||||
content: Text(AppStrings.connectedSuccess),
|
||||
backgroundColor: AppColors.success,
|
||||
behavior: SnackBarBehavior.floating,
|
||||
),
|
||||
);
|
||||
@@ -146,8 +146,8 @@ class _BluetoothConnectionScreenState extends State<BluetoothConnectionScreen> {
|
||||
if (mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text('${AppStrings.connectionError}$e'),
|
||||
backgroundColor: Colors.red,
|
||||
content: Text('${AppStrings.connectFail}$e'),
|
||||
backgroundColor: AppColors.error,
|
||||
behavior: SnackBarBehavior.floating,
|
||||
),
|
||||
);
|
||||
@@ -198,10 +198,10 @@ class _BluetoothConnectionScreenState extends State<BluetoothConnectionScreen> {
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.backgroundGrey,
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
border: Border.all(color: Colors.white.withOpacity(0.05)),
|
||||
border: Border.all(color: Colors.white.withValues(alpha: 0.05)),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.3),
|
||||
color: Colors.black.withValues(alpha: 0.3),
|
||||
blurRadius: 20,
|
||||
offset: const Offset(0, 10),
|
||||
),
|
||||
@@ -216,7 +216,7 @@ class _BluetoothConnectionScreenState extends State<BluetoothConnectionScreen> {
|
||||
Text(
|
||||
_connectedDevice != null
|
||||
? AppStrings.statusConnected
|
||||
: (_isScanning ? AppStrings.statusSearching : AppStrings.statusReady),
|
||||
: (_isScanning ? AppStrings.searching : AppStrings.statusReady),
|
||||
style: TextStyle(
|
||||
color: _connectedDevice != null ? Colors.greenAccent : (_isScanning ? AppColors.coral : Colors.white54),
|
||||
fontSize: 10,
|
||||
@@ -243,10 +243,10 @@ class _BluetoothConnectionScreenState extends State<BluetoothConnectionScreen> {
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(15),
|
||||
decoration: BoxDecoration(
|
||||
color: _isScanning ? Colors.red.withOpacity(0.1) : AppColors.coral.withOpacity(0.1),
|
||||
color: _isScanning ? Colors.red.withValues(alpha: 0.1) : AppColors.coral.withValues(alpha: 0.1),
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(
|
||||
color: _isScanning ? Colors.red.withOpacity(0.5) : AppColors.coral.withOpacity(0.5),
|
||||
color: _isScanning ? Colors.red.withValues(alpha: 0.5) : AppColors.coral.withValues(alpha: 0.5),
|
||||
width: 2,
|
||||
),
|
||||
),
|
||||
@@ -263,10 +263,10 @@ class _BluetoothConnectionScreenState extends State<BluetoothConnectionScreen> {
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(15),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.red.withOpacity(0.1),
|
||||
color: Colors.red.withValues(alpha: 0.1),
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(
|
||||
color: Colors.red.withOpacity(0.5),
|
||||
color: Colors.red.withValues(alpha: 0.5),
|
||||
width: 2,
|
||||
),
|
||||
),
|
||||
@@ -297,21 +297,21 @@ class _BluetoothConnectionScreenState extends State<BluetoothConnectionScreen> {
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(20),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.backgroundGrey.withOpacity(0.4),
|
||||
color: AppColors.backgroundGrey.withValues(alpha: 0.4),
|
||||
borderRadius: BorderRadius.circular(25),
|
||||
border: Border.all(color: Colors.white.withOpacity(0.03)),
|
||||
border: Border.all(color: Colors.white.withValues(alpha: 0.03)),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.background.withOpacity(0.8),
|
||||
color: AppColors.background.withValues(alpha: 0.8),
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
),
|
||||
child: Icon(
|
||||
Icons.bluetooth_audio_rounded,
|
||||
color: _connectedDevice != null ? Colors.greenAccent : AppColors.coral.withOpacity(0.8),
|
||||
color: _connectedDevice != null ? Colors.greenAccent : AppColors.coral.withValues(alpha: 0.8),
|
||||
size: 24
|
||||
),
|
||||
),
|
||||
@@ -357,13 +357,13 @@ class _BluetoothConnectionScreenState extends State<BluetoothConnectionScreen> {
|
||||
],
|
||||
),
|
||||
if (_isScanning)
|
||||
Positioned(
|
||||
const Positioned(
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: LinearProgressIndicator(
|
||||
backgroundColor: Colors.transparent,
|
||||
valueColor: const AlwaysStoppedAnimation<Color>(AppColors.coral),
|
||||
valueColor: AlwaysStoppedAnimation<Color>(AppColors.coral),
|
||||
minHeight: 2,
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user