Skip to content

Commit 03d6c91

Browse files
committed
updates
1 parent 5c33988 commit 03d6c91

File tree

5 files changed

+15
-28
lines changed

5 files changed

+15
-28
lines changed

lib/main.dart

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,7 @@ class MyApp extends StatelessWidget {
2525
debugShowCheckedModeBanner: false,
2626
scaffoldMessengerKey: Utils.messengerKey,
2727
theme: ThemeData(useMaterial3: true, colorScheme: lightColorScheme),
28-
darkTheme: ThemeData(useMaterial3: true, colorScheme: darkColorScheme).copyWith(
29-
pageTransitionsTheme: const PageTransitionsTheme(
30-
builders: <TargetPlatform, PageTransitionsBuilder>{
31-
TargetPlatform.android: ZoomPageTransitionsBuilder(),
32-
},
33-
),
34-
),
28+
darkTheme: ThemeData(useMaterial3: true, colorScheme: darkColorScheme),
3529
home: const Splash(),
3630
),
3731
);

lib/provider/get_data_provider.dart

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import 'dart:convert';
22
import 'dart:io';
3+
import 'dart:math';
34

5+
import 'package:flutter/foundation.dart';
46
import 'package:flutter/material.dart';
57
import 'package:http/http.dart' as http;
68
import '../models/category.dart';
@@ -11,8 +13,9 @@ class GetDataProvider with ChangeNotifier {
1113
List<WallpaperModel> animeData = [];
1214
List<CategoryModel> categoryData = [];
1315

14-
int currentPage = 1;
15-
int pageSize = 10; // Set the limit per page
16+
17+
int currentPage = 3;
18+
int pageSize = 40; // Set the limit per page
1619
bool isLoading = false;
1720
bool hasMoreData = true;
1821

@@ -44,7 +47,7 @@ class GetDataProvider with ChangeNotifier {
4447
{
4548
'page[limit]': '$limit',
4649
'page[offset]': '${page * limit}', // Calculate the offset based on the page and limit
47-
'filter[ageRating]': 'sfw',
50+
//'filter[ageRating]': 'sfw',
4851
},
4952
),
5053
headers: {
@@ -91,7 +94,9 @@ final result = await http.get(
9194
}
9295
}
9396
}catch(e){
94-
print(e);
97+
if (kDebugMode) {
98+
print(e);
99+
}
95100
Utils.showError(e.toString());
96101
}
97102
return [];
@@ -140,7 +145,9 @@ final result = await http.get(
140145
}
141146
}
142147
} catch (e) {
143-
print('Error fetching category images: $e');
148+
if (kDebugMode) {
149+
print('Error fetching category images: $e');
150+
}
144151
}
145152

146153
return [];

lib/widgets/drawer_scr.dart

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,7 @@ class _DrawerScreenState extends State<DrawerScreen> {
2121
path: 'nevilpurpp12@gmail.com',
2222
);
2323

24-
final Uri ratingUrl = Uri.parse('https://play.google.com/store/apps/details?id=com.anime_wallpaper.fl');
25-
Future<void> _launchUrlRating() async {
26-
if (!await launchUrl(ratingUrl)) {
27-
throw Exception('Could not launch $ratingUrl');
28-
}
29-
}
24+
3025

3126
Future<void> _launchUrlMessage() async {
3227
if (!await launchUrl(emailLaunchUri)) {
@@ -121,7 +116,7 @@ final Uri ratingUrl = Uri.parse('https://play.google.com/store/apps/details?id=c
121116
),
122117
),
123118
onTap: (){
124-
_launchUrlRating();
119+
125120
}
126121
),
127122

pubspec.lock

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,6 @@ packages:
99
url: "https://pub.dev"
1010
source: hosted
1111
version: "4.2.2"
12-
animations:
13-
dependency: "direct main"
14-
description:
15-
name: animations
16-
sha256: ef57563eed3620bd5d75ad96189846aca1e033c0c45fc9a7d26e80ab02b88a70
17-
url: "https://pub.dev"
18-
source: hosted
19-
version: "2.0.8"
2012
archive:
2113
dependency: transitive
2214
description:

pubspec.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ dependencies:
2222
flutter_cache_manager: ^3.3.1
2323
image_gallery_saver: ^2.0.3
2424
flutter_staggered_grid_view: ^0.7.0
25-
animations: ^2.0.8
2625
flutter_rating_bar: ^4.0.1
2726
shared_preferences: ^2.2.2
2827
permission_handler: ^10.4.3

0 commit comments

Comments
 (0)