Skip to content

Commit

Permalink
fixed observer
Browse files Browse the repository at this point in the history
  • Loading branch information
Hareesh-Nandigrama committed Aug 3, 2023
1 parent a2f6a40 commit 9df2cfa
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions lib/pages/timetable/timetable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,23 @@ class _TimeTableTabState extends State<TimeTableTab> {
const SizedBox(
height: 10,
),
Observer(builder: (context) {
return FutureBuilder(
future: store.initialiseTT(),
builder: (context, snapshot) {
if (!snapshot.hasData) {
return ListShimmer();
FutureBuilder(
future: store.initialiseTT(),
builder: (context, snapshot) {
if (!snapshot.hasData) {
return ListShimmer();
}
return Observer(
builder: (context) {
return ListView.builder(
shrinkWrap: true,
physics: const ClampingScrollPhysics(),
itemCount: store.todayTimeTable.length,
itemBuilder: (context, index) =>
store.todayTimeTable[index]);
}
return ListView.builder(
shrinkWrap: true,
physics: const ClampingScrollPhysics(),
itemCount: store.todayTimeTable.length,
itemBuilder: (context, index) =>
store.todayTimeTable[index]);
});
}),
);
}),
],
)
: Column(
Expand Down

0 comments on commit 9df2cfa

Please sign in to comment.