summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/widgets/scan_page.dart72
1 files changed, 36 insertions, 36 deletions
diff --git a/lib/widgets/scan_page.dart b/lib/widgets/scan_page.dart
index 00283d2..dbc64dc 100644
--- a/lib/widgets/scan_page.dart
+++ b/lib/widgets/scan_page.dart
@@ -81,26 +81,26 @@ class _ScanPageState extends State<ScanPage> {
@override
Widget build(BuildContext context) {
- return StreamBuilder(
- stream: widget.deviceScanner.statusStream,
- initialData: ScanStatus.idle,
- builder: (context, asyncSnapshot) {
- bool isScanning = asyncSnapshot.data == ScanStatus.scanning;
- return Scaffold(
- appBar: AppBar(
- backgroundColor: Theme.of(context).colorScheme.inversePrimary,
- title: Text(widget.title),
- ),
- body: Center(
- child: Column(
- // TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint"
- // action in the IDE, or press "p" in the console), to see the
- // wireframe for each widget.
- mainAxisAlignment: MainAxisAlignment.center,
- spacing: 24,
- children: <Widget>[
- SizedBox(height: 15),
- Row(
+ return Scaffold(
+ appBar: AppBar(
+ backgroundColor: Theme.of(context).colorScheme.inversePrimary,
+ title: Text(widget.title),
+ ),
+ body: Center(
+ child: Column(
+ // TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint"
+ // action in the IDE, or press "p" in the console), to see the
+ // wireframe for each widget.
+ mainAxisAlignment: MainAxisAlignment.center,
+ spacing: 24,
+ children: <Widget>[
+ SizedBox(height: 15),
+ StreamBuilder(
+ stream: widget.deviceScanner.statusStream,
+ initialData: ScanStatus.idle,
+ builder: (context, asyncSnapshot) {
+ bool isScanning = asyncSnapshot.data == ScanStatus.scanning;
+ return Row(
mainAxisAlignment: MainAxisAlignment.center,
spacing: 15.0,
children: [
@@ -117,24 +117,24 @@ class _ScanPageState extends State<ScanPage> {
child: Text("Connect"),
),
],
- ),
- StreamBuilder(
- stream: widget.deviceScanner.scanResultsStream,
- initialData: <Device>[],
- builder: (context, asyncSnapshot) {
- return DeviceScanSelection(
- items: asyncSnapshot.data ?? [],
- onItemSelected: (item) {
- setState(() => selectedDevice = item);
- },
- );
+ );
+ },
+ ),
+ StreamBuilder(
+ stream: widget.deviceScanner.scanResultsStream,
+ initialData: <Device>[],
+ builder: (context, asyncSnapshot) {
+ return DeviceScanSelection(
+ items: asyncSnapshot.data ?? [],
+ onItemSelected: (item) {
+ setState(() => selectedDevice = item);
},
- ),
- ],
+ );
+ },
),
- ),
- );
- },
+ ],
+ ),
+ ),
);
}
}