mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
formatted all files.
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_web/pages/routines/bloc/create_routine_bloc/create_routine_bloc.dart';
|
||||
import 'package:syncrow_web/pages/routines/bloc/create_routine_bloc/create_routine_event.dart';
|
||||
import 'package:syncrow_web/pages/routines/bloc/create_routine_bloc/create_routine_state.dart';
|
||||
import 'package:syncrow_web/pages/routines/bloc/create_routine_bloc/create_routine_bloc.dart';
|
||||
import 'package:syncrow_web/pages/routines/create_new_routines/commu_dropdown.dart';
|
||||
import 'package:syncrow_web/pages/routines/create_new_routines/space_dropdown.dart';
|
||||
import 'package:syncrow_web/utils/color_manager.dart';
|
||||
@ -27,11 +27,11 @@ class _CreateNewRoutinesDialogState extends State<CreateNewRoutinesDialog> {
|
||||
CreateRoutineBloc()..add(const FetchCommunityEvent()),
|
||||
child: BlocBuilder<CreateRoutineBloc, CreateRoutineState>(
|
||||
builder: (context, state) {
|
||||
final _bloc = BlocProvider.of<CreateRoutineBloc>(context);
|
||||
final spaces = _bloc.spacesOnlyWithDevices;
|
||||
final bloc = BlocProvider.of<CreateRoutineBloc>(context);
|
||||
final spaces = bloc.spacesOnlyWithDevices;
|
||||
final isLoadingCommunities = state is CommunitiesLoadingState;
|
||||
final isLoadingSpaces = state is SpaceWithDeviceLoadingState;
|
||||
String spaceHint = 'Please Select';
|
||||
var spaceHint = 'Please Select';
|
||||
if (_selectedCommunity != null) {
|
||||
if (isLoadingSpaces) {
|
||||
spaceHint = 'Loading spaces...';
|
||||
@ -77,9 +77,9 @@ class _CreateNewRoutinesDialogState extends State<CreateNewRoutinesDialog> {
|
||||
SpaceTreeDropdown(
|
||||
selectedSpaceId: _selectedId,
|
||||
onChanged: (String? newValue) {
|
||||
setState(() => _selectedId = newValue!);
|
||||
setState(() => _selectedId = newValue);
|
||||
if (_selectedId != null) {
|
||||
_bloc.add(SpaceOnlyWithDevicesEvent(
|
||||
bloc.add(SpaceOnlyWithDevicesEvent(
|
||||
_selectedId!));
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user