Init
This commit is contained in:
34
lib/NoDeviceScreen.dart
Normal file
34
lib/NoDeviceScreen.dart
Normal file
@@ -0,0 +1,34 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class NoDevicesScreen extends StatelessWidget {
|
||||
const NoDevicesScreen({super.key, required this.onScanPressed});
|
||||
|
||||
final VoidCallback onScanPressed;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.bluetooth_disabled,
|
||||
size: 100,
|
||||
color: Colors.grey,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
const Text('No devices found', style: TextStyle(fontSize: 20)),
|
||||
const SizedBox(height: 10),
|
||||
// Button to scan for devices
|
||||
ElevatedButton(
|
||||
onPressed: onScanPressed,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: const Text('Scan for devices', style: TextStyle(fontSize: 15)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user