From a27dc6ad1cb60cd3aef9b0836237db9ac5dff19a Mon Sep 17 00:00:00 2001 From: Sangam Shrestha <2shrestha22@gmail.com> Date: Sun, 14 May 2023 16:30:35 +0545 Subject: [PATCH] feat: migrate to dart3 --- .gitignore | 5 ++++- analysis_options.yaml | 1 - android/build.gradle | 2 +- lib/services/github_api.dart | 2 +- lib/services/revanced_api.dart | 1 - lib/ui/views/app_selector/app_selector_view.dart | 2 +- lib/ui/views/patches_selector/patches_selector_view.dart | 2 +- lib/ui/widgets/homeView/latest_commit_card.dart | 8 ++++---- lib/ui/widgets/settingsView/social_media_widget.dart | 4 ++-- pubspec.yaml | 7 +++---- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index eee69987..2f302002 100644 --- a/.gitignore +++ b/.gitignore @@ -138,4 +138,7 @@ app.*.map.json .firebase # Dependency directories -node_modules/ \ No newline at end of file +node_modules/ + +# FVM +.fvm \ No newline at end of file diff --git a/analysis_options.yaml b/analysis_options.yaml index 54664176..da2ffc37 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -98,7 +98,6 @@ linter: - prefer_const_declarations - prefer_const_literals_to_create_immutables - prefer_contains - - prefer_equal_for_default_values - prefer_final_fields - prefer_final_in_for_each - prefer_final_locals diff --git a/android/build.gradle b/android/build.gradle index 0910f549..5086ec38 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -31,6 +31,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/lib/services/github_api.dart b/lib/services/github_api.dart index b453e645..ed0bec52 100644 --- a/lib/services/github_api.dart +++ b/lib/services/github_api.dart @@ -90,7 +90,7 @@ class GithubAPI { final List commits = response.data; return commits .map( - (commit) => (commit['commit']['message']).split('\n')[0] + + (commit) => commit['commit']['message'].split('\n')[0] + ' - ' + commit['commit']['author']['name'] + '\n' as String, diff --git a/lib/services/revanced_api.dart b/lib/services/revanced_api.dart index 1c6d3f9e..11fa084c 100644 --- a/lib/services/revanced_api.dart +++ b/lib/services/revanced_api.dart @@ -1,5 +1,4 @@ import 'dart:async'; -import 'dart:developer'; import 'dart:io'; import 'package:collection/collection.dart'; diff --git a/lib/ui/views/app_selector/app_selector_view.dart b/lib/ui/views/app_selector/app_selector_view.dart index 487f08a8..320d6712 100644 --- a/lib/ui/views/app_selector/app_selector_view.dart +++ b/lib/ui/views/app_selector/app_selector_view.dart @@ -1,4 +1,4 @@ -import 'package:flutter/material.dart'; +import 'package:flutter/material.dart' hide SearchBar; import 'package:flutter_i18n/flutter_i18n.dart'; import 'package:revanced_manager/ui/views/app_selector/app_selector_viewmodel.dart'; import 'package:revanced_manager/ui/widgets/appSelectorView/app_skeleton_loader.dart'; diff --git a/lib/ui/views/patches_selector/patches_selector_view.dart b/lib/ui/views/patches_selector/patches_selector_view.dart index d616f9fe..a5d54304 100644 --- a/lib/ui/views/patches_selector/patches_selector_view.dart +++ b/lib/ui/views/patches_selector/patches_selector_view.dart @@ -1,4 +1,4 @@ -import 'package:flutter/material.dart'; +import 'package:flutter/material.dart' hide SearchBar; import 'package:flutter_i18n/flutter_i18n.dart'; import 'package:revanced_manager/ui/views/patches_selector/patches_selector_viewmodel.dart'; import 'package:revanced_manager/ui/widgets/patchesSelectorView/patch_item.dart'; diff --git a/lib/ui/widgets/homeView/latest_commit_card.dart b/lib/ui/widgets/homeView/latest_commit_card.dart index b1f506f2..e56b241f 100644 --- a/lib/ui/widgets/homeView/latest_commit_card.dart +++ b/lib/ui/widgets/homeView/latest_commit_card.dart @@ -33,8 +33,8 @@ class _LatestCommitCardState extends State { Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Row( - children: const [ + const Row( + children: [ Text('ReVanced Manager'), ], ), @@ -82,8 +82,8 @@ class _LatestCommitCardState extends State { Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Row( - children: const [ + const Row( + children: [ Text('ReVanced Patches'), ], ), diff --git a/lib/ui/widgets/settingsView/social_media_widget.dart b/lib/ui/widgets/settingsView/social_media_widget.dart index 9418b523..73a6a2ee 100644 --- a/lib/ui/widgets/settingsView/social_media_widget.dart +++ b/lib/ui/widgets/settingsView/social_media_widget.dart @@ -39,9 +39,9 @@ class SocialMediaWidget extends StatelessWidget { ), expanded: Padding( padding: padding ?? EdgeInsets.zero, - child: CustomCard( + child: const CustomCard( child: Column( - children: const [ + children: [ SocialMediaItem( icon: FaIcon(FontAwesomeIcons.github), title: Text('GitHub'), diff --git a/pubspec.yaml b/pubspec.yaml index 16abba54..b4385c8f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -7,7 +7,7 @@ publish_to: 'none' version: 1.1.0+100100000 environment: - sdk: ">=2.17.5 <3.0.0" + sdk: '>=3.0.0 <4.0.0' dependencies: animations: ^2.0.7 @@ -36,7 +36,7 @@ dependencies: sdk: flutter flutter_background: ^1.2.0 flutter_cache_manager: ^3.3.0 - flutter_i18n: ^0.32.4 + flutter_i18n: ^0.33.0 flutter_local_notifications: ^13.0.0 flutter_localizations: sdk: flutter @@ -47,7 +47,7 @@ dependencies: google_fonts: ^4.0.3 http: ^0.13.5 injectable: ^2.1.1 - intl: ^0.17.0 + intl: ^0.18.0 json_annotation: ^4.8.0 logcat: git: @@ -74,7 +74,6 @@ dependencies: wakelock: ^0.6.2 flutter_dotenv: ^5.0.2 flutter_markdown: ^0.6.14 - pub_release: ^8.0.3 dio_cache_interceptor: ^3.4.0 dev_dependencies: