Skip to content

Commit 77de4a2

Browse files
committed
Update Android build.gradle and splash screen code to reflect changes in target SDK and navigation
1 parent d37a902 commit 77de4a2

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

android/app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if (flutterVersionName == null) {
2525

2626
android {
2727
namespace = "com.example.recipe_ai"
28-
compileSdk = flutter.compileSdkVersion
28+
compileSdk = 34
2929
ndkVersion = flutter.ndkVersion
3030

3131
compileOptions {
@@ -38,8 +38,8 @@ android {
3838
applicationId = "com.example.recipe_ai"
3939
// You can update the following values to match your application needs.
4040
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
41-
minSdk = flutter.minSdkVersion
42-
targetSdk = flutter.targetSdkVersion
41+
minSdk = 21
42+
targetSdk = 34
4343
versionCode = flutterVersionCode.toInteger()
4444
versionName = flutterVersionName
4545
}

lib/screens/splash_screen.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'package:flutter/material.dart';
22
import 'package:flutter_screenutil/flutter_screenutil.dart';
3+
import 'package:get/get.dart';
34
import 'package:lottie/lottie.dart';
45
import 'package:recipe_ai/screens/chat.dart';
56
import 'package:recipe_ai/utils/animation.dart';
@@ -15,9 +16,7 @@ class SplashScreen extends StatefulWidget {
1516
class _SplashScreenState extends State<SplashScreen> {
1617
Future<void> _navigateToSplashScreen() {
1718
return Future.delayed(const Duration(seconds: 3), () {
18-
Navigator.pushReplacement(context, MaterialPageRoute(builder: (context) {
19-
return const ChatPage();
20-
}));
19+
Get.offAllNamed(ChatPage.text);
2120
});
2221
}
2322

0 commit comments

Comments
 (0)