Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
nevilpurpp committed Dec 4, 2023
1 parent 5c33988 commit 03d6c91
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 28 deletions.
8 changes: 1 addition & 7 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,7 @@ class MyApp extends StatelessWidget {
debugShowCheckedModeBanner: false,
scaffoldMessengerKey: Utils.messengerKey,
theme: ThemeData(useMaterial3: true, colorScheme: lightColorScheme),
darkTheme: ThemeData(useMaterial3: true, colorScheme: darkColorScheme).copyWith(
pageTransitionsTheme: const PageTransitionsTheme(
builders: <TargetPlatform, PageTransitionsBuilder>{
TargetPlatform.android: ZoomPageTransitionsBuilder(),
},
),
),
darkTheme: ThemeData(useMaterial3: true, colorScheme: darkColorScheme),
home: const Splash(),
),
);
Expand Down
17 changes: 12 additions & 5 deletions lib/provider/get_data_provider.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'dart:convert';
import 'dart:io';
import 'dart:math';

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

int currentPage = 1;
int pageSize = 10; // Set the limit per page

int currentPage = 3;
int pageSize = 40; // Set the limit per page
bool isLoading = false;
bool hasMoreData = true;

Expand Down Expand Up @@ -44,7 +47,7 @@ class GetDataProvider with ChangeNotifier {
{
'page[limit]': '$limit',
'page[offset]': '${page * limit}', // Calculate the offset based on the page and limit
'filter[ageRating]': 'sfw',
//'filter[ageRating]': 'sfw',
},
),
headers: {
Expand Down Expand Up @@ -91,7 +94,9 @@ final result = await http.get(
}
}
}catch(e){
print(e);
if (kDebugMode) {
print(e);
}
Utils.showError(e.toString());
}
return [];
Expand Down Expand Up @@ -140,7 +145,9 @@ final result = await http.get(
}
}
} catch (e) {
print('Error fetching category images: $e');
if (kDebugMode) {
print('Error fetching category images: $e');
}
}

return [];
Expand Down
9 changes: 2 additions & 7 deletions lib/widgets/drawer_scr.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ class _DrawerScreenState extends State<DrawerScreen> {
path: 'nevilpurpp12@gmail.com',
);

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


Future<void> _launchUrlMessage() async {
if (!await launchUrl(emailLaunchUri)) {
Expand Down Expand Up @@ -121,7 +116,7 @@ final Uri ratingUrl = Uri.parse('https://play.google.com/store/apps/details?id=c
),
),
onTap: (){
_launchUrlRating();

}
),

Expand Down
8 changes: 0 additions & 8 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.2.2"
animations:
dependency: "direct main"
description:
name: animations
sha256: ef57563eed3620bd5d75ad96189846aca1e033c0c45fc9a7d26e80ab02b88a70
url: "https://pub.dev"
source: hosted
version: "2.0.8"
archive:
dependency: transitive
description:
Expand Down
1 change: 0 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ dependencies:
flutter_cache_manager: ^3.3.1
image_gallery_saver: ^2.0.3
flutter_staggered_grid_view: ^0.7.0
animations: ^2.0.8
flutter_rating_bar: ^4.0.1
shared_preferences: ^2.2.2
permission_handler: ^10.4.3
Expand Down

0 comments on commit 03d6c91

Please sign in to comment.