adityadroid/Messio

Chat Item Widget Issue

Closed this issue · 4 comments

The chat item widget is showing errors after implementing the slide down gesture to collapse the conversation list.
The errors are

Incorrect use of Parentdatawidget.
Flexible widgets must be placed directly
inside Flex widgets.
Flexible (no depth, flex: 1, dirty has a
Flex ancestor, but there are other widgets
between them:

  • Decorated Box(bg: BoxDecoration(color:
    Color (Fafafa )
    Expanded(flex: 11
    These widgets cannot come between a
    Flexible and its Flex
    The ownership chain for the parent of the
    offending Flexible was:
    Chat qListWidget + Decorated Box
    Container
    Expanded
    Column
    Conversation Page - RepaintBoundary
    Indexed Semantics +
    Notification Listener<Keep Alive Notification

KeepAlive

inside Flex widgets.

Can you post your code?

lib.zip

Update your Conversationpage.dart class



class ConversationPage extends StatefulWidget {
  @override
  _ConversationPageState createState() => _ConversationPageState();
}

class _ConversationPageState extends State<ConversationPage> {

  @override
  Widget build(BuildContext context) {
    return SafeArea(
      child: Scaffold(
          appBar: ChatAppBar(), // Custom app bar for chat screen
          body: Stack(children: <Widget>[
            Column(
              children: <Widget>[
              ChatListWidget(),
                InputWidget()
              ],
            ),
          ]
    )
      )
    );
  }


}

Closing due to inactivity. Feel free to open it back again if the issue persists.