CustomPagination<T> constructor
const
CustomPagination<T> ({
- Key? key,
- required Widget itemBuilder(
- BuildContext,
- T
- required Widget onError(
- dynamic
- required Widget onEmpty,
- required PaginationBuilder<
T> fetchMethod, - bool isGridView = false,
- int crossAxisCount = 1,
- double mainAxisExtent = 100,
- double mainAxisSpacing = 10,
- double crossAxisSpacing = 10,
- Axis scrollDirection = Axis.vertical,
- bool shrinkWrap = false,
- EdgeInsets padding = const EdgeInsets.all(0),
- List<
T> initialData = const [], - ScrollPhysics? physics,
- Widget separatorWidget = const SizedBox(height: 0, width: 0),
- Widget onPageLoading = const Center(child: Padding(padding: EdgeInsets.all(16.0), child: SizedBox(height: 25, width: 25, child: CircularProgressIndicator(valueColor: AlwaysStoppedAnimation<Color>(Color.fromARGB(255, 171, 100, 184)), backgroundColor: Colors.purple)))),
- Widget onLoading = const SizedBox(height: 25, width: 25, child: CircularProgressIndicator(valueColor: AlwaysStoppedAnimation<Color>(Color.fromARGB(255, 171, 100, 184)), backgroundColor: Colors.purple)),
Implementation
const CustomPagination({
Key? key,
required this.itemBuilder,
required this.onError,
required this.onEmpty,
required this.fetchMethod,
this.isGridView = false,
this.crossAxisCount = 1,
this.mainAxisExtent = 100,
this.mainAxisSpacing = 10,
this.crossAxisSpacing = 10,
this.scrollDirection = Axis.vertical,
this.shrinkWrap = false,
this.padding = const EdgeInsets.all(0),
this.initialData = const [],
this.physics,
this.separatorWidget = const SizedBox(height: 0, width: 0),
this.onPageLoading = const Center(
child: Padding(
padding: EdgeInsets.all(16.0),
child: SizedBox(
height: 25,
width: 25,
child: CircularProgressIndicator(
valueColor: AlwaysStoppedAnimation<Color>(Color.fromARGB(255, 171, 100, 184)),
backgroundColor: Colors.purple,
),
),
),
),
this.onLoading = const SizedBox(
height: 25,
width: 25,
child: CircularProgressIndicator(
valueColor: AlwaysStoppedAnimation<Color>(Color.fromARGB(255, 171, 100, 184)),
backgroundColor: Colors.purple,
),
),
}) : super(key: key);