use flutter_lints as linter
This commit is contained in:
parent
386bd2097e
commit
abab589d80
@ -1,4 +1,4 @@
|
||||
include: package:lints/recommended.yaml
|
||||
include: package:flutter_lints/flutter.yaml
|
||||
|
||||
linter:
|
||||
rules:
|
||||
|
@ -10,20 +10,5 @@
|
||||
include: package:flutter_lints/flutter.yaml
|
||||
|
||||
linter:
|
||||
# The lint rules applied to this project can be customized in the
|
||||
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
|
||||
# included above or to enable additional rules. A list of all available lints
|
||||
# and their documentation is published at
|
||||
# https://dart-lang.github.io/linter/lints/index.html.
|
||||
#
|
||||
# Instead of disabling a lint rule for the entire project in the
|
||||
# section below, it can also be suppressed for a single line of code
|
||||
# or a specific dart file by using the `// ignore: name_of_lint` and
|
||||
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
|
||||
# producing the lint.
|
||||
rules:
|
||||
# avoid_print: false # Uncomment to disable the `avoid_print` rule
|
||||
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
|
||||
|
||||
# Additional information about this file can be found at
|
||||
# https://dart.dev/guides/language/analysis-options
|
||||
constant_identifier_names: ignore
|
@ -14,7 +14,7 @@ void customActionButton() {
|
||||
].contains(defaultTargetPlatform);
|
||||
|
||||
test('add custom action button', () async {
|
||||
var chromeSafariBrowser = new MyChromeSafariBrowser();
|
||||
var chromeSafariBrowser = MyChromeSafariBrowser();
|
||||
var actionButtonIcon =
|
||||
await rootBundle.load('test_assets/images/flutter-logo.png');
|
||||
chromeSafariBrowser.setActionButton(ChromeSafariBrowserActionButton(
|
||||
@ -22,7 +22,7 @@ void customActionButton() {
|
||||
description: 'Action Button description',
|
||||
icon: actionButtonIcon.buffer.asUint8List(),
|
||||
action: (url, title) {
|
||||
print('Action Button 1 clicked!');
|
||||
|
||||
}));
|
||||
expect(chromeSafariBrowser.isOpened(), false);
|
||||
|
||||
|
@ -15,12 +15,12 @@ void customMenuItem() {
|
||||
].contains(defaultTargetPlatform);
|
||||
|
||||
test('add custom menu item', () async {
|
||||
var chromeSafariBrowser = new MyChromeSafariBrowser();
|
||||
var chromeSafariBrowser = MyChromeSafariBrowser();
|
||||
chromeSafariBrowser.addMenuItem(ChromeSafariBrowserMenuItem(
|
||||
id: 2,
|
||||
label: 'Custom item menu 1',
|
||||
action: (url, title) {
|
||||
print('Custom item menu 1 clicked!');
|
||||
|
||||
}));
|
||||
expect(chromeSafariBrowser.isOpened(), false);
|
||||
|
||||
|
@ -14,7 +14,7 @@ void customTabs() {
|
||||
|
||||
group('Custom Tabs', () {
|
||||
test('single instance', () async {
|
||||
var chromeSafariBrowser = new MyChromeSafariBrowser();
|
||||
var chromeSafariBrowser = MyChromeSafariBrowser();
|
||||
expect(chromeSafariBrowser.isOpened(), false);
|
||||
|
||||
await chromeSafariBrowser.open(
|
||||
|
@ -8,7 +8,7 @@ import 'open_and_close.dart';
|
||||
import 'trusted_web_activity.dart';
|
||||
|
||||
void main() {
|
||||
final shouldSkip = kIsWeb;
|
||||
const shouldSkip = kIsWeb;
|
||||
|
||||
group('ChromeSafariBrowser', () {
|
||||
openAndClose();
|
||||
|
@ -15,7 +15,7 @@ void openAndClose() {
|
||||
].contains(defaultTargetPlatform);
|
||||
|
||||
test('open and close', () async {
|
||||
var chromeSafariBrowser = new MyChromeSafariBrowser();
|
||||
var chromeSafariBrowser = MyChromeSafariBrowser();
|
||||
expect(chromeSafariBrowser.isOpened(), false);
|
||||
|
||||
await chromeSafariBrowser.open(url: TEST_URL_1);
|
||||
|
@ -14,7 +14,7 @@ void trustedWebActivity() {
|
||||
|
||||
group('Trusted Web Activity', () {
|
||||
test('basic', () async {
|
||||
var chromeSafariBrowser = new MyChromeSafariBrowser();
|
||||
var chromeSafariBrowser = MyChromeSafariBrowser();
|
||||
expect(chromeSafariBrowser.isOpened(), false);
|
||||
|
||||
await chromeSafariBrowser.open(
|
||||
@ -33,7 +33,7 @@ void trustedWebActivity() {
|
||||
});
|
||||
|
||||
test('single instance', () async {
|
||||
var chromeSafariBrowser = new MyChromeSafariBrowser();
|
||||
var chromeSafariBrowser = MyChromeSafariBrowser();
|
||||
expect(chromeSafariBrowser.isOpened(), false);
|
||||
|
||||
await chromeSafariBrowser.open(
|
||||
|
@ -1,5 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
@ -1,6 +1,5 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
@ -1,5 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
@ -1,6 +1,5 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
@ -1,6 +1,5 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
@ -42,7 +42,7 @@ dev_dependencies:
|
||||
# git:
|
||||
# url: https://github.com/flutter/plugins.git
|
||||
# path: packages/integration_test
|
||||
pedantic: ^1.8.0
|
||||
flutter_lints: ^2.0.1
|
||||
|
||||
# For information on the generic Dart part of this file, see the
|
||||
# following page: https://www.dartlang.org/tools/pub/pubspec
|
||||
|
@ -1,6 +1,5 @@
|
||||
import 'dart:async';
|
||||
import 'dart:collection';
|
||||
import 'dart:typed_data';
|
||||
import 'dart:developer' as developer;
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
@ -1,6 +1,5 @@
|
||||
import 'dart:async';
|
||||
import 'dart:collection';
|
||||
import 'dart:typed_data';
|
||||
import 'dart:developer' as developer;
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
|
@ -1,5 +1,4 @@
|
||||
import 'dart:core';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
import 'dart:collection';
|
||||
import 'dart:typed_data';
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_inappwebview/src/util.dart';
|
||||
@ -14,7 +12,6 @@ import 'in_app_webview_controller.dart';
|
||||
import 'in_app_webview_settings.dart';
|
||||
import '../pull_to_refresh/pull_to_refresh_controller.dart';
|
||||
import '../pull_to_refresh/pull_to_refresh_settings.dart';
|
||||
import '../util.dart';
|
||||
import '../types/disposable.dart';
|
||||
|
||||
///Class that represents a WebView in headless mode.
|
||||
|
@ -1,6 +1,5 @@
|
||||
import 'dart:async';
|
||||
import 'dart:collection';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
@ -1,14 +1,11 @@
|
||||
import 'dart:io';
|
||||
import 'dart:collection';
|
||||
import 'dart:typed_data';
|
||||
import 'dart:convert';
|
||||
import 'dart:core';
|
||||
import 'dart:developer' as developer;
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
import 'android/in_app_webview_controller.dart';
|
||||
import 'apple/in_app_webview_controller.dart';
|
||||
|
@ -1,9 +1,6 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
import '../types/requested_with_header_mode.dart';
|
||||
import 'android/in_app_webview_options.dart';
|
||||
import 'apple/in_app_webview_options.dart';
|
||||
import '../content_blocker.dart';
|
||||
|
@ -1,4 +1,3 @@
|
||||
import 'dart:ui';
|
||||
import 'dart:developer' as developer;
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
|
@ -7,6 +7,7 @@ part 'ajax_request_event_type.g.dart';
|
||||
///Class used by [AjaxRequestEvent] class.
|
||||
@ExchangeableEnum()
|
||||
class AjaxRequestEventType_ {
|
||||
// ignore: unused_field
|
||||
final String _value;
|
||||
const AjaxRequestEventType_._internal(this._value);
|
||||
|
||||
|
@ -33,6 +33,7 @@ class ModalTransitionStyle_ {
|
||||
@Deprecated("Use ModalTransitionStyle instead")
|
||||
@ExchangeableEnum()
|
||||
class IOSUIModalTransitionStyle_ {
|
||||
// ignore: unused_field
|
||||
final int _value;
|
||||
const IOSUIModalTransitionStyle_._internal(this._value);
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
import 'dart:collection';
|
||||
|
||||
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
||||
|
||||
import '../in_app_webview/webview.dart';
|
||||
|
@ -1,6 +1,5 @@
|
||||
import 'dart:async';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
import 'in_app_web_view_web_element.dart';
|
||||
import '../util.dart';
|
||||
|
@ -1,6 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:typed_data';
|
||||
import 'dart:ui';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'dart:html';
|
||||
import 'dart:js' as js;
|
||||
|
@ -20,7 +20,7 @@ dev_dependencies:
|
||||
sdk: flutter
|
||||
flutter_driver:
|
||||
sdk: flutter
|
||||
lints: ^1.0.1
|
||||
flutter_lints: ^2.0.1
|
||||
build_runner: ^2.2.1
|
||||
generators:
|
||||
path: dev_packages/generators
|
||||
|
Loading…
x
Reference in New Issue
Block a user