Skip to content

Android and ios splash screen#12

Merged
abelarismendy merged 4 commits intomainfrom
android-ios-splash
Sep 15, 2024
Merged

Android and ios splash screen#12
abelarismendy merged 4 commits intomainfrom
android-ios-splash

Conversation

@abelarismendy
Copy link
Copy Markdown
Contributor

@abelarismendy abelarismendy commented Sep 15, 2024

Summary by CodeRabbit

  • New Features

    • The application has been rebranded from "flutter_app" to "eco_bites," reflecting a new focus on ecology and sustainability.
    • Enhanced splash screen with a logo image for improved branding.
    • New color resource for consistent UI design.
  • Bug Fixes

    • Removed deprecated entry point for the Android application to ensure proper functionality.
  • Documentation

    • Updated README to reflect the new project name and branding.
  • Chores

    • Integrated CocoaPods for better dependency management in iOS.
    • Updated asset management configuration to include the assets directory.

@abelarismendy abelarismendy added the enhancement New feature or request label Sep 15, 2024
@abelarismendy abelarismendy self-assigned this Sep 15, 2024
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Sep 15, 2024

Walkthrough

The primary change in this pull request is the rebranding of the Flutter application from flutter_app to eco_bites. This includes updates to various files such as the README, Android configuration files, iOS project files, and Flutter asset management. The splash screen has been redesigned to feature a logo instead of text, enhancing the visual identity of the application. Additionally, the project has integrated CocoaPods for iOS dependency management and updated several UI elements across both Android and iOS platforms.

Changes

File Path Change Summary
README.md Renamed project from flutter_app to eco_bites.
android/app/build.gradle Updated namespace and application ID from com.example.flutter_app to com.example.eco_bites.
android/app/src/main/AndroidManifest.xml Changed android:label from "flutter_app" to "eco_bites".
android/app/src/main/kotlin/com/example/eco_bites/MainActivity.kt Added new MainActivity class extending FlutterActivity.
android/app/src/main/kotlin/com/example/flutter_app/MainActivity.kt Removed old MainActivity class.
android/app/src/main/res/drawable-v21/launch_background.xml Updated splash screen background color and logo image.
android/app/src/main/res/drawable/launch_background.xml Modified background color and logo drawable for splash screen.
android/app/src/main/res/values/colors.xml Added new color resource bgColor with value #F5EDDF.
android/build.gradle Introduced Kotlin version variable ext.kotlin_version = '1.8.0'.
ios/Runner.xcodeproj/project.pbxproj Integrated CocoaPods dependencies and added related configuration files.
ios/Runner.xcworkspace/contents.xcworkspacedata Added reference to Pods.xcodeproj for CocoaPods integration.
ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json Reordered properties for consistency in image asset JSON.
ios/Runner/Base.lproj/LaunchScreen.storyboard Updated layout properties, background color, and modal transition style.
ios/Runner/Base.lproj/Main.storyboard Altered view dimensions and updated background color specifications.
ios/Runner/Info.plist Changed CFBundleName from "flutter_app" to "eco_bites".
lib/features/splash/presentation/screens/splash_screen.dart Replaced text widget with logo image in the splash screen.
pubspec.yaml Activated asset management for the assets/ directory.

Possibly related PRs

🐰 In the meadow, bright and wide,
Eco Bites now takes its stride.
With a logo bold, and colors so sweet,
A splash of joy, a brand complete!
Hopping forth with cheer and glee,
A greener world for you and me! 🌱


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    -- I pushed a fix in commit <commit_id>, please review it.
    -- Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    -- @coderabbitai generate unit testing code for this file.
    -- @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    -- @coderabbitai generate interesting stats about this repository and render them as a table.
    -- @coderabbitai read src/utils.ts and generate unit testing code.
    -- @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    -- @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@abelarismendy abelarismendy linked an issue Sep 15, 2024 that may be closed by this pull request
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Outside diff range comments (1)
README.md (1)

Line range hint 1-17: Enhance the README with project-specific details.

While the generic Flutter documentation in the README is helpful, consider adding more details specific to the eco_bites project, such as:

  • Project description and objectives
  • Key features and functionality
  • Installation and setup instructions
  • Usage examples or demo
  • Contributing guidelines
  • License information

A well-structured README helps new contributors and users quickly grasp the project's purpose and usage.

Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

Commits

Files that changed from the base of the PR and between 706ebb9 and a859a7d.

Files ignored due to path filters (8)
  • android/app/src/main/res/drawable-mdpi/logo.png is excluded by !**/*.png
  • android/app/src/main/res/drawable-xhdpi/logo.png is excluded by !**/*.png
  • android/app/src/main/res/drawable-xxhdpi/logo.png is excluded by !**/*.png
  • assets/logo.png is excluded by !**/*.png
  • ios/Podfile.lock is excluded by !**/*.lock
  • ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png is excluded by !**/*.png
  • ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png is excluded by !**/*.png
  • ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png is excluded by !**/*.png
Files selected for processing (17)
  • README.md (1 hunks)
  • android/app/build.gradle (2 hunks)
  • android/app/src/main/AndroidManifest.xml (1 hunks)
  • android/app/src/main/kotlin/com/example/eco_bites/MainActivity.kt (1 hunks)
  • android/app/src/main/kotlin/com/example/flutter_app/MainActivity.kt (0 hunks)
  • android/app/src/main/res/drawable-v21/launch_background.xml (1 hunks)
  • android/app/src/main/res/drawable/launch_background.xml (1 hunks)
  • android/app/src/main/res/values/colors.xml (1 hunks)
  • android/build.gradle (1 hunks)
  • ios/Runner.xcodeproj/project.pbxproj (12 hunks)
  • ios/Runner.xcworkspace/contents.xcworkspacedata (1 hunks)
  • ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json (1 hunks)
  • ios/Runner/Base.lproj/LaunchScreen.storyboard (2 hunks)
  • ios/Runner/Base.lproj/Main.storyboard (2 hunks)
  • ios/Runner/Info.plist (1 hunks)
  • lib/features/splash/presentation/screens/splash_screen.dart (1 hunks)
  • pubspec.yaml (1 hunks)
Files not reviewed due to no reviewable changes (1)
  • android/app/src/main/kotlin/com/example/flutter_app/MainActivity.kt
Additional comments not posted (39)
ios/Runner.xcworkspace/contents.xcworkspacedata (1)

7-9: LGTM!

The addition of the <FileRef> entry for Pods/Pods.xcodeproj is correct and expected when integrating CocoaPods dependencies into the Xcode workspace. This change enhances the project's modularity and dependency management capabilities.

android/build.gradle (1)

1-3: LGTM!

The addition of the buildscript block with the Kotlin version variable is a valid and beneficial change. It explicitly defines the Kotlin version as 1.8.0, which is a stable release compatible with the current Android ecosystem.

Explicitly specifying the Kotlin version ensures consistency across the project and helps manage dependencies effectively. This change enhances the build configuration without introducing any apparent issues or side effects.

ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json (1)

Line range hint 1-24: LGTM!

The changes to the Contents.json file are purely structural and do not introduce any functional issues. The reordering of properties and reformatting of the "info" section enhance readability without altering the intended use of the launch images.

README.md (1)

1-1: LGTM!

The project name change from flutter_app to eco_bites is clear and straightforward.

android/app/src/main/res/drawable-v21/launch_background.xml (1)

3-16: LGTM!

The changes to the launch splash screen are well-implemented and enhance the visual presentation during app launch. Specifically:

  • The custom background color @color/bgColor improves branding.
  • The logo image @drawable/logo is correctly configured to fill the screen, be centered, and scale appropriately.
  • The android:tileMode attribute is set to disabled, preventing image repetition.

These modifications contribute to a better user experience and stronger brand identity.

android/app/src/main/res/drawable/launch_background.xml (2)

5-8: LGTM!

The layout parameters for the bitmap item are set correctly to ensure that it fills the available space.


3-3: Verify the color resource definition.

Using a color resource instead of a hardcoded value is a good practice for maintainability and customization.

Ensure that the color resource @color/bgColor is defined in the colors.xml file. You can use the following script to verify:

Verification successful

Color resource @color/bgColor verified successfully.

The bgColor resource is correctly defined in the colors.xml file located at android/app/src/main/res/values/colors.xml. The color value is set to #F5EDDF, which is a light beige color suitable for a background.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the color resource `@color/bgColor` is defined.

# Test: Search for the color resource definition. Expect: A match in `colors.xml`.
rg --type xml $'bgColor' app/src/main/res/values/colors.xml

Length of output: 133


Script:

#!/bin/bash
# Description: Locate the colors.xml file and verify the bgColor resource definition

# Find the correct path for the values directory
echo "Searching for the values directory:"
fd -t d values android/app/src/main/res

# Search for the colors.xml file
echo -e "\nSearching for colors.xml file:"
fd colors.xml android/app/src/main/res

# If colors.xml is not found, search for bgColor in all XML files within the res directory
echo -e "\nSearching for bgColor definition in XML files:"
rg --type xml 'name="bgColor"' android/app/src/main/res

Length of output: 607

android/app/src/main/kotlin/com/example/eco_bites/MainActivity.kt (2)

8-8: LGTM!

Extending FlutterActivity is the correct approach for integrating Flutter into an Android app.


9-18: LGTM!

The onCreate method implementation is well-structured and follows best practices:

  • Calling WindowCompat.setDecorFitsSystemWindows(window, false) provides a more immersive experience by allowing the app's layout to extend into the system windows.
  • The conditional check for Android 12 or higher ensures compatibility with modern Android features.
  • Setting a listener for the splash screen's exit animation enhances the user experience by ensuring a smooth transition from the splash screen to the main content of the app.
android/app/build.gradle (2)

9-9: LGTM!

The namespace change from "com.example.flutter_app" to "com.example.eco_bites" is consistent with the PR objective of updating the splash screen, which often involves rebranding. This change is necessary for distinguishing the app from others in the Android ecosystem and does not alter any functional logic or control flow within the application.


24-24: LGTM!

The application ID change from "com.example.flutter_app" to "com.example.eco_bites" is consistent with the PR objective of updating the splash screen, which often involves rebranding. This change is necessary for distinguishing the app from others in the Android ecosystem and does not alter any functional logic or control flow within the application.

ios/Runner/Info.plist (1)

16-16: LGTM!

The change to the CFBundleName key, updating the app name from flutter_app to eco_bites, is consistent with the PR objective of updating the splash screen and rebranding the app. This change does not introduce any functional issues and is localized to the iOS configuration file.

ios/Runner/Base.lproj/Main.storyboard (4)

1-2: LGTM!

The updated toolsVersion and the new colorMatched attribute ensure compatibility with newer Xcode versions and enable enhanced color management features. These changes keep the storyboard up-to-date with the latest tools and features.


6-7: LGTM!

The updated plugIn version and the new capability for documents saved in the Xcode 8 format ensure compatibility with newer Xcode versions and maintain support for different storyboard formats. These changes are beneficial for the storyboard's compatibility and flexibility.


19-19: LGTM!

The updated frame dimensions (393x852) are consistent with the iPhone 12 Pro's portrait orientation. Adjusting the main view's frame is necessary to ensure proper layout on the target device.


21-21: LGTM!

The updated background color specification now uses the sRGB color space, which is a standardized color space that ensures consistent color representation across devices. Using sRGB is a good practice for maintaining color accuracy and consistency in the app.

android/app/src/main/AndroidManifest.xml (1)

3-3: LGTM! The application name has been updated.

The android:label attribute in the <application> tag has been changed from "flutter_app" to "eco_bites". This change will update the user-visible name for the application, such as in the app drawer or on the home screen.

Please ensure that:

  1. The new name aligns with the overall branding strategy.
  2. The name is consistent across all platforms (e.g., iOS, web).
  3. The change is communicated to relevant stakeholders, such as marketing and design teams.
ios/Runner/Base.lproj/LaunchScreen.storyboard (6)

1-1: LGTM!

Removing the standalone attribute from the XML declaration is a valid change and does not affect the functionality of the XML document.


2-2: LGTM!

Updating the toolsVersion attribute to a newer version ensures compatibility with the latest Xcode features and fixes.


6-6: LGTM!

Updating the version attribute of the plugIn element to a newer version ensures compatibility with the latest CocoaTouch features and fixes.


13-13: LGTM!

Adding the modalTransitionStyle attribute with a value of crossDissolve enhances the visual transition effect when presenting the view controller modally.


19-19: LGTM!

Explicitly defining the dimensions of the view in the frame element improves layout consistency across different devices.


23-23: LGTM!

The changes made to the image view dimensions, background color, tint color, canvas location, and image dimensions contribute to enhancing the visual appearance and layout of the launch screen.

  • Updating the rect element for the image view reflects a change in the image's aspect ratio or resolution, which may enhance visual quality on larger screens.
  • Changing the backgroundColor to a light beige color and introducing a new tintColor with specific RGB values may contribute to a softer visual appearance and affect the overall theme and aesthetics of the app.
  • Adjusting the canvasLocation coordinates indicates a potential reorganization of the storyboard layout within the design interface.
  • Adding the tintColor element at the document level ensures consistent tint color across the entire storyboard.
  • Updating the image element dimensions aligns with the changes made to the image view.

Also applies to: 26-27, 36-36, 39-39, 41-41

pubspec.yaml (1)

59-60: LGTM! The changes improve asset management in the application.

The addition of the assets section under the flutter configuration is a positive change that enhances the application's capability to utilize external resources effectively. By specifying the assets/ directory, the application can now include all assets located within that directory, allowing for seamless integration of images and other resources.

The removal of the commented-out lines for specific image assets streamlines the configuration and indicates a shift towards a more organized asset management approach. This improves the overall maintainability and readability of the codebase.

To further optimize asset management, consider the following best practices:

  1. Organize assets into subdirectories based on their type or purpose (e.g., assets/images/, assets/icons/, assets/fonts/). This helps keep the assets structured and easily accessible.

  2. Use descriptive and meaningful names for asset files to improve clarity and discoverability.

  3. Optimize asset sizes and formats to reduce application size and improve loading performance. Consider using compressed formats like WebP for images and minimize unnecessary metadata.

  4. Regularly review and remove unused assets to keep the codebase clean and minimize bloat.

By following these best practices, you can ensure efficient asset management and maintain a well-organized codebase.

ios/Runner.xcodeproj/project.pbxproj (15)

11-11: LGTM!

The addition of the Pods_RunnerTests.framework build file reference is necessary to link the framework during the build process when using CocoaPods for dependency management.


18-18: LGTM!

The addition of the Pods_Runner.framework build file reference is necessary to link the framework during the build process when using CocoaPods for dependency management.


45-45: LGTM!

The addition of the Pods-Runner.profile.xcconfig file reference is necessary to specify build settings and configuration options for the CocoaPods "Profile" configuration.


48-48: LGTM!

The addition of the Pods-Runner.release.xcconfig file reference is necessary to specify build settings and configuration options for the CocoaPods "Release" configuration.


54-54: LGTM!

The addition of the Pods-Runner.debug.xcconfig file reference is necessary to specify build settings and configuration options for the CocoaPods "Debug" configuration.


63-63: LGTM!

The addition of the Pods-RunnerTests.debug.xcconfig file reference is necessary to specify build settings and configuration options for the "RunnerTests" target in the CocoaPods "Debug" configuration.


64-64: LGTM!

The addition of the Pods-RunnerTests.release.xcconfig file reference is necessary to specify build settings and configuration options for the "RunnerTests" target in the CocoaPods "Release" configuration.


65-67: LGTM!

The addition of the Pods_Runner.framework and Pods_RunnerTests.framework file references is necessary to integrate these frameworks, which are likely dependencies managed by CocoaPods, into the project.


66-66: LGTM!

The addition of the Pods-RunnerTests.profile.xcconfig file reference is necessary to specify build settings and configuration options for the "RunnerTests" target in the CocoaPods "Profile" configuration.


71-78: LGTM!

The addition of the new PBXFrameworksBuildPhase section for the "RunnerTests" target and the inclusion of the Pods_RunnerTests.framework in the "Frameworks" phase are necessary to ensure that the framework is properly linked during the build process.


83-83: LGTM!

Including the Pods_Runner.framework in the "Frameworks" phase of the "Runner" target is necessary to ensure that the framework is properly linked during the build process and to integrate the dependencies managed by CocoaPods.


90-103: LGTM!

The addition of the new "Pods" group and the inclusion of the CocoaPods configuration files for both the "Runner" and "RunnerTests" targets help organize the project structure and ensure that the appropriate build settings and options are applied when using CocoaPods.


112-120: LGTM!

The addition of the new "Frameworks" group and the inclusion of the Pods_Runner.framework and Pods_RunnerTests.framework help organize the project structure and provide a clear location for the frameworks managed by CocoaPods.


139-140: LGTM!

Adding the "Pods" and "Frameworks" groups to the main project group improves the organization and accessibility of the CocoaPods-related files and frameworks within the Xcode project.


175-175: LGTM!

The addition of the "[CP] Check Pods Manifest.lock" build phase script for the "RunnerTests" target helps ensure that the CocoaPods dependencies are properly resolved and maintains consistency between the project and the CocoaPods configuration.

Comment thread android/app/src/main/res/values/colors.xml
Comment thread android/app/src/main/res/drawable/launch_background.xml
Comment thread lib/features/splash/presentation/screens/splash_screen.dart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Splash Screen

2 participants