Groups built out fully - need to error check further

This commit is contained in:
2026-01-02 19:33:24 -06:00
parent 9ac41962c1
commit 6f7c1acbd6
7 changed files with 592 additions and 214 deletions

View File

@@ -1,5 +1,6 @@
import 'dart:convert';
import 'package:blind_master/BlindMasterResources/blind_control_widget.dart';
import 'package:blind_master/BlindMasterResources/blindmaster_progress_indicator.dart';
import 'package:blind_master/BlindMasterResources/error_snackbar.dart';
import 'package:blind_master/BlindMasterResources/secure_transmissions.dart';
@@ -592,85 +593,15 @@ class _PeripheralScreenState extends State<PeripheralScreen> {
: (calibrated
? Column(
children: [
SizedBox(
height: MediaQuery.of(context).size.height * 0.5,
child: Container(
padding: EdgeInsets.fromLTRB(0, 20, 0, 20),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
width: MediaQuery.of(context).size.width * 0.15,
),
Stack(
children: [
// Background image
Align(
alignment: Alignment.center,
child: Image.asset(
imagePath,
// fit: BoxFit.cover,
width: MediaQuery.of(context).size.width * 0.7,
),
),
Align(
alignment: Alignment.center,
child: LayoutBuilder(
builder: (context, constraints) {
final containerHeight = MediaQuery.of(context).size.width * 0.68;
final maxSlatHeight = containerHeight / 10;
final slatHeight = _blindPosition < 5
? maxSlatHeight * (5 - _blindPosition) / 5
: maxSlatHeight * (_blindPosition - 5) / 5;
return Container(
margin: EdgeInsets.only(top: MediaQuery.of(context).size.width * 0.05),
height: containerHeight,
width: MediaQuery.of(context).size.width * 0.7,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: List.generate(10, (index) {
return AnimatedContainer(
duration: const Duration(milliseconds: 300),
height: slatHeight,
width: MediaQuery.of(context).size.width * 0.65,
color: const Color.fromARGB(255, 121, 85, 72),
);
}),
),
);
}
)
)
],
),
// Slider on the side
Expanded(
child: Center(
child: RotatedBox(
quarterTurns: -1,
child: Slider(
value: _blindPosition,
activeColor: Theme.of(context).primaryColorDark,
thumbColor: Theme.of(context).primaryColorLight,
inactiveColor: Theme.of(context).primaryColorDark,
min: 0,
max: 10,
divisions: 10,
onChanged: (value) {
setState(() {
_blindPosition = value;
updateBlindPosition();
});
},
),
),
)
)
],
),
)
BlindControlWidget(
imagePath: imagePath,
blindPosition: _blindPosition,
onPositionChanged: (value) {
setState(() {
_blindPosition = value;
updateBlindPosition();
});
},
),
Container(
padding: EdgeInsets.all(25),