Skip to content

Commit 1ff2ea8

Browse files
committed
info added
1 parent 63ffe96 commit 1ff2ea8

File tree

3 files changed

+64
-1
lines changed

3 files changed

+64
-1
lines changed

lib/components/header.dart

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import 'package:calc/components/buttons/icon.dart';
22
import 'package:calc/services/theme.dart';
33
import 'package:flutter/material.dart';
44
import 'package:provider/provider.dart';
5+
import 'package:url_launcher/url_launcher.dart';
56

67
class Header extends StatefulWidget {
78
@override
@@ -27,6 +28,13 @@ class _HeaderState extends State<Header> {
2728

2829
List<Widget> children(ThemeProvider theme) {
2930
List<Widget> widgets = [
31+
ButtonIcon(
32+
icon: Icons.info_outline,
33+
size: 46,
34+
onPress: () => this.openMyGitHub(),
35+
brightness: theme.data().brightness,
36+
),
37+
Spacer(),
3038
ButtonIcon(
3139
icon: Icons.swap_horiz,
3240
size: 46,
@@ -53,4 +61,9 @@ class _HeaderState extends State<Header> {
5361
} else
5462
themeProvider.setThemeByName('dark');
5563
}
64+
65+
void openMyGitHub() async {
66+
String url = 'https://github.com/jaypy-code/flutter-calculator';
67+
if (await canLaunch(url)) await launch(url);
68+
}
5669
}

pubspec.lock

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ packages:
9393
url: "https://pub.dartlang.org"
9494
source: hosted
9595
version: "1.8.0-nullsafety.1"
96+
plugin_platform_interface:
97+
dependency: transitive
98+
description:
99+
name: plugin_platform_interface
100+
url: "https://pub.dartlang.org"
101+
source: hosted
102+
version: "1.0.3"
96103
provider:
97104
dependency: "direct main"
98105
description:
@@ -154,6 +161,48 @@ packages:
154161
url: "https://pub.dartlang.org"
155162
source: hosted
156163
version: "1.3.0-nullsafety.3"
164+
url_launcher:
165+
dependency: "direct main"
166+
description:
167+
name: url_launcher
168+
url: "https://pub.dartlang.org"
169+
source: hosted
170+
version: "5.7.10"
171+
url_launcher_linux:
172+
dependency: transitive
173+
description:
174+
name: url_launcher_linux
175+
url: "https://pub.dartlang.org"
176+
source: hosted
177+
version: "0.0.1+4"
178+
url_launcher_macos:
179+
dependency: transitive
180+
description:
181+
name: url_launcher_macos
182+
url: "https://pub.dartlang.org"
183+
source: hosted
184+
version: "0.0.1+9"
185+
url_launcher_platform_interface:
186+
dependency: transitive
187+
description:
188+
name: url_launcher_platform_interface
189+
url: "https://pub.dartlang.org"
190+
source: hosted
191+
version: "1.0.9"
192+
url_launcher_web:
193+
dependency: transitive
194+
description:
195+
name: url_launcher_web
196+
url: "https://pub.dartlang.org"
197+
source: hosted
198+
version: "0.1.5+3"
199+
url_launcher_windows:
200+
dependency: transitive
201+
description:
202+
name: url_launcher_windows
203+
url: "https://pub.dartlang.org"
204+
source: hosted
205+
version: "0.0.1+3"
157206
vector_math:
158207
dependency: transitive
159208
description:
@@ -177,4 +226,4 @@ packages:
177226
version: "1.6.2"
178227
sdks:
179228
dart: ">=2.10.0-110 <2.11.0"
180-
flutter: ">=1.20.0 <2.0.0"
229+
flutter: ">=1.22.0 <2.0.0"

pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ dependencies:
2525
sdk: flutter
2626
vibration: ^1.7.3
2727
provider: ^4.3.2+2
28+
url_launcher: ^5.7.10
2829
# The following adds the Cupertino Icons font to your application.
2930
# Use with the CupertinoIcons class for iOS style icons.
3031
# cupertino_icons: ^1.0.0

0 commit comments

Comments
 (0)