Skip to content

Commit

Permalink
Merge pull request #3 from moazelsawaf/develop
Browse files Browse the repository at this point in the history
🔖 release version 1.0.3+4
  • Loading branch information
moazelsawaf authored Mar 27, 2023
2 parents 286c810 + 8365cf8 commit 3d8a196
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 26 deletions.
19 changes: 6 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
# made_with_flutter
# Made with Flutter?

A new Flutter project.
Made with Flutter is an open source tool that lets you know if an APK/APP was made with Flutter or not.

## Getting Started
## Screenshot

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)

For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
<p align="center">
<img src="https://raw.githubusercontent.com/moazelsawaf/made_with_flutter/main/docs/assets/screenshot_01.png" alt="Made with Flutter?" />
</p>
Binary file added docs/assets/screenshot_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:made_with_flutter/utils/helpers.dart';

import '../../../../../utils/constants.dart';
import '../../../app_logo.dart';
import 'header_buttons_bar/header_buttons_bar.dart';

Expand Down Expand Up @@ -31,7 +32,9 @@ class ScaffoldDesktopHeader extends StatelessWidget {
),
HeaderButtonData(
label: 'Repository',
onPressed: () => Helpers.showComingSoonToast(context),
onPressed: () => Helpers.openUrl(
Constants.gitHubRepositoryUrl,
),
),
],
),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:made_with_flutter/utils/colors_palette.dart';

import '../../../../../utils/constants.dart';
import '../../../../../utils/helpers.dart';
import '../../../app_logo.dart';
import 'mobile_drawer_item.dart';
Expand Down Expand Up @@ -41,7 +42,9 @@ class MobileDrawer extends StatelessWidget {
),
MobileDrawerItem(
label: 'Repository',
onTap: () => Helpers.showComingSoonToast(context),
onTap: () => Helpers.openUrl(
Constants.gitHubRepositoryUrl,
),
),
],
),
Expand Down
14 changes: 4 additions & 10 deletions lib/ui/widgets/credits.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';

import '../../utils/colors_palette.dart';
import '../../utils/constants.dart';
import '../../utils/helpers.dart';

class Credits extends StatelessWidget {
final Color color;
Expand Down Expand Up @@ -33,7 +33,7 @@ class Credits extends StatelessWidget {
decorationColor: linkColor,
),
recognizer: TapGestureRecognizer()
..onTap = () => _openUrl(Constants.flutterWebsiteUrl),
..onTap = () => Helpers.openUrl(Constants.flutterWebsiteUrl),
),
const TextSpan(text: ' & 💙 by '),
TextSpan(
Expand All @@ -44,7 +44,7 @@ class Credits extends StatelessWidget {
decorationColor: linkColor,
),
recognizer: TapGestureRecognizer()
..onTap = () => _openUrl(Constants.authorGitHubUrl),
..onTap = () => Helpers.openUrl(Constants.authorGitHubUrl),
),
],
style: TextStyle(
Expand All @@ -56,7 +56,7 @@ class Credits extends StatelessWidget {
),
const SizedBox(height: 6),
Text(
'V 1.0.2 - Copyright © 2023 All Rights Reserved',
'V 1.0.3 - Copyright © 2023 All Rights Reserved',
style: TextStyle(
color: color,
fontSize: 12,
Expand All @@ -66,10 +66,4 @@ class Credits extends StatelessWidget {
],
);
}

void _openUrl(String url) async {
try {
await launchUrl(Uri.parse(url));
} catch (_) {}
}
}
2 changes: 2 additions & 0 deletions lib/utils/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ class Constants {
// Links
static const flutterWebsiteUrl = 'https://flutter.dev';
static const authorGitHubUrl = 'https://github.com/moazelsawaf';
static const gitHubRepositoryUrl =
'https://github.com/moazelsawaf/made_with_flutter';
}
7 changes: 7 additions & 0 deletions lib/utils/helpers.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:archive/archive.dart';
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';

import 'toasts.dart';

Expand Down Expand Up @@ -32,6 +33,12 @@ class Helpers {
return fileName.substring(0, extensionStartIndex);
}

static void openUrl(String url) async {
try {
await launchUrl(Uri.parse(url));
} catch (_) {}
}

static void showComingSoonToast(BuildContext context) {
Toasts.info(
context: context,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Made with Flutter is an open source tool that lets you know if an A

publish_to: "none"

version: 1.0.2+3
version: 1.0.3+4

environment:
sdk: ">=2.19.3 <3.0.0"
Expand Down

0 comments on commit 3d8a196

Please sign in to comment.