bluetooth_off_page.dart 794 B

123456789101112131415161718192021222324252627282930
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter_blue/flutter_blue.dart';
  3. class BluetoothOffPage extends StatelessWidget {
  4. final BluetoothState state;
  5. BluetoothOffPage({Key? key, required BluetoothState this.state}) : super(key: key);
  6. @override
  7. Widget build(BuildContext context) {
  8. return Container(
  9. color: Colors.blue,
  10. child: Center(
  11. child: Column(
  12. mainAxisSize: MainAxisSize.min,
  13. children: <Widget>[
  14. const Icon(
  15. Icons.bluetooth_disabled,
  16. size: 200.0,
  17. color: Colors.white54,
  18. ),
  19. Text(
  20. '蓝牙适配器: ${state != null ? state.toString().substring(15) : '不可用'}.',
  21. ),
  22. ],
  23. ),
  24. ),
  25. );
  26. }
  27. }