Untitled

 avatar
unknown
dart
2 years ago
1.1 kB
13
Indexable
 
Widget _generateRightHandSideColumnRow(BuildContext context, int index) {
    return Row(
      children: <Widget>[
        Container(
          width: 100,
          height: 52,
          padding: const EdgeInsets.fromLTRB(5, 0, 0, 0),
          alignment: Alignment.centerLeft,
          child:  StreamBuilder<dynamic>(
            stream: _leavelistbloc.mkiDataStream,
            builder: (context, snapshot) {
              if (snapshot.hasData) {
                switch (snapshot.data!.status!) {
                  case Status.INITIAL:
                    return Text('');
                  case Status.LOADING:
                    return Text('');
                  case Status.COMPLETED:
                    LeaveListModel responses =
                        snapshot.data!.data as LeaveListModel;
                    return Text(responses.response?.paidLeaveTypeName?? "");
                  case Status.ERROR:
                    return Text('');
                }
              }
              return Container();
            },
          ),
        ),
      ],
    );
  }
}
Editor is loading...