Skip to content

Commit ceff869

Browse files
committed
Url Launcher added
1 parent 9ecd9cf commit ceff869

File tree

3 files changed

+85
-11
lines changed

3 files changed

+85
-11
lines changed

lib/screens/settings_screen.dart

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import 'package:task_manager/helpers/database_helper.dart';
33
import 'home_screen.dart';
44
import 'stacked_icons.dart';
55
import 'package:toast/toast.dart';
6+
import 'package:url_launcher/url_launcher.dart';
67

78
class Settings extends StatefulWidget {
89
@override
@@ -120,20 +121,38 @@ class _SettingsState extends State<Settings> {
120121
Padding(
121122
padding: const EdgeInsets.only(left: 40.0, right: 20.0),
122123
child: new Container(
123-
alignment: Alignment.centerLeft,
124-
height: 60.0,
125-
child: new Text("Terms and Condition",
126-
style: new TextStyle(
127-
fontSize: 17.0, color: Colors.brown))),
124+
alignment: Alignment.centerLeft,
125+
height: 60.0,
126+
child: InkWell(
127+
child: new Text(
128+
"Terms and Condition",
129+
style: new TextStyle(
130+
fontSize: 17.0,
131+
color: Colors.brown,
132+
backgroundColor: Colors.transparent),
133+
),
134+
onTap: () =>
135+
launch('https://https://bornomala-tech.web.app/terms'),
136+
),
137+
),
128138
),
129139
Padding(
130140
padding: const EdgeInsets.only(left: 40.0, right: 20.0),
131141
child: new Container(
132-
alignment: Alignment.centerLeft,
133-
height: 60.0,
134-
child: new Text("Privacy Policy",
135-
style: new TextStyle(
136-
fontSize: 17.0, color: Colors.brown))),
142+
alignment: Alignment.centerLeft,
143+
height: 60.0,
144+
child: InkWell(
145+
child: new Text(
146+
"Privacy Policy",
147+
style: new TextStyle(
148+
fontSize: 17.0,
149+
color: Colors.brown,
150+
backgroundColor: Colors.transparent),
151+
),
152+
onTap: () => launch(
153+
'https://https://bornomala-tech.web.app/privacy'),
154+
),
155+
),
137156
),
138157
SizedBox(
139158
width: 1080,

pubspec.lock

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,25 @@ packages:
8181
description: flutter
8282
source: sdk
8383
version: "0.0.0"
84+
flutter_web_plugins:
85+
dependency: transitive
86+
description: flutter
87+
source: sdk
88+
version: "0.0.0"
8489
intl:
8590
dependency: "direct main"
8691
description:
8792
name: intl
8893
url: "https://pub.dartlang.org"
8994
source: hosted
9095
version: "0.16.1"
96+
js:
97+
dependency: transitive
98+
description:
99+
name: js
100+
url: "https://pub.dartlang.org"
101+
source: hosted
102+
version: "0.6.3"
91103
matcher:
92104
dependency: transitive
93105
description:
@@ -247,6 +259,48 @@ packages:
247259
url: "https://pub.dartlang.org"
248260
source: hosted
249261
version: "1.3.0"
262+
url_launcher:
263+
dependency: "direct main"
264+
description:
265+
name: url_launcher
266+
url: "https://pub.dartlang.org"
267+
source: hosted
268+
version: "6.0.2"
269+
url_launcher_linux:
270+
dependency: transitive
271+
description:
272+
name: url_launcher_linux
273+
url: "https://pub.dartlang.org"
274+
source: hosted
275+
version: "2.0.0"
276+
url_launcher_macos:
277+
dependency: transitive
278+
description:
279+
name: url_launcher_macos
280+
url: "https://pub.dartlang.org"
281+
source: hosted
282+
version: "2.0.0"
283+
url_launcher_platform_interface:
284+
dependency: transitive
285+
description:
286+
name: url_launcher_platform_interface
287+
url: "https://pub.dartlang.org"
288+
source: hosted
289+
version: "2.0.1"
290+
url_launcher_web:
291+
dependency: transitive
292+
description:
293+
name: url_launcher_web
294+
url: "https://pub.dartlang.org"
295+
source: hosted
296+
version: "2.0.0"
297+
url_launcher_windows:
298+
dependency: transitive
299+
description:
300+
name: url_launcher_windows
301+
url: "https://pub.dartlang.org"
302+
source: hosted
303+
version: "2.0.0"
250304
vector_math:
251305
dependency: transitive
252306
description:
@@ -269,5 +323,5 @@ packages:
269323
source: hosted
270324
version: "0.1.2"
271325
sdks:
272-
dart: ">=2.12.0-0.0 <3.0.0"
326+
dart: ">=2.12.0-259.9.beta <3.0.0"
273327
flutter: ">=1.22.2"

pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ dependencies:
3232
sqflite: ^1.1.7
3333
path_provider: ^1.3.0
3434
toast: ^0.1.5
35+
url_launcher: ^6.0.2
3536

3637
dev_dependencies:
3738
flutter_test:

0 commit comments

Comments
 (0)