mirror of
https://github.com/Cateners/tiny_computer.git
synced 2026-05-20 16:35:47 +08:00
Move fab button
This commit is contained in:
@@ -1205,7 +1205,7 @@ class TerminalPage extends StatelessWidget {
|
|||||||
}, child: Text(D.termCommands[index]["name"]! as String));
|
}, child: Text(D.termCommands[index]["name"]! as String));
|
||||||
}, separatorBuilder:(context, index) {
|
}, separatorBuilder:(context, index) {
|
||||||
return const SizedBox.square(dimension: 4);
|
return const SizedBox.square(dimension: 4);
|
||||||
}, itemCount: D.termCommands.length))), SizedBox.fromSize(size: const Size(72, 0))])):const SizedBox.square(dimension: 0);
|
}, itemCount: D.termCommands.length)))])):const SizedBox.square(dimension: 0);
|
||||||
})
|
})
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -1344,6 +1344,22 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text(isLoadingComplete ? Util.getCurrentProp("name") : widget.title),
|
title: Text(isLoadingComplete ? Util.getCurrentProp("name") : widget.title),
|
||||||
|
actions: [
|
||||||
|
Visibility(
|
||||||
|
visible: isLoadingComplete,
|
||||||
|
child: IconButton.filledTonal(
|
||||||
|
onPressed: () {
|
||||||
|
if (G.wasX11Enabled) {
|
||||||
|
Workflow.launchX11();
|
||||||
|
} else if (G.wasAvncEnabled) {
|
||||||
|
Workflow.launchAvnc();
|
||||||
|
} else {
|
||||||
|
Workflow.launchBrowser();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
icon: const Icon(Icons.play_arrow),
|
||||||
|
tooltip: AppLocalizations.of(context)!.enterGUI))
|
||||||
|
],
|
||||||
),
|
),
|
||||||
body: isLoadingComplete
|
body: isLoadingComplete
|
||||||
? ValueListenableBuilder(
|
? ValueListenableBuilder(
|
||||||
@@ -1413,27 +1429,6 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
floatingActionButton: ValueListenableBuilder(
|
|
||||||
valueListenable: G.pageIndex,
|
|
||||||
builder: (context, value, child) {
|
|
||||||
return Visibility(
|
|
||||||
visible: isLoadingComplete && (value == 0),
|
|
||||||
child: FloatingActionButton(
|
|
||||||
tooltip: AppLocalizations.of(context)!.enterGUI,
|
|
||||||
onPressed: () {
|
|
||||||
if (G.wasX11Enabled) {
|
|
||||||
Workflow.launchX11();
|
|
||||||
} else if (G.wasAvncEnabled) {
|
|
||||||
Workflow.launchAvnc();
|
|
||||||
} else {
|
|
||||||
Workflow.launchBrowser();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
child: const Icon(Icons.play_arrow),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user