8000 GitHub - Hifza-Khalid/Google-logo-flutter: A Flutter project that 🎨 accurately replicates the Google "G" logo using CustomPainter, providing ✨ flexibility in size, 🎨 colors, and 🌈 gradients.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

A Flutter project that 🎨 accurately replicates the Google "G" logo using CustomPainter, providing ✨ flexibility in size, 🎨 colors, and 🌈 gradients.

License

Notifications You must be signed in to change notification settings

Hifza-Khalid/Google-logo-flutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Google Logo Flutter πŸŽ¨πŸ“±

Problem Statement πŸš€

I was designing the UI for my mobile application, where I needed to use the Google "G" logo. However, the default icons provided by Flutter did not include an exact match. The closest option looked more like a search icon. After exploring the Flutter Icons API, I confirmed that there was no official Google/Gmail logo available.

Initial Attempt ❌

I found an alternative solution by using the font_awesome_flutter package:

import 'package:font_awesome_flutter/font_awesome_flutter.dart';

Column(
  mainAxisAlignment: MainAxisAlignment.center,
  children: [
    // Google Icon
    FaIcon(
      FontAwesomeIcons.google,
      size: 60,
      color: Colors.red,
    ),
    SizedBox(height: 40),
    // Gmail Icon
    FaIcon(
      FontAwesomeIcons.envelope,
      size: 60,
      color: Colors.red,
    ),
  ],
)

Output Image πŸ“Έ

Google Icon Output

However, I was not satisfied because:

  1. The icon lacked the original gradient shades of the Google logo.
  2. It didn't perfectly match Google's branding.

Final Solution βœ…

To get the exact Google "G" logo, I implemented it using CustomPainter in Flutter. This approach allowed me to accurately replicate the logo's shape, colors, and gradients.

Implementation 🧐

I used CustomPainter to draw the Google "G" logo with precise color shading and arc rendering. Check out the code in this repository for the full implementation!

Features 🎨

  • Draws the Google "G" logo accurately.
  • Uses CustomPainter for custom drawing.
  • Provides flexibility to adjust size and colors.
  • Does not rely on external icon libraries.

How to Run πŸƒβ€β™‚οΈ

  1. Clone the repository:
    git clone https://github.com/Hifza-Khalid/google-logo-flutter.git
  2. Open the project in your preferred Flutter development environment.
  3. Run the app:
    flutter run

Final Output Image πŸ“Έ

Final Google Logo Output


Author ✨

  • Developed & modified by Hifza πŸŒŸπŸ–ŒοΈ

Gist Google logo in Flutter 🎨

Google Logo gist

License πŸ“š

This project is open-source and available under the MIT License.

About

A Flutter project that 🎨 accurately replicates the Google "G" logo using CustomPainter, providing ✨ flexibility in size, 🎨 colors, and 🌈 gradients.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0