mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-11-27 08:14:56 +00:00
rename state
This commit is contained in:
@ -10,9 +10,9 @@ class CenterBodyWidget extends StatelessWidget {
|
||||
return BlocBuilder<CenterBodyBloc, CenterBodyState>(
|
||||
builder: (context, state) {
|
||||
if (state is InitialState) {
|
||||
context.read<CenterBodyBloc>().add(Button1PressedEvent());
|
||||
context.read<CenterBodyBloc>().add(CommunityStructureSelectedEvent());
|
||||
}
|
||||
if (state is Button1State) {
|
||||
if (state is CommunityStructureState) {
|
||||
context.read<SpaceManagementBloc>().add(BlankStateEvent());
|
||||
}
|
||||
|
||||
@ -25,15 +25,15 @@ class CenterBodyWidget extends StatelessWidget {
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
context.read<CenterBodyBloc>().add(Button1PressedEvent());
|
||||
context.read<CenterBodyBloc>().add(CommunityStructureSelectedEvent());
|
||||
},
|
||||
child: Text(
|
||||
'Community Structure',
|
||||
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
|
||||
fontWeight: state is Button1State
|
||||
fontWeight: state is CommunityStructureState
|
||||
? FontWeight.bold
|
||||
: FontWeight.normal,
|
||||
color: state is Button1State
|
||||
color: state is CommunityStructureState
|
||||
? Theme.of(context).textTheme.bodyLarge!.color
|
||||
: Theme.of(context)
|
||||
.textTheme
|
||||
@ -43,18 +43,18 @@ class CenterBodyWidget extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 20),
|
||||
const SizedBox(width: 20),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
context.read<CenterBodyBloc>().add(Button2PressedEvent());
|
||||
context.read<CenterBodyBloc>().add(SpaceModelSelectedEvent());
|
||||
},
|
||||
child: Text(
|
||||
'Space Model',
|
||||
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
|
||||
fontWeight: state is Button2State
|
||||
fontWeight: state is SpaceModelState
|
||||
? FontWeight.bold
|
||||
: FontWeight.normal,
|
||||
color: state is Button2State
|
||||
color: state is SpaceModelState
|
||||
? Theme.of(context).textTheme.bodyLarge!.color
|
||||
: Theme.of(context)
|
||||
.textTheme
|
||||
|
||||
Reference in New Issue
Block a user