diff --git a/recipe_app/.gitignore b/recipe_app/.gitignore index 29a3a50..79c113f 100644 --- a/recipe_app/.gitignore +++ b/recipe_app/.gitignore @@ -5,9 +5,11 @@ *.swp .DS_Store .atom/ +.build/ .buildlog/ .history .svn/ +.swiftpm/ migrate_working_dir/ # IntelliJ related diff --git a/recipe_app/.metadata b/recipe_app/.metadata index 90eabcf..d044da8 100644 --- a/recipe_app/.metadata +++ b/recipe_app/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: "80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819" + revision: "dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668" channel: "stable" project_type: app @@ -13,26 +13,26 @@ project_type: app migration: platforms: - platform: root - create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 - base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 + create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668 + base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668 - platform: android - create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 - base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 + create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668 + base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668 - platform: ios - create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 - base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 + create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668 + base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668 - platform: linux - create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 - base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 + create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668 + base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668 - platform: macos - create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 - base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 + create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668 + base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668 - platform: web - create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 - base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 + create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668 + base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668 - platform: windows - create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 - base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 + create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668 + base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668 # User provided section diff --git a/recipe_app/README.md b/recipe_app/README.md index 2645451..262d933 100644 --- a/recipe_app/README.md +++ b/recipe_app/README.md @@ -1,4 +1,4 @@ -# recipe_app +# geeks_for_geeks A new Flutter project. diff --git a/recipe_app/Recipe_Finder_App_Flutter b/recipe_app/Recipe_Finder_App_Flutter deleted file mode 160000 index 435fbee..0000000 --- a/recipe_app/Recipe_Finder_App_Flutter +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 435fbee5e19994a086c10bddd7ac509c3e8fddb2 diff --git a/recipe_app/android/app/build.gradle b/recipe_app/android/app/build.gradle index ed4f9b0..426ef89 100644 --- a/recipe_app/android/app/build.gradle +++ b/recipe_app/android/app/build.gradle @@ -6,7 +6,7 @@ plugins { } android { - namespace = "com.example.recipe_app" + namespace = "com.example.geeks_for_geeks" compileSdk = flutter.compileSdkVersion ndkVersion = flutter.ndkVersion @@ -21,7 +21,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId = "com.example.recipe_app" + applicationId = "com.example.geeks_for_geeks" // You can update the following values to match your application needs. // For more information, see: https://flutter.dev/to/review-gradle-config. minSdk = flutter.minSdkVersion diff --git a/recipe_app/android/app/src/main/AndroidManifest.xml b/recipe_app/android/app/src/main/AndroidManifest.xml index b6922a6..5aa83c7 100644 --- a/recipe_app/android/app/src/main/AndroidManifest.xml +++ b/recipe_app/android/app/src/main/AndroidManifest.xml @@ -1,6 +1,8 @@ + + CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName - Recipe App + Geeks For Geeks CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -13,7 +13,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - recipe_app + geeks_for_geeks CFBundlePackageType APPL CFBundleShortVersionString diff --git a/recipe_app/lib/HomePage.dart b/recipe_app/lib/HomePage.dart new file mode 100644 index 0000000..c5af248 --- /dev/null +++ b/recipe_app/lib/HomePage.dart @@ -0,0 +1,109 @@ +// Importing the dart:convert library for JSON encoding and decoding. +import 'dart:convert'; +// Importing Flutter's material design package. +import 'package:flutter/material.dart'; +// Importing the RecipeDetailPage for navigation. +import 'package:geeks_for_geeks/RecipeDetailPage.dart'; +// Importing the HTTP package for making API requests. +import 'package:http/http.dart' as http; + +class HomePage extends StatefulWidget { + const HomePage({super.key}); + + @override + State createState() => _HomePageState(); +} + +class _HomePageState extends State { + // API key for accessing the Spoonacular API. + final String apiKey = "API_KEY"; + // List to store the fetched recipes. + List recipes = []; + + @override + void initState() { + super.initState(); + // Fetching recipe IDs when the widget is initialized. + fetchRecipeIDs(); + } + + // Function to fetch random recipe IDs from the Spoonacular API. + Future fetchRecipeIDs() async { + // API endpoint for fetching random recipes. + final url = Uri.parse( + "https://api.spoonacular.com/recipes/random?number=50&apiKey=$apiKey"); + // Making a GET request to the API. + final response = await http.get(url); + if (response.statusCode == 200) { + // If the response is successful, decode the JSON response. + List randomRecipes = json.decode(response.body)['recipes']; + // Extracting recipe IDs from the response. + List recipeIds = + randomRecipes.map((recipe) => recipe['id'].toString()).toList(); + fetchRecipes(recipeIds); // Fetching detailed recipes using the IDs. + } else { + // Logging an error message if the request fails. + print("Failed to fetch recipe IDs"); + } + } + + // Function to fetch detailed recipe information using recipe IDs. + Future fetchRecipes(List ids) async { + // API endpoint for fetching detailed recipe information. + final url = Uri.parse( + "https://api.spoonacular.com/recipes/informationBulk?ids=${ids.join(',')}&apiKey=$apiKey"); + // Making a GET request to the API. + final response = await http.get(url); + + if (response.statusCode == 200) { + setState(() { + // Updating the state with the fetched recipes. + recipes = json.decode(response.body); + }); + } else { + // Logging an error message if the request fails. + print("Failed to load recipes"); + } + } + + @override + Widget build(BuildContext context) { + // Building the UI for the HomePage widget. + return Scaffold( + appBar: AppBar( + title: const Text("Recipes"), + backgroundColor: Colors.green, + centerTitle: true, + foregroundColor: Colors.white, + ), + body: recipes.isEmpty + ? const Center( + child: + CircularProgressIndicator()) // Showing a loading indicator if recipes are not yet loaded. + : ListView.builder( + // Building a list view to display the recipes. + itemCount: recipes.length, // Number of items in the list. + itemBuilder: (context, index) { + final recipe = recipes[ + index]; // Accessing the recipe at the current index. + return ListTile( + leading: + Image.network(recipe['image'], width: 50, height: 50), + title: Text(recipe['title']), + onTap: () { + // Navigating to the RecipeDetailPage when a recipe is tapped. + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => RecipeDetailPage( + recipe: + recipe), // Passing the recipe to the detail page. + ), + ); + }, + ); + }, + ), + ); + } +} diff --git a/recipe_app/lib/RecipeDetailPage.dart b/recipe_app/lib/RecipeDetailPage.dart new file mode 100644 index 0000000..f36c4e9 --- /dev/null +++ b/recipe_app/lib/RecipeDetailPage.dart @@ -0,0 +1,53 @@ +import 'package:flutter/material.dart'; + +// A stateless widget to display recipe details +class RecipeDetailPage extends StatelessWidget { + // A map to hold the recipe details + final Map recipe; + + // Constructor to initialize the recipe map + const RecipeDetailPage({super.key, required this.recipe}); + + @override + Widget build(BuildContext context) { + return Scaffold( + // AppBar with title, background color, and styling + appBar: AppBar( + title: Text(recipe['title']), + backgroundColor: Colors.green, + centerTitle: true, + foregroundColor: Colors.white, + ), + body: Padding( + // Padding around the body content + padding: const EdgeInsets.all(16.0), + child: SingleChildScrollView( + // Scrollable content for the recipe details + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Display the recipe image + Image.network(recipe['image']), + const SizedBox(height: 10), // Spacing between elements + // Display the recipe title with styling + Text(recipe['title'], + style: const TextStyle(fontSize: 22, fontWeight: FontWeight.bold)), + const SizedBox(height: 10), // Spacing between elements + // Display the number of servings + Text("Servings: ${recipe['servings']}"), + const SizedBox(height: 10), // Spacing between elements + // Display the preparation time + Text("Ready in ${recipe['readyInMinutes']} minutes"), + // Display the source name of the recipe + Text("sourceName:${recipe['sourceName']}"), + // Display whether the recipe is dairy-free + Text("dairyFree:${recipe['dairyFree']}"), + // Display whether the recipe is cheap + Text("cheap:${recipe['cheap']}"), + ], + ), + ), + ), + ); + } +} diff --git a/recipe_app/lib/main.dart b/recipe_app/lib/main.dart index 0b96220..b140662 100644 --- a/recipe_app/lib/main.dart +++ b/recipe_app/lib/main.dart @@ -1,23 +1,24 @@ import 'package:flutter/material.dart'; -import 'package:recipe_app/presentation/recipe_page.dart'; + +import 'package:geeks_for_geeks/HomePage.dart'; void main() { - runApp(const HomePage()); + runApp(const MyApp()); } -class HomePage extends StatelessWidget { - const HomePage({super.key}); +class MyApp extends StatelessWidget { + const MyApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( - home: Scaffold( - appBar: AppBar( - centerTitle: true, - title: const Text("GFG Recipe App"), - ), - body: const RecipePage(), + debugShowCheckedModeBanner: false, + title: 'Recipe App', + theme: ThemeData( + primarySwatch: Colors.orange, ), + home: const HomePage(), ); } } + diff --git a/recipe_app/lib/models/recipe.api.dart b/recipe_app/lib/models/recipe.api.dart deleted file mode 100644 index 8ada75a..0000000 --- a/recipe_app/lib/models/recipe.api.dart +++ /dev/null @@ -1,25 +0,0 @@ -import 'dart:convert'; -import 'package:http/http.dart' as http; -import 'package:recipe_app/models/recipe.dart'; - -class RecipeApi { - static Future> getRecipe() async { - var uri = Uri.https('yummly2.p.rapidapi.com', '/feeds/list', - {"limit": "18", "start": "0", "tag": "list.recipe.popular"}); - - final response = await http.get(uri, headers: { - "x-rapidapi-key": "YOUR_API_KEY", - "x-rapidapi-host": "yummly2.p.rapidapi.com", - "useQueryString": "true" - }); - - Map data = jsonDecode(response.body); - List temp = []; - - for (var i in data['feed']) { - temp.add(i['content']['details']); - } - - return Recipe.recipesFromSnapshot(temp); - } -} diff --git a/recipe_app/lib/models/recipe.dart b/recipe_app/lib/models/recipe.dart deleted file mode 100644 index ce2fa29..0000000 --- a/recipe_app/lib/models/recipe.dart +++ /dev/null @@ -1,31 +0,0 @@ -class Recipe { - final String name; - final String images; - final double rating; - final String totalTime; - - factory Recipe.fromJson(dynamic json) { - return Recipe( - name: json['name'] as String, - images: json['images'][0]['hostedLargeUrl'] as String, - rating: json['rating'] as double, - totalTime: json['totalTime'] as String); - } - - Recipe( - {required this.name, - required this.images, - required this.rating, - required this.totalTime}); - - static List recipesFromSnapshot(List snapshot) { - return snapshot.map((data) { - return Recipe.fromJson(data); - }).toList(); - } - - @override - String toString() { - return 'Recipe {name: $name, image: $images, rating: $rating, totalTime: $totalTime}'; - } -} diff --git a/recipe_app/lib/presentation/recipe_page.dart b/recipe_app/lib/presentation/recipe_page.dart deleted file mode 100644 index ba66547..0000000 --- a/recipe_app/lib/presentation/recipe_page.dart +++ /dev/null @@ -1,41 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:recipe_app/models/recipe.api.dart'; -import 'package:recipe_app/models/recipe.dart'; -import 'package:recipe_app/presentation/widgets/recipe_card.dart'; - -class RecipePage extends StatefulWidget { - const RecipePage({super.key}); - - @override - State createState() => _RecipePageState(); -} - -class _RecipePageState extends State { - List _recipes = []; - bool _isLoading = true; - @override - void initState() { - super.initState(); - getRecipes(); - } - - Future getRecipes() async { - _recipes = await RecipeApi.getRecipe(); - setState(() { - _isLoading = false; - }); - } - - @override - Widget build(BuildContext context) { - return _isLoading - ? const Center(child: CircularProgressIndicator()) - : ListView.builder( - itemCount: _recipes.length, - itemBuilder: (context, index) { - return RecipeCard( - recipe: _recipes[index], - ); - }); - } -} diff --git a/recipe_app/lib/presentation/widgets/recipe_card.dart b/recipe_app/lib/presentation/widgets/recipe_card.dart deleted file mode 100644 index 51fcea0..0000000 --- a/recipe_app/lib/presentation/widgets/recipe_card.dart +++ /dev/null @@ -1,107 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:recipe_app/models/recipe.dart'; - -class RecipeCard extends StatelessWidget { - final Recipe recipe; - - const RecipeCard({super.key, required this.recipe}); - - @override - Widget build(BuildContext context) { - return Container( - margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 12), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(10), - boxShadow: [ - BoxShadow( - color: Colors.grey.withOpacity(0.3), - offset: const Offset(0, 6), - blurRadius: 8, - spreadRadius: 2, - ), - ], - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - ClipRRect( - borderRadius: const BorderRadius.only( - topLeft: Radius.circular(10), - topRight: Radius.circular(10), - ), - child: Image.network( - recipe.images, - height: 150, - fit: BoxFit.cover, - ), - ), - Padding( - padding: const EdgeInsets.all(12.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded( - child: Text( - recipe.name, - style: const TextStyle( - fontSize: 18, - fontWeight: FontWeight.bold, - color: Colors.black87, - ), - maxLines: 2, - overflow: TextOverflow.ellipsis, - ), - ), - const SizedBox(width: 8), - Container( - padding: const EdgeInsets.symmetric( - horizontal: 8, vertical: 4), - decoration: BoxDecoration( - color: Colors.orangeAccent.withOpacity(0.2), - borderRadius: BorderRadius.circular(12), - ), - child: Row( - children: [ - const Icon(Icons.star, - color: Colors.orange, size: 16), - const SizedBox(width: 4), - Text( - recipe.rating.toString(), - style: const TextStyle(color: Colors.orange), - ), - ], - ), - ), - ], - ), - const SizedBox(height: 10), - // Cook time at the bottom left - Row( - children: [ - const Icon( - Icons.schedule, - color: Colors.grey, - size: 18, - ), - const SizedBox(width: 5), - Text( - recipe.totalTime, - style: const TextStyle( - fontSize: 14, - color: Colors.black54, - ), - ), - ], - ), - ], - ), - ), - ], - ), - ); - } -} diff --git a/recipe_app/linux/CMakeLists.txt b/recipe_app/linux/CMakeLists.txt index f892a70..6c12d68 100644 --- a/recipe_app/linux/CMakeLists.txt +++ b/recipe_app/linux/CMakeLists.txt @@ -1,13 +1,13 @@ # Project-level configuration. -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.13) project(runner LANGUAGES CXX) # The name of the executable created for the application. Change this to change # the on-disk name of your application. -set(BINARY_NAME "recipe_app") +set(BINARY_NAME "geeks_for_geeks") # The unique GTK application identifier for this application. See: # https://wiki.gnome.org/HowDoI/ChooseApplicationID -set(APPLICATION_ID "com.example.recipe_app") +set(APPLICATION_ID "com.example.geeks_for_geeks") # Explicitly opt in to modern CMake behaviors to avoid warnings with recent # versions of CMake. @@ -54,25 +54,8 @@ add_subdirectory(${FLUTTER_MANAGED_DIR}) find_package(PkgConfig REQUIRED) pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) -add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") - -# Define the application target. To change its name, change BINARY_NAME above, -# not the value here, or `flutter run` will no longer work. -# -# Any new source files that you add to the application should be added here. -add_executable(${BINARY_NAME} - "main.cc" - "my_application.cc" - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" -) - -# Apply the standard set of build settings. This can be removed for applications -# that need different build settings. -apply_standard_settings(${BINARY_NAME}) - -# Add dependency libraries. Add any application-specific dependencies here. -target_link_libraries(${BINARY_NAME} PRIVATE flutter) -target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) +# Application build; see runner/CMakeLists.txt. +add_subdirectory("runner") # Run the Flutter tool portions of the build. This must not be removed. add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/recipe_app/linux/runner/CMakeLists.txt b/recipe_app/linux/runner/CMakeLists.txt new file mode 100644 index 0000000..e97dabc --- /dev/null +++ b/recipe_app/linux/runner/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.13) +project(runner LANGUAGES CXX) + +# Define the application target. To change its name, change BINARY_NAME in the +# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer +# work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} + "main.cc" + "my_application.cc" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add preprocessor definitions for the application ID. +add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") + +# Add dependency libraries. Add any application-specific dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter) +target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) + +target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") diff --git a/recipe_app/linux/main.cc b/recipe_app/linux/runner/main.cc similarity index 100% rename from recipe_app/linux/main.cc rename to recipe_app/linux/runner/main.cc diff --git a/recipe_app/linux/my_application.cc b/recipe_app/linux/runner/my_application.cc similarity index 90% rename from recipe_app/linux/my_application.cc rename to recipe_app/linux/runner/my_application.cc index aaf4fee..8c880c7 100644 --- a/recipe_app/linux/my_application.cc +++ b/recipe_app/linux/runner/my_application.cc @@ -40,11 +40,11 @@ static void my_application_activate(GApplication* application) { if (use_header_bar) { GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); gtk_widget_show(GTK_WIDGET(header_bar)); - gtk_header_bar_set_title(header_bar, "recipe_app"); + gtk_header_bar_set_title(header_bar, "geeks_for_geeks"); gtk_header_bar_set_show_close_button(header_bar, TRUE); gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); } else { - gtk_window_set_title(window, "recipe_app"); + gtk_window_set_title(window, "geeks_for_geeks"); } gtk_window_set_default_size(window, 1280, 720); @@ -117,6 +117,12 @@ static void my_application_class_init(MyApplicationClass* klass) { static void my_application_init(MyApplication* self) {} MyApplication* my_application_new() { + // Set the program name to the application ID, which helps various systems + // like GTK and desktop environments map this running application to its + // corresponding .desktop file. This ensures better integration by allowing + // the application to be recognized beyond its binary name. + g_set_prgname(APPLICATION_ID); + return MY_APPLICATION(g_object_new(my_application_get_type(), "application-id", APPLICATION_ID, "flags", G_APPLICATION_NON_UNIQUE, diff --git a/recipe_app/linux/my_application.h b/recipe_app/linux/runner/my_application.h similarity index 100% rename from recipe_app/linux/my_application.h rename to recipe_app/linux/runner/my_application.h diff --git a/recipe_app/macos/Runner.xcodeproj/project.pbxproj b/recipe_app/macos/Runner.xcodeproj/project.pbxproj index 77abc7a..c9286ed 100644 --- a/recipe_app/macos/Runner.xcodeproj/project.pbxproj +++ b/recipe_app/macos/Runner.xcodeproj/project.pbxproj @@ -64,7 +64,7 @@ 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; - 33CC10ED2044A3C60003C045 /* recipe_app.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "recipe_app.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10ED2044A3C60003C045 /* geeks_for_geeks.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "geeks_for_geeks.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; @@ -131,7 +131,7 @@ 33CC10EE2044A3C60003C045 /* Products */ = { isa = PBXGroup; children = ( - 33CC10ED2044A3C60003C045 /* recipe_app.app */, + 33CC10ED2044A3C60003C045 /* geeks_for_geeks.app */, 331C80D5294CF71000263BE5 /* RunnerTests.xctest */, ); name = Products; @@ -217,7 +217,7 @@ ); name = Runner; productName = Runner; - productReference = 33CC10ED2044A3C60003C045 /* recipe_app.app */; + productReference = 33CC10ED2044A3C60003C045 /* geeks_for_geeks.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -385,10 +385,10 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.example.recipeApp.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.example.geeksForGeeks.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/recipe_app.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/recipe_app"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/geeks_for_geeks.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/geeks_for_geeks"; }; name = Debug; }; @@ -399,10 +399,10 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.example.recipeApp.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.example.geeksForGeeks.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/recipe_app.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/recipe_app"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/geeks_for_geeks.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/geeks_for_geeks"; }; name = Release; }; @@ -413,10 +413,10 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.example.recipeApp.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.example.geeksForGeeks.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/recipe_app.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/recipe_app"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/geeks_for_geeks.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/geeks_for_geeks"; }; name = Profile; }; diff --git a/recipe_app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/recipe_app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index b52a5b8..4f7beeb 100644 --- a/recipe_app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/recipe_app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -15,7 +15,7 @@ @@ -31,7 +31,7 @@ @@ -65,7 +65,7 @@ @@ -82,7 +82,7 @@ diff --git a/recipe_app/macos/Runner/AppDelegate.swift b/recipe_app/macos/Runner/AppDelegate.swift index 8e02df2..b3c1761 100644 --- a/recipe_app/macos/Runner/AppDelegate.swift +++ b/recipe_app/macos/Runner/AppDelegate.swift @@ -6,4 +6,8 @@ class AppDelegate: FlutterAppDelegate { override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { return true } + + override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { + return true + } } diff --git a/recipe_app/macos/Runner/Configs/AppInfo.xcconfig b/recipe_app/macos/Runner/Configs/AppInfo.xcconfig index 8b5b5b6..e246e65 100644 --- a/recipe_app/macos/Runner/Configs/AppInfo.xcconfig +++ b/recipe_app/macos/Runner/Configs/AppInfo.xcconfig @@ -5,10 +5,10 @@ // 'flutter create' template. // The application's name. By default this is also the title of the Flutter window. -PRODUCT_NAME = recipe_app +PRODUCT_NAME = geeks_for_geeks // The application's bundle identifier -PRODUCT_BUNDLE_IDENTIFIER = com.example.recipeApp +PRODUCT_BUNDLE_IDENTIFIER = com.example.geeksForGeeks // The copyright displayed in application information -PRODUCT_COPYRIGHT = Copyright © 2024 com.example. All rights reserved. +PRODUCT_COPYRIGHT = Copyright © 2025 com.example. All rights reserved. diff --git a/recipe_app/pubspec.lock b/recipe_app/pubspec.lock index 1339bb4..e7903a6 100644 --- a/recipe_app/pubspec.lock +++ b/recipe_app/pubspec.lock @@ -37,18 +37,10 @@ packages: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf url: "https://pub.dev" source: hosted - version: "1.18.0" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 - url: "https://pub.dev" - source: hosted - version: "1.0.8" + version: "1.19.0" fake_async: dependency: transitive description: @@ -57,6 +49,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" + flip_card: + dependency: "direct main" + description: + name: flip_card + sha256: a2b3fca674a58d9def92bd8452187f49c4718456c0c2cf058488a64342fdb148 + url: "https://pub.dev" + source: hosted + version: "0.5.0" flutter: dependency: "direct main" description: flutter @@ -66,10 +66,10 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "5.0.0" flutter_test: dependency: "direct dev" description: flutter @@ -79,34 +79,34 @@ packages: dependency: "direct main" description: name: http - sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 + sha256: fe7ab022b76f3034adc518fb6ea04a82387620e19977665ea18d30a1cf43442f url: "https://pub.dev" source: hosted - version: "1.2.2" + version: "1.3.0" http_parser: dependency: transitive description: name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" url: "https://pub.dev" source: hosted - version: "4.0.2" + version: "4.1.2" leak_tracker: dependency: transitive description: name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" url: "https://pub.dev" source: hosted - version: "10.0.5" + version: "10.0.7" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.8" leak_tracker_testing: dependency: transitive description: @@ -119,10 +119,10 @@ packages: dependency: transitive description: name: lints - sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "5.1.1" matcher: dependency: transitive description: @@ -159,7 +159,7 @@ packages: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_span: dependency: transitive description: @@ -172,10 +172,10 @@ packages: dependency: transitive description: name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.12.0" stream_channel: dependency: transitive description: @@ -188,10 +188,10 @@ packages: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" term_glyph: dependency: transitive description: @@ -204,18 +204,18 @@ packages: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.3" typed_data: dependency: transitive description: name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.4.0" vector_math: dependency: transitive description: @@ -228,18 +228,18 @@ packages: dependency: transitive description: name: vm_service - sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc + sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b url: "https://pub.dev" source: hosted - version: "14.2.4" + version: "14.3.0" web: dependency: transitive description: name: web - sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062 + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.1.1" sdks: - dart: ">=3.5.0 <4.0.0" + dart: ">=3.6.0 <4.0.0" flutter: ">=3.18.0-18.0.pre.54" diff --git a/recipe_app/pubspec.yaml b/recipe_app/pubspec.yaml index b121f5d..f3d345b 100644 --- a/recipe_app/pubspec.yaml +++ b/recipe_app/pubspec.yaml @@ -1,4 +1,4 @@ -name: recipe_app +name: geeks_for_geeks description: "A new Flutter project." # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. @@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: ^3.5.0 + sdk: ^3.6.0 # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions @@ -30,12 +30,8 @@ environment: dependencies: flutter: sdk: flutter - - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.8 - http: ^1.2.2 + flip_card: ^0.5.0 + http: ^1.3.0 dev_dependencies: flutter_test: @@ -46,24 +42,15 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^4.0.0 + flutter_lints: ^5.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec # The following section is specific to Flutter packages. flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. uses-material-design: true - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/to/resolution-aware-images diff --git a/recipe_app/test/widget_test.dart b/recipe_app/test/widget_test.dart index 8cd0ea5..3faac0e 100644 --- a/recipe_app/test/widget_test.dart +++ b/recipe_app/test/widget_test.dart @@ -8,12 +8,12 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:recipe_app/main.dart'; +import 'package:geeks_for_geeks/main.dart'; void main() { testWidgets('Counter increments smoke test', (WidgetTester tester) async { // Build our app and trigger a frame. - await tester.pumpWidget(const MyApp()); + await tester.pumpWidget( MyApp()); // Verify that our counter starts at 0. expect(find.text('0'), findsOneWidget); diff --git a/recipe_app/web/index.html b/recipe_app/web/index.html index a5f5aaf..1827ae9 100644 --- a/recipe_app/web/index.html +++ b/recipe_app/web/index.html @@ -21,15 +21,15 @@ - + - + - recipe_app + geeks_for_geeks diff --git a/recipe_app/web/manifest.json b/recipe_app/web/manifest.json index eeb54b9..0b2f26b 100644 --- a/recipe_app/web/manifest.json +++ b/recipe_app/web/manifest.json @@ -1,6 +1,6 @@ { - "name": "recipe_app", - "short_name": "recipe_app", + "name": "geeks_for_geeks", + "short_name": "geeks_for_geeks", "start_url": ".", "display": "standalone", "background_color": "#0175C2", diff --git a/recipe_app/windows/CMakeLists.txt b/recipe_app/windows/CMakeLists.txt index 66886f1..3366733 100644 --- a/recipe_app/windows/CMakeLists.txt +++ b/recipe_app/windows/CMakeLists.txt @@ -1,10 +1,10 @@ # Project-level configuration. cmake_minimum_required(VERSION 3.14) -project(recipe_app LANGUAGES CXX) +project(geeks_for_geeks LANGUAGES CXX) # The name of the executable created for the application. Change this to change # the on-disk name of your application. -set(BINARY_NAME "recipe_app") +set(BINARY_NAME "geeks_for_geeks") # Explicitly opt in to modern CMake behaviors to avoid warnings with recent # versions of CMake. diff --git a/recipe_app/windows/runner/Runner.rc b/recipe_app/windows/runner/Runner.rc index aefd679..ec6d54d 100644 --- a/recipe_app/windows/runner/Runner.rc +++ b/recipe_app/windows/runner/Runner.rc @@ -90,12 +90,12 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "com.example" "\0" - VALUE "FileDescription", "recipe_app" "\0" + VALUE "FileDescription", "geeks_for_geeks" "\0" VALUE "FileVersion", VERSION_AS_STRING "\0" - VALUE "InternalName", "recipe_app" "\0" - VALUE "LegalCopyright", "Copyright (C) 2024 com.example. All rights reserved." "\0" - VALUE "OriginalFilename", "recipe_app.exe" "\0" - VALUE "ProductName", "recipe_app" "\0" + VALUE "InternalName", "geeks_for_geeks" "\0" + VALUE "LegalCopyright", "Copyright (C) 2025 com.example. All rights reserved." "\0" + VALUE "OriginalFilename", "geeks_for_geeks.exe" "\0" + VALUE "ProductName", "geeks_for_geeks" "\0" VALUE "ProductVersion", VERSION_AS_STRING "\0" END END diff --git a/recipe_app/windows/runner/main.cpp b/recipe_app/windows/runner/main.cpp index 9d6dc85..b2ce75a 100644 --- a/recipe_app/windows/runner/main.cpp +++ b/recipe_app/windows/runner/main.cpp @@ -27,7 +27,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, FlutterWindow window(project); Win32Window::Point origin(10, 10); Win32Window::Size size(1280, 720); - if (!window.Create(L"recipe_app", origin, size)) { + if (!window.Create(L"geeks_for_geeks", origin, size)) { return EXIT_FAILURE; } window.SetQuitOnClose(true);