Bunch of updates, next up is token pipeline
This commit is contained in:
@@ -140,7 +140,7 @@ class _DeviceScreenState extends State<DeviceScreen> {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => PeripheralScreen(peripheralId: peripheral['id'],
|
||||
builder: (context) => PeripheralScreen(deviceName: deviceName, peripheralId: peripheral['id'],
|
||||
peripheralNum: peripheral['port'], deviceId: widget.deviceId,),
|
||||
),
|
||||
).then((_) { populatePeripherals(); });
|
||||
@@ -220,7 +220,7 @@ class _DeviceScreenState extends State<DeviceScreen> {
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
DropdownButtonFormField<int>(
|
||||
value: port,
|
||||
initialValue: port,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Hub Port',
|
||||
border: OutlineInputBorder(),
|
||||
|
||||
@@ -159,17 +159,20 @@ class _DevicesMenuState extends State<DevicesMenu> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: deviceList ?? const Center(child: CircularProgressIndicator()),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
onPressed: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => AddDevice()),
|
||||
);
|
||||
},
|
||||
foregroundColor: Theme.of(context).highlightColor,
|
||||
backgroundColor: Theme.of(context).primaryColorDark,
|
||||
child: Icon(Icons.add),
|
||||
),
|
||||
floatingActionButton: Container(
|
||||
padding: EdgeInsets.all(25),
|
||||
child:FloatingActionButton(
|
||||
onPressed: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => AddDevice()),
|
||||
);
|
||||
},
|
||||
foregroundColor: Theme.of(context).highlightColor,
|
||||
backgroundColor: Theme.of(context).primaryColorDark,
|
||||
child: Icon(Icons.add),
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -10,10 +10,11 @@ import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:socket_io_client/socket_io_client.dart' as IO;
|
||||
|
||||
class PeripheralScreen extends StatefulWidget {
|
||||
const PeripheralScreen({super.key, required this.peripheralId, required this.deviceId, required this.peripheralNum});
|
||||
const PeripheralScreen({super.key, required this.peripheralId, required this.deviceId, required this.peripheralNum, required this.deviceName});
|
||||
final int peripheralId;
|
||||
final int peripheralNum;
|
||||
final int deviceId;
|
||||
final String deviceName;
|
||||
@override
|
||||
State<PeripheralScreen> createState() => _PeripheralScreenState();
|
||||
}
|
||||
@@ -334,7 +335,7 @@ class _PeripheralScreenState extends State<PeripheralScreen> {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(
|
||||
peripheralName,
|
||||
"${widget.deviceName} - $peripheralName",
|
||||
style: GoogleFonts.aBeeZee(),
|
||||
),
|
||||
backgroundColor: Theme.of(context).primaryColorLight,
|
||||
@@ -462,7 +463,8 @@ class _PeripheralScreenState extends State<PeripheralScreen> {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => SchedulesScreen()
|
||||
builder: (context) => SchedulesScreen(peripheralId: widget.peripheralId, periphName: peripheralName,
|
||||
deviceId: widget.deviceId, peripheralNum: widget.peripheralNum, deviceName: widget.deviceName,)
|
||||
)
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user