Skip to content

Commit

Permalink
style: 🎨 add logo, update favicon, and update meta-data
Browse files Browse the repository at this point in the history
  • Loading branch information
moazelsawaf committed Mar 27, 2023
1 parent 38d4f73 commit 1fb4508
Show file tree
Hide file tree
Showing 23 changed files with 175 additions and 43 deletions.
22 changes: 22 additions & 0 deletions assets/svgs/app_logo/app_logo_colored.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions assets/svgs/app_logo/app_logo_white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Made with Flutter',
title: 'Made with Flutter?',
theme: ThemeData(
useMaterial3: true,
primaryColor: ColorsPalette.primaryColor,
Expand Down
29 changes: 24 additions & 5 deletions lib/ui/widgets/app_logo.dart
Original file line number Diff line number Diff line change
@@ -1,15 +1,34 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:made_with_flutter/utils/assets_manager.dart';

enum AppLogoType { colored, white }

class AppLogo extends StatelessWidget {
final AppLogoType type;
final double size;
const AppLogo({super.key, this.size = 50});

const AppLogo({
super.key,
this.type = AppLogoType.colored,
this.size = 50,
});

@override
Widget build(BuildContext context) {
// TODO: Replace with your own logo
return ColorFiltered(
colorFilter: const ColorFilter.mode(Colors.white, BlendMode.srcIn),
child: FlutterLogo(size: size),
return SvgPicture.asset(
_logo,
width: size,
height: size,
);
}

String get _logo {
switch (type) {
case AppLogoType.colored:
return AssetsManager.appLogoColored;
case AppLogoType.white:
return AssetsManager.appLogoWhite;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ class ScaffoldDesktopHeader extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(16),
padding: const EdgeInsets.all(24),
child: Row(
children: [
const AppLogo(),
const AppLogo(
type: AppLogoType.white,
),
const Spacer(),
HeaderButtonsBar(
buttons: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,24 @@ class MobileDrawer extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Drawer(
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topRight: Radius.circular(10),
bottomRight: Radius.circular(10),
),
),
backgroundColor: ColorsPalette.white,
surfaceTintColor: Colors.transparent,
child: SafeArea(
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 32),
padding: const EdgeInsets.only(
top: 64,
bottom: 24,
),
child: Column(
children: [
const AppLogo(size: 50),
const SizedBox(height: 32),
const AppLogo(size: 125),
const SizedBox(height: 48),
MobileDrawerItem(
label: 'About',
onTap: () {},
Expand Down
10 changes: 9 additions & 1 deletion lib/utils/assets_manager.dart
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
class AssetsManager {
AssetsManager._();

// Folders
// Main Folders
static const _assetsFolder = 'assets';
static const _imagesFolder = '$_assetsFolder/images';
static const _svgsFolder = 'svgs';
static const _lottieFolder = '$_assetsFolder/lottie';

// Sub Folders
static const _appLogoFolder = '$_svgsFolder/app_logo';

// Images
static const desktopBackground = '$_imagesFolder/desktop_background.jpg';

// SVGs
static const appLogoColored = '$_appLogoFolder/app_logo_colored.svg';
static const appLogoWhite = '$_appLogoFolder/app_logo_white.svg';

// Lottie
static const filesProcessing = '$_lottieFolder/files_processing.json';
}
2 changes: 1 addition & 1 deletion lib/utils/colors_palette.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ColorsPalette {

// Main Colors
static const primaryColor = Color(_primaryColorValue);
static const secondaryColor = Color(0xFF42A5F6);
static const secondaryColor = Color(0xFFFCB732);

// Whites and Blacks
static const white = Color(0xFFFFFFFF);
Expand Down
58 changes: 57 additions & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.3.6"
args:
dependency: transitive
description:
name: args
sha256: "4cab82a83ffef80b262ddedf47a0a8e56ee6fbf7fe21e6e768b02792034dd440"
url: "https://pub.dev"
source: hosted
version: "2.4.0"
async:
dependency: transitive
description:
Expand Down Expand Up @@ -158,6 +166,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.1"
flutter_svg:
dependency: "direct main"
description:
name: flutter_svg
sha256: "12006889e2987c549c4c1ec1a5ba4ec4b24d34d2469ee5f9476c926dcecff266"
url: "https://pub.dev"
source: hosted
version: "2.0.4"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down Expand Up @@ -248,6 +264,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.1"
petitparser:
dependency: transitive
description:
name: petitparser
sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4"
url: "https://pub.dev"
source: hosted
version: "5.1.0"
plugin_platform_interface:
dependency: transitive
description:
Expand Down Expand Up @@ -405,6 +429,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.0.5"
vector_graphics:
dependency: transitive
description:
name: vector_graphics
sha256: "4cf8e60dbe4d3a693d37dff11255a172594c0793da542183cbfe7fe978ae4aaa"
url: "https://pub.dev"
source: hosted
version: "1.1.4"
vector_graphics_codec:
dependency: transitive
description:
name: vector_graphics_codec
sha256: "278ad5f816f58b1967396d1f78ced470e3e58c9fe4b27010102c0a595c764468"
url: "https://pub.dev"
source: hosted
version: "1.1.4"
vector_graphics_compiler:
dependency: transitive
description:
name: vector_graphics_compiler
sha256: "0bf61ad56e6fd6688a2865d3ceaea396bc6a0a90ea0d7ad5049b1b76c09d6163"
url: "https://pub.dev"
source: hosted
version: "1.1.4"
vector_math:
dependency: transitive
description:
Expand All @@ -413,6 +461,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
xml:
dependency: transitive
description:
name: xml
sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5"
url: "https://pub.dev"
source: hosted
version: "6.2.2"
sdks:
dart: ">=2.19.3 <3.0.0"
flutter: ">=3.3.0"
flutter: ">=3.7.0-0"
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: made_with_flutter
description: Made with Flutter is a tool that lets you know if an APK/APP was made with Flutter or not.
description: Made with Flutter is an open source tool that lets you know if an APK/APP was made with Flutter or not.

publish_to: "none"

Expand All @@ -22,6 +22,7 @@ dependencies:
flutter_dropzone: ^3.0.5
archive: ^3.3.6
elegant_notification: ^1.8.1
flutter_svg: ^2.0.4

dev_dependencies:
flutter_test:
Expand Down
Binary file added web/favicon.ico
Binary file not shown.
Binary file removed web/favicon.png
Binary file not shown.
Binary file removed web/icons/Icon-192.png
Binary file not shown.
Binary file removed web/icons/Icon-512.png
Binary file not shown.
Binary file removed web/icons/Icon-maskable-192.png
Binary file not shown.
Binary file removed web/icons/Icon-maskable-512.png
Binary file not shown.
Binary file added web/icons/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/icons/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/icons/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/icons/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/icons/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 11 additions & 8 deletions web/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!DOCTYPE html>
<html>

<head>
<!--
If you are serving your web app in a path other than the root, change the
Expand All @@ -23,13 +24,13 @@
<!-- iOS meta tags & icons -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="made_with_flutter">
<link rel="apple-touch-icon" href="icons/Icon-192.png">
<meta name="apple-mobile-web-app-title" content="Made with Flutter?">
<link rel="apple-touch-icon" href="icons/apple-touch-icon.png">

<!-- Favicon -->
<link rel="icon" type="image/png" href="favicon.png"/>
<link rel="icon" type="image/ico" href="favicon.ico" />

<title>made_with_flutter</title>
<title>Made with Flutter?</title>
<link rel="manifest" href="manifest.json">

<script>
Expand All @@ -39,21 +40,23 @@
<!-- This script adds the flutter initialization JS code -->
<script src="flutter.js" defer></script>
</head>

<body>
<script>
window.addEventListener('load', function(ev) {
window.addEventListener('load', function (ev) {
// Download main.dart.js
_flutter.loader.loadEntrypoint({
serviceWorker: {
serviceWorkerVersion: serviceWorkerVersion,
},
onEntrypointLoaded: function(engineInitializer) {
engineInitializer.initializeEngine().then(function(appRunner) {
onEntrypointLoaded: function (engineInitializer) {
engineInitializer.initializeEngine().then(function (appRunner) {
appRunner.runApp();
});
}
});
});
</script>
</body>
</html>

</html>
28 changes: 8 additions & 20 deletions web/manifest.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,23 @@
{
"name": "made_with_flutter",
"short_name": "made_with_flutter",
"name": "Made with Flutter?",
"short_name": "Made with Flutter?",
"start_url": ".",
"display": "standalone",
"background_color": "#0175C2",
"theme_color": "#0175C2",
"description": "A new Flutter project.",
"background_color": "#0E47A1",
"theme_color": "#0E47A1",
"description": "Made with Flutter is an open source tool that lets you know if an APK/APP was made with Flutter or not.",
"orientation": "portrait-primary",
"prefer_related_applications": false,
"icons": [
{
"src": "icons/Icon-192.png",
"src": "icons/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "icons/Icon-512.png",
"src": "icons/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
},
{
"src": "icons/Icon-maskable-192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "icons/Icon-maskable-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
]
}
}

0 comments on commit 1fb4508

Please sign in to comment.