import 'package:flutter/material.dart'; import 'package:flutter_blue/flutter_blue.dart'; class BluetoothOffPage extends StatelessWidget { final BluetoothState state; BluetoothOffPage({Key? key, required BluetoothState this.state}) : super(key: key); @override Widget build(BuildContext context) { return Container( color: Colors.blue, child: Center( child: Column( mainAxisSize: MainAxisSize.min, children: [ const Icon( Icons.bluetooth_disabled, size: 200.0, color: Colors.white54, ), Text( '蓝牙适配器: ${state != null ? state.toString().substring(15) : '不可用'}.', ), ], ), ), ); } }