mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
SP-1440
This commit is contained in:
@ -14,7 +14,7 @@ class SaveRoutineHelper {
|
|||||||
static Future<void> showSaveRoutineDialog(BuildContext context) async {
|
static Future<void> showSaveRoutineDialog(BuildContext context) async {
|
||||||
return showDialog<void>(
|
return showDialog<void>(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (context) {
|
||||||
return BlocBuilder<RoutineBloc, RoutineState>(
|
return BlocBuilder<RoutineBloc, RoutineState>(
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
final selectedConditionLabel = state.selectedAutomationOperator == 'and'
|
final selectedConditionLabel = state.selectedAutomationOperator == 'and'
|
||||||
@ -24,7 +24,8 @@ class SaveRoutineHelper {
|
|||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
contentPadding: EdgeInsets.zero,
|
contentPadding: EdgeInsets.zero,
|
||||||
content: Container(
|
content: Container(
|
||||||
width: MediaQuery.sizeOf(context).width * 0.5,
|
width: context.screenWidth * 0.5,
|
||||||
|
height: 500,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
borderRadius: BorderRadius.circular(20),
|
borderRadius: BorderRadius.circular(20),
|
||||||
@ -44,17 +45,24 @@ class SaveRoutineHelper {
|
|||||||
const SizedBox(height: 18),
|
const SizedBox(height: 18),
|
||||||
_buildDivider(),
|
_buildDivider(),
|
||||||
_buildListsLabelRow(selectedConditionLabel),
|
_buildListsLabelRow(selectedConditionLabel),
|
||||||
Padding(
|
Expanded(
|
||||||
padding: const EdgeInsetsDirectional.symmetric(
|
child: Padding(
|
||||||
horizontal: 16,
|
padding: const EdgeInsetsDirectional.symmetric(
|
||||||
),
|
horizontal: 16,
|
||||||
child: Row(
|
),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
mainAxisSize: MainAxisSize.min,
|
||||||
_buildIfConditions(state, context),
|
spacing: 24,
|
||||||
_buildThenActions(state, context),
|
children: [
|
||||||
],
|
_buildIfConditions(state, context),
|
||||||
|
Container(
|
||||||
|
width: 1,
|
||||||
|
color: ColorsManager.greyColor,
|
||||||
|
),
|
||||||
|
_buildThenActions(state, context),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
_buildDivider(),
|
_buildDivider(),
|
||||||
@ -133,7 +141,7 @@ class SaveRoutineHelper {
|
|||||||
static Widget _buildThenActions(RoutineState state, BuildContext context) {
|
static Widget _buildThenActions(RoutineState state, BuildContext context) {
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: ListView(
|
child: ListView(
|
||||||
shrinkWrap: true,
|
// shrinkWrap: true,
|
||||||
children: state.thenItems.map((item) {
|
children: state.thenItems.map((item) {
|
||||||
final functions = state.selectedFunctions[item['uniqueCustomId']] ?? [];
|
final functions = state.selectedFunctions[item['uniqueCustomId']] ?? [];
|
||||||
return functionRow(item, context, functions);
|
return functionRow(item, context, functions);
|
||||||
@ -145,7 +153,7 @@ class SaveRoutineHelper {
|
|||||||
static Widget _buildIfConditions(RoutineState state, BuildContext context) {
|
static Widget _buildIfConditions(RoutineState state, BuildContext context) {
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: ListView(
|
child: ListView(
|
||||||
shrinkWrap: true,
|
// shrinkWrap: true,
|
||||||
children: [
|
children: [
|
||||||
if (state.isTabToRun)
|
if (state.isTabToRun)
|
||||||
ListTile(
|
ListTile(
|
||||||
|
Reference in New Issue
Block a user