Skip to content
This repository has been archived by the owner on Aug 26, 2023. It is now read-only.

[ui] remove package_info_plus dependency #335

Merged
merged 1 commit into from
Jul 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/constants.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

const appVersion = '2.0.1';
14 changes: 6 additions & 8 deletions lib/ui/screens/about_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

import 'package:clima/constants.dart';
import 'package:clima/ui/build_flavor.dart';
import 'package:clima/ui/widgets/dialogs/credits_dialog.dart';
import 'package:clima/ui/widgets/dialogs/help_and_feedback_dialog.dart';
Expand All @@ -12,7 +13,6 @@ import 'package:clima/ui/widgets/settings/settings_header.dart';
import 'package:clima/ui/widgets/settings/settings_tile.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:url_launcher/url_launcher.dart';

class AboutScreen extends StatelessWidget {
Expand Down Expand Up @@ -43,14 +43,14 @@ class AboutScreen extends StatelessWidget {
),
SettingsTile(
title: 'Changelog',
subtitle: 'Version 2.0.1',
subtitle: 'Version $appVersion',
leading: Icon(
Icons.new_releases_outlined,
color: Theme.of(context).iconTheme.color,
),
onTap: () => launchUrl(
Uri.parse(
'https://github.com/lacerte/clima/releases/tag/v2.0.1',
'https://github.com/lacerte/clima/releases/tag/v$appVersion',
),
),
),
Expand All @@ -75,13 +75,11 @@ class AboutScreen extends StatelessWidget {
Icons.source_outlined,
color: Theme.of(context).iconTheme.color,
),
onTap: () async {
final PackageInfo packageInfo =
await PackageInfo.fromPlatform();
onTap: () {
showLicensePage(
context: context,
applicationName: packageInfo.appName,
applicationVersion: packageInfo.version,
applicationName: 'Clima',
applicationVersion: appVersion,
);
},
),
Expand Down
42 changes: 0 additions & 42 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -478,48 +478,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
package_info_plus:
dependency: "direct main"
description:
name: package_info_plus
url: "https://pub.dartlang.org"
source: hosted
version: "1.4.2"
package_info_plus_linux:
dependency: transitive
description:
name: package_info_plus_linux
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
package_info_plus_macos:
dependency: transitive
description:
name: package_info_plus_macos
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
package_info_plus_platform_interface:
dependency: transitive
description:
name: package_info_plus_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
package_info_plus_web:
dependency: transitive
description:
name: package_info_plus_web
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
package_info_plus_windows:
dependency: transitive
description:
name: package_info_plus_windows
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
path:
dependency: transitive
description:
Expand Down
1 change: 0 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ dependencies:
git:
url: https://github.com/CentaurusApps/material_floating_search_bar.git
ref: 07b2980ad304dacaa5688e56483adcec36fb08ab
package_info_plus: 1.4.2
riverpod: 1.0.3
shared_preferences: 2.0.15
font_awesome_flutter: 10.1.0
Expand Down