File tree Expand file tree Collapse file tree 3 files changed +18
-18
lines changed Expand file tree Collapse file tree 3 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import 'package:dio/dio.dart';
22import 'package:{{ app_name }}/services/api/base_api_service.dart';
33
44class {{ class_name }}Service {
5- Future<Response <dynamic >> getData(int pageSkip, int perPageCount) async {
5+ Future<Response <dynamic >? > getData(int pageSkip, int perPageCount) async {
66 try {
77 var request = await BaseApiService()
88 .customDio()
Original file line number Diff line number Diff line change @@ -34,21 +34,21 @@ class {{ class_name }}Page extends StatefulWidget {
3434 ? EmptyPageWidget()
3535 : Column(
3636 children: [
37- Expanded(
38- child: ListView.builder(
39- controller: _controller,
40- itemCount: vm.productData.length,
41- itemBuilder: (context, index) {
42- final item = vm.productData[index];
43- return Card(
44- child: SizedBox(
45- height: 200,
46- child: ListTile(
47- onTap: () {},
48- title: Text("title")
49- )));
50- },
51- ))
37+ // Expanded(
38+ // child: ListView.builder(
39+ // controller: _controller,
40+ // itemCount: vm.productData.length,
41+ // itemBuilder: (context, index) {
42+ // final item = vm.productData[index];
43+ // return Card(
44+ // child: SizedBox(
45+ // height: 200,
46+ // child: ListTile(
47+ // onTap: () {},
48+ // title: Text("title")
49+ // )));
50+ // },
51+ // ))
5252 ],
5353 ),
5454 ),
Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ class {{ class_name }}ViewModel extends ChangeNotifier {
1111 Future fetchData() async {
1212 EasyLoading.show(status: "Loading");
1313 final fetchdata = await {{ camel_file_name }}Service.getData(pageSkip, perPageCount);
14- for (var item in fetchdata.data['data']) {
14+ for (var item in fetchdata? .data['data']) {
1515 data.add(item);
1616 }
1717 notifyListeners();
18- EasyLoading.dismiss();
18+ // EasyLoading.dismiss();
1919 }
2020 }
You can’t perform that action at this time.
0 commit comments