Skip to content

Commit 3d9f739

Browse files
committedJun 28, 2024
feat: update iconica linter
1 parent d436fb7 commit 3d9f739

10 files changed

+39
-104
lines changed
 

‎example/pubspec.yaml

+4-71
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,25 @@
11
name: example
22
description: A new Flutter project.
3-
# The following line prevents the package from being accidentally published to
4-
# pub.dev using `flutter pub publish`. This is preferred for private packages.
53
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
64

7-
# The following defines the version and build number for your application.
8-
# A version number is three numbers separated by dots, like 1.2.43
9-
# followed by an optional build number separated by a +.
10-
# Both the version and the builder number may be overridden in flutter
11-
# build by specifying --build-name and --build-number, respectively.
12-
# In Android, build-name is used as versionName while build-number used as versionCode.
13-
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
14-
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
15-
# Read more about iOS versioning at
16-
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
17-
# In Windows, build-name is used as the major, minor, and patch parts
18-
# of the product and file versions while build-number is used as the build suffix.
195
version: 1.0.0+1
206

217
environment:
228
sdk: '>=3.1.5 <4.0.0'
239

24-
# Dependencies specify other packages that your package needs in order to work.
25-
# To automatically upgrade your package dependencies to the latest versions
26-
# consider running `flutter pub upgrade --major-versions`. Alternatively,
27-
# dependencies can be manually updated by changing the version numbers below to
28-
# the latest version available on pub.dev. To see which dependencies have newer
29-
# versions available, run `flutter pub outdated`.
3010
dependencies:
3111
flutter:
3212
sdk: flutter
33-
34-
35-
# The following adds the Cupertino Icons font to your application.
36-
# Use with the CupertinoIcons class for iOS style icons.
37-
cupertino_icons: ^1.0.2
3813
flutter_connectivity:
3914
path: ../
4015

4116
dev_dependencies:
4217
flutter_test:
4318
sdk: flutter
19+
flutter_iconica_analysis:
20+
git:
21+
url: https://github.com/Iconica-Development/flutter_iconica_analysis
22+
ref: 7.0.0
4423

45-
# The "flutter_lints" package below contains a set of recommended lints to
46-
# encourage good coding practices. The lint set provided by the package is
47-
# activated in the `analysis_options.yaml` file located at the root of your
48-
# package. See that file for information about deactivating specific lint
49-
# rules and activating additional ones.
50-
flutter_lints: ^2.0.0
51-
52-
# For information on the generic Dart part of this file, see the
53-
# following page: https://dart.dev/tools/pub/pubspec
54-
55-
# The following section is specific to Flutter packages.
5624
flutter:
57-
58-
# The following line ensures that the Material Icons font is
59-
# included with your application, so that you can use the icons in
60-
# the material Icons class.
6125
uses-material-design: true
62-
63-
# To add assets to your application, add an assets section, like this:
64-
# assets:
65-
# - images/a_dot_burr.jpeg
66-
# - images/a_dot_ham.jpeg
67-
68-
# An image asset can refer to one or more resolution-specific "variants", see
69-
# https://flutter.dev/assets-and-images/#resolution-aware
70-
71-
# For details regarding adding assets from package dependencies, see
72-
# https://flutter.dev/assets-and-images/#from-packages
73-
74-
# To add custom fonts to your application, add a fonts section here,
75-
# in this "flutter" section. Each entry in this list should have a
76-
# "family" key with the font family name, and a "fonts" key with a
77-
# list giving the asset and other descriptors for the font. For
78-
# example:
79-
# fonts:
80-
# - family: Schyler
81-
# fonts:
82-
# - asset: fonts/Schyler-Regular.ttf
83-
# - asset: fonts/Schyler-Italic.ttf
84-
# style: italic
85-
# - family: Trajan Pro
86-
# fonts:
87-
# - asset: fonts/TrajanPro.ttf
88-
# - asset: fonts/TrajanPro_Bold.ttf
89-
# weight: 700
90-
#
91-
# For details regarding fonts from package dependencies,
92-
# see https://flutter.dev/custom-fonts/#from-packages

‎lib/flutter_connectivity.dart

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
///
22
library flutter_connectivity;
33

4-
export 'src/enums/connectivity_display_type_enum.dart';
5-
export 'src/models/connectivity_checker.dart';
6-
export 'src/models/connectivity_config.dart';
7-
export 'src/models/connectivity_handler.dart';
8-
export 'src/screens/no_internet_screen.dart';
9-
export 'src/services/connectivity_service.dart';
4+
export "src/enums/connectivity_display_type_enum.dart";
5+
export "src/models/connectivity_checker.dart";
6+
export "src/models/connectivity_config.dart";
7+
export "src/models/connectivity_handler.dart";
8+
export "src/screens/no_internet_screen.dart";
9+
export "src/services/connectivity_service.dart";

‎lib/src/models/connectivity_checker.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// ignore_for_file: one_member_abstracts
22

3-
import 'dart:io';
3+
import "dart:io";
44

5-
import 'package:flutter/foundation.dart';
6-
import 'package:flutter_connectivity/flutter_connectivity.dart';
7-
import 'package:http/http.dart';
5+
import "package:flutter/foundation.dart";
6+
import "package:flutter_connectivity/flutter_connectivity.dart";
7+
import "package:http/http.dart";
88

99
/// Implement this class to create a custom check for internet connection.
1010
/// Default implementation is [InternetChecker].

‎lib/src/models/connectivity_config.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// ignore_for_file: prefer_initializing_formals
22

3-
import 'package:flutter_connectivity/src/models/connectivity_checker.dart';
4-
import 'package:flutter_connectivity/src/models/connectivity_handler.dart';
3+
import "package:flutter_connectivity/src/models/connectivity_checker.dart";
4+
import "package:flutter_connectivity/src/models/connectivity_handler.dart";
55

66
/// Configuration for [Connectivity].
77
class ConnectivityConfig {
88
/// Create a custom configuration for [Connectivity].
99
ConnectivityConfig({
10-
this.url = 'google.nl',
10+
this.url = "google.nl",
1111
this.webUrl,
1212
this.duration = const Duration(seconds: 3),
1313
handler,

‎lib/src/models/connectivity_handler.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import 'dart:async';
1+
import "dart:async";
22

3-
import 'package:flutter/material.dart';
4-
import 'package:flutter_connectivity/src/enums/connectivity_display_type_enum.dart';
3+
import "package:flutter/material.dart";
4+
import "package:flutter_connectivity/src/enums/connectivity_display_type_enum.dart";
55

66
/// Implement this class to create a custom handler for internet connection.
77
abstract class ConnectivityHandler {

‎lib/src/screens/no_internet_screen.dart

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import 'package:flutter/material.dart';
2-
import 'package:flutter_connectivity/src/enums/connectivity_display_type_enum.dart';
1+
import "package:flutter/material.dart";
2+
import "package:flutter_connectivity/src/enums/connectivity_display_type_enum.dart";
33

44
/// Standard screen to use as fallback.
55
class NoInternetScreen extends StatefulWidget {
66
const NoInternetScreen({
77
required this.connectivityDisplayType,
8-
this.titleText = 'No internet',
9-
this.underTitleText = 'It seems like you don\'t have an active internet '
10-
'connection. Please check your network and try again.',
8+
this.titleText = "No internet",
9+
this.underTitleText = "It seems like you don't have an active internet "
10+
"connection. Please check your network and try again.",
1111
this.titleTextStyle,
1212
this.underTitleTextStyle,
1313
this.titleSpacer = 8,

‎lib/src/services/connectivity_service.dart

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// ignore_for_file: prefer_constructors_over_static_methods
22
// ignore_for_file: use_build_context_synchronously
33

4-
import 'package:flutter/foundation.dart';
5-
import 'package:flutter/material.dart';
6-
import 'package:flutter_connectivity/flutter_connectivity.dart';
7-
import 'package:flutter_connectivity/src/services/pauseable_timer.dart';
4+
import "package:flutter/foundation.dart";
5+
import "package:flutter/material.dart";
6+
import "package:flutter_connectivity/flutter_connectivity.dart";
7+
import "package:flutter_connectivity/src/services/pauseable_timer.dart";
88

99
/// Service that can be used to check for internet connection.
1010
class Connectivity with WidgetsBindingObserver {
@@ -20,6 +20,7 @@ class Connectivity with WidgetsBindingObserver {
2020
ConnectivityConfig? __config;
2121
ConnectivityConfig get _config =>
2222
__config ??= ConnectivityConfig.defaultConfig();
23+
// ignore: use_setters_to_change_properties
2324
void setCustomConfig(ConnectivityConfig config) => __config = config;
2425

2526
bool _connection = true;
@@ -49,16 +50,16 @@ class Connectivity with WidgetsBindingObserver {
4950

5051
if (kIsWeb && _config.webUrl == null) {
5152
throw Exception(
52-
'To make flutter_connectivity work for web please specify a webUrl'
53-
' in the config. Make sure, CORS is not an issue',
53+
"To make flutter_connectivity work for web please specify a webUrl"
54+
" in the config. Make sure, CORS is not an issue",
5455
);
5556
}
5657

5758
_connection = await _config.checker.checkConnection(_config);
5859

5960
if (_config.handler is DefaultFlutterHandler) {
6061
if (context == null) {
61-
throw Exception('Context is required when using the default handler');
62+
throw Exception("Context is required when using the default handler");
6263
}
6364

6465
(_config.handler as DefaultFlutterHandler).init(

‎lib/src/services/pauseable_timer.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// ignore_for_file: prefer_asserts_with_message, depend_on_referenced_packages
22

3-
import 'dart:async' show Timer, Zone;
3+
import "dart:async" show Timer, Zone;
44

5-
import 'package:clock/clock.dart' show clock;
5+
import "package:clock/clock.dart" show clock;
66

77
final class PausableTimer implements Timer {
88
PausableTimer(this.duration, void Function() callback)

‎pubspec.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ dependencies:
1111
sdk: flutter
1212
http: any
1313

14+
clock: any
1415
dev_dependencies:
1516
flutter_test:
1617
sdk: flutter
1718
flutter_iconica_analysis:
1819
git:
1920
url: https://github.com/Iconica-Development/flutter_iconica_analysis
20-
ref: 6.0.0
21+
ref: 7.0.0
2122

2223
flutter:

‎test/test.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import 'package:flutter_test/flutter_test.dart';
1+
import "package:flutter_test/flutter_test.dart";
22

33
void main() {
4-
test('', () {
4+
test("", () {
55
expect(true, true);
66
});
77
}

0 commit comments

Comments
 (0)