@@ -497,8 +497,6 @@ class _FeedTabState extends State<FeedTab> {
|
||||
|
||||
// ignore: must_be_immutable
|
||||
|
||||
|
||||
|
||||
Widget containertile({required String text}) {
|
||||
return commonGlassContainer(
|
||||
border: 1,
|
||||
@@ -741,12 +739,12 @@ class LatestTab extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _LatestTabState extends State<LatestTab> {
|
||||
FutureGroup futureGroup = FutureGroup();
|
||||
late Future latestfuture;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
futureGroup.add(LatespostApi().getLatestPostApi());
|
||||
futureGroup.close();
|
||||
latestfuture = LatespostApi().getLatestPostApi();
|
||||
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@@ -859,7 +857,7 @@ class _LatestTabState extends State<LatestTab> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return FutureBuilder(
|
||||
future: futureGroup.future,
|
||||
future: latestfuture,
|
||||
builder: (ctx, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
return const Center(child: ShimmerCommon());
|
||||
|
||||
Reference in New Issue
Block a user