Skip to content

Commit bc61c4d

Browse files
committed
chore: Replace flutter_lints to mostly_reasonable_lints
1 parent 043463a commit bc61c4d

File tree

16 files changed

+132
-237
lines changed

16 files changed

+132
-237
lines changed

README-ZH.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565
```yaml
6666
dependencies:
67-
auto_updater: ^0.1.7
67+
auto_updater: ^0.1.8
6868
```
6969
7070
@@ -192,17 +192,17 @@ If you lose it, your users will be unable to upgrade!
192192
```yaml
193193
output: dist/
194194
releases:
195-
- name: dev
195+
- name: prod
196196
jobs:
197-
- name: release-macos
197+
- name: macos-zip
198198
package:
199199
platform: macos
200200
target: zip
201201
build_args:
202202
dart-define:
203203
APP_ENV: dev
204204
# 查看完整文档:https://distributor.leanflutter.org/configuration/makers/exe
205-
- name: release-windows
205+
- name: windows-exe
206206
package:
207207
platform: windows
208208
target: exe
@@ -216,15 +216,15 @@ releases:
216216
运行以下命令:
217217
218218
```
219-
flutter_distributor release --name dev --jobs release-macos
219+
flutter_distributor release --name prod --jobs macos-zip
220220
```
221221

222222
##### Windows
223223

224224
运行以下命令:
225225

226226
```
227-
flutter_distributor release --name dev --jobs release-windows
227+
flutter_distributor release --name prod --jobs windows-exe
228228
```
229229

230230
#### 获取签名

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Add this to your package's pubspec.yaml file:
6464

6565
```yaml
6666
dependencies:
67-
auto_updater: ^0.1.7
67+
auto_updater: ^0.1.8
6868
```
6969
7070
Or
@@ -192,17 +192,17 @@ Add `distribute_options.yaml` to your project root directory.
192192
```yaml
193193
output: dist/
194194
releases:
195-
- name: dev
195+
- name: prod
196196
jobs:
197-
- name: release-macos
197+
- name: macos-zip
198198
package:
199199
platform: macos
200200
target: zip
201201
build_args:
202202
dart-define:
203203
APP_ENV: dev
204204
# See full documentation: https://distributor.leanflutter.org/configuration/makers/exe
205-
- name: release-windows
205+
- name: windows-exe
206206
package:
207207
platform: windows
208208
target: exe
@@ -216,15 +216,15 @@ releases:
216216
Run the following command:
217217
218218
```
219-
flutter_distributor release --name dev --jobs release-macos
219+
flutter_distributor release --name prod --jobs macos-zip
220220
```
221221

222222
##### Windows
223223

224224
Run the following command:
225225

226226
```
227-
flutter_distributor release --name dev --jobs release-windows
227+
flutter_distributor release --name prod --jobs windows-exe
228228
```
229229

230230
#### Get signature

analysis_options.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
include: package:flutter_lints/flutter.yaml
2-
3-
# Additional information about this file can be found at
4-
# https://dart.dev/guides/language/analysis-options
1+
include: package:mostly_reasonable_lints/flutter.yaml

bin/generate_keys.dart

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,20 @@ Future<void> main(List<String> arguments) async {
99

1010
String executable = Platform.isMacOS
1111
? '${Directory.current.path}/macos/Pods/Sparkle/bin/generate_keys'
12-
: p.joinAll([
13-
Directory.current.path,
14-
'windows',
15-
'flutter',
16-
'ephemeral',
17-
'.plugin_symlinks',
18-
'auto_updater',
19-
'windows',
20-
'WinSparkle-0.8.0',
21-
'bin',
22-
'generate_keys.bat'
23-
]);
12+
: p.joinAll(
13+
[
14+
Directory.current.path,
15+
'windows',
16+
'flutter',
17+
'ephemeral',
18+
'.plugin_symlinks',
19+
'auto_updater',
20+
'windows',
21+
'WinSparkle-0.8.0',
22+
'bin',
23+
'generate_keys.bat',
24+
],
25+
);
2426

2527
Process process = await Process.start(
2628
executable,

bin/sign_update.dart

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,20 @@ Future<void> main(List<String> args) async {
88

99
String executable = Platform.isMacOS
1010
? '${Directory.current.path}/macos/Pods/Sparkle/bin/sign_update'
11-
: p.joinAll([
12-
Directory.current.path,
13-
'windows',
14-
'flutter',
15-
'ephemeral',
16-
'.plugin_symlinks',
17-
'auto_updater',
18-
'windows',
19-
'WinSparkle-0.8.0',
20-
'bin',
21-
'sign_update.bat'
22-
]);
11+
: p.joinAll(
12+
[
13+
Directory.current.path,
14+
'windows',
15+
'flutter',
16+
'ephemeral',
17+
'.plugin_symlinks',
18+
'auto_updater',
19+
'windows',
20+
'WinSparkle-0.8.0',
21+
'bin',
22+
'sign_update.bat',
23+
],
24+
);
2325
List<String> arguments = List<String>.from(args);
2426
if (Platform.isWindows) {
2527
if (arguments.length == 1) {

example/analysis_options.yaml

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1 @@
1-
# This file configures the analyzer, which statically analyzes Dart code to
2-
# check for errors, warnings, and lints.
3-
#
4-
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5-
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6-
# invoked from the command line by running `flutter analyze`.
7-
8-
# The following line activates a set of recommended lints for Flutter apps,
9-
# packages, and plugins designed to encourage good coding practices.
10-
include: package:flutter_lints/flutter.yaml
11-
12-
linter:
13-
# The lint rules applied to this project can be customized in the
14-
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15-
# included above or to enable additional rules. A list of all available lints
16-
# and their documentation is published at
17-
# https://dart-lang.github.io/linter/lints/index.html.
18-
#
19-
# Instead of disabling a lint rule for the entire project in the
20-
# section below, it can also be suppressed for a single line of code
21-
# or a specific dart file by using the `// ignore: name_of_lint` and
22-
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
23-
# producing the lint.
24-
rules:
25-
# avoid_print: false # Uncomment to disable the `avoid_print` rule
26-
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27-
28-
# Additional information about this file can be found at
29-
# https://dart.dev/guides/language/analysis-options
1+
include: package:mostly_reasonable_lints/flutter.yaml

example/distribute_options.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
output: dist/
22
releases:
3-
- name: dev
3+
- name: prod
44
jobs:
5-
- name: release-macos
5+
- name: macos-zip
66
package:
77
platform: macos
88
target: zip
99
build_args:
1010
dart-define:
1111
APP_ENV: dev
12-
- name: release-windows
12+
- name: windows-exe
1313
package:
1414
platform: windows
1515
target: exe

example/lib/main.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import 'package:flutter/material.dart';
1+
import 'package:auto_updater_example/pages/home.dart';
22
import 'package:bot_toast/bot_toast.dart';
3+
import 'package:flutter/material.dart';
34
import 'package:window_manager/window_manager.dart';
45

5-
import './pages/home.dart';
6-
76
void main() async {
87
WidgetsFlutterBinding.ensureInitialized();
98
await windowManager.ensureInitialized();
@@ -17,7 +16,7 @@ void main() async {
1716
}
1817

1918
class MyApp extends StatefulWidget {
20-
const MyApp({Key? key}) : super(key: key);
19+
const MyApp({super.key});
2120

2221
@override
2322
State<MyApp> createState() => _MyAppState();

example/lib/pages/home.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import 'package:flutter/material.dart';
44
import 'package:preference_list/preference_list.dart';
55

66
class HomePage extends StatefulWidget {
7-
const HomePage({Key? key}) : super(key: key);
7+
const HomePage({super.key});
88

99
@override
1010
State<HomePage> createState() => _HomePageState();
@@ -20,24 +20,24 @@ class _HomePageState extends State<HomePage> {
2020
super.initState();
2121
}
2222

23-
void _handleClickSetFeedURL() async {
23+
Future<void> _handleClickSetFeedURL() async {
2424
await autoUpdater.setFeedURL(_feedURL);
2525
_isFeedURLSetted = true;
2626
}
2727

28-
void _handleClickCheckForUpdates() async {
28+
Future<void> _handleClickCheckForUpdates() async {
2929
if (!_isFeedURLSetted) {
3030
BotToast.showText(text: 'Please call setFeedURL method first.');
3131
return;
3232
}
3333
await autoUpdater.checkForUpdates();
3434
}
3535

36-
void _handleClickCheckForUpdatesWithoutUI() async {
36+
Future<void> _handleClickCheckForUpdatesWithoutUI() async {
3737
await autoUpdater.checkForUpdates(inBackground: true);
3838
}
3939

40-
void _handleClickSetScheduledCheckInterval() async {
40+
Future<void> _handleClickSetScheduledCheckInterval() async {
4141
await autoUpdater.setScheduledCheckInterval(3600);
4242
}
4343

example/macos/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ SPEC CHECKSUMS:
3838

3939
PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7
4040

41-
COCOAPODS: 1.11.3
41+
COCOAPODS: 1.14.3

0 commit comments

Comments
 (0)