title: Code is not running properly when I run with If else conditions, It gives me only if condition or else condition, Main code is not executing
body: <p>This is the code I want to run. The problem is When I want to run the code with the condition &quot;Swipe Loading&quot; It gives me only circular progress indicator on the screen. When I comment this condition and run with only &quot;Swipe Loaded&quot; Condition, It show the else condition that is &quot;Something went wrong&quot;. I don't know why internal code is not executing that is the main code for the page. If there is any error or important to add something please let me know.</p>
  <p>@override</p>
  <p>Widget build(BuildContext context) {</p>
  <p>return Scaffold(</p>
  <pre><code>appBar: const CustomAppBar(
    title: 'Home',
  ),
  body: BlocBuilder&lt;SwipeBloc, SwipeState&gt;(
    builder: (context, state) { 
      //      if (state is SwipeLoading) {
      //        Text(&quot;swipeloading&quot;);
      //   return Center(
      //     // child: CircularProgressIndicator(),
      //   );
      // } else if (state is SwipeLoaded) {
         if (state is SwipeLoaded) {
      //   Text(&quot;SwipeLoaded&quot;);
        var userCount = state.users.length;
        return Column(
          children: [
            InkWell(
              onDoubleTap: () {
                Navigator.pushNamed(context, '/users',
                  arguments: state.users[0]);
              },
              child: Draggable&lt;User&gt;(
              data: state.users[0],
                child: UserCard(user: state.users[0]),
                feedback: UserCard(user: state.users[0]),
                childWhenDragging: (userCount &gt; 1) ?
                  UserCard(user: state.users[1]): Container(),
                onDragEnd: (drag) {
                  if (drag.velocity.pixelsPerSecond.dx &lt; 0) {
                    context.read&lt;SwipeBloc&gt;()
                      .add(SwipeLeft(user: state.users[0]));
                    // ignore: avoid_print
                    print('Swiped left');
                  } else {
                    context.read&lt;SwipeBloc&gt;()
                      .add(SwipeRight(user: state.users[0]));
                    // ignore: avoid_print
                    print('Swiped right');
                  }
                },
              ),
            ),
            Padding(
              padding: const EdgeInsets.symmetric(
                vertical: 8.0,
                horizontal: 60,
              ),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: [
                  InkWell(
                    onTap: () {
                      context.read&lt;SwipeBloc&gt;()
                    .add(SwipeLeft(user: state.users[0]));
                  // ignore: avoid_print
                  print('Swiped left');
                    },
                    child: ChoiceButton(
                      width: 60,
                      height: 60,
                      size: 25,
                      hasGradient: false,
                      color: Theme.of(context).colorScheme.secondary,
                      icon: Icons.clear_rounded,
                    ),
                  ),
                  InkWell(
                    onTap: () {
                      context.read&lt;SwipeBloc&gt;()
                    .add(SwipeRight(user: state.users[0]));
                  // ignore: avoid_print
                  print('Swiped right');
                    },
                    child: const ChoiceButton(
                      width: 80,
                      height: 80,
                      size: 30,
                      hasGradient: true,
                      color: Colors.white,
                      icon: Icons.coffee,
                    ),
                  ),
                  ChoiceButton(
                    width: 60,
                    height: 60,
                    size: 25,
                    hasGradient: false,
                    color: Theme.of(context).primaryColor,
                    icon: Icons.watch_later,
            ),
          ],
        ),
      ),
    ],
  );
  
  
  
  }
     if (state is SwipeError) {
       return Center(
       child: Text('There are\'t any more users.',
          style: Theme.of(context).textTheme.headline3),
         );
       }
       else {
         return const Text('Something went wrong.');
       }
      },
     ),
    );
   }
  }
  </code></pre>