Skip to content

Commit 481b063

Browse files
committed
Merge remote-tracking branch 'upstream/master' into webview_load_file_android
2 parents c55603e + 6bc9a2b commit 481b063

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+220
-199
lines changed

analysis_options.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ analyzer:
5757
- '**/*.g.dart'
5858
- 'lib/src/generated/*.dart'
5959
- '**/*.mocks.dart' # Mockito @GenerateMocks
60+
- '**/*.pigeon.dart' # Pigeon generated file
6061

6162
linter:
6263
rules:

analysis_options_legacy.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ analyzer:
55
- '**/*.g.dart'
66
- 'lib/src/generated/*.dart'
77
- '**/*.mocks.dart' # Mockito @GenerateMocks
8+
- '**/*.pigeon.dart' # Pigeon generated file
89
errors:
910
always_require_non_null_named_parameters: false # not needed with nnbd
1011
# TODO(https://github.com/flutter/flutter/issues/74381):

packages/quick_actions/analysis_options.yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/quick_actions/quick_actions/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## NEXT
22

33
* Updates Android compileSdkVersion to 31.
4+
* Updates code for analyzer changes.
45

56
## 0.6.0+8
67

packages/quick_actions/quick_actions/example/integration_test/quick_actions_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ void main() {
1111
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
1212

1313
testWidgets('Can set shortcuts', (WidgetTester tester) async {
14-
final QuickActions quickActions = QuickActions();
14+
const QuickActions quickActions = QuickActions();
1515
await quickActions.initialize(null);
1616

1717
const ShortcutItem shortCutItem = ShortcutItem(

packages/quick_actions/quick_actions/example/lib/main.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ class MyApp extends StatelessWidget {
1919
theme: ThemeData(
2020
primarySwatch: Colors.blue,
2121
),
22-
home: MyHomePage(),
22+
home: const MyHomePage(),
2323
);
2424
}
2525
}
2626

2727
class MyHomePage extends StatefulWidget {
28-
MyHomePage({Key? key}) : super(key: key);
28+
const MyHomePage({Key? key}) : super(key: key);
2929

3030
@override
3131
_MyHomePageState createState() => _MyHomePageState();
@@ -38,7 +38,7 @@ class _MyHomePageState extends State<MyHomePage> {
3838
void initState() {
3939
super.initState();
4040

41-
final QuickActions quickActions = QuickActions();
41+
const QuickActions quickActions = QuickActions();
4242
quickActions.initialize((String shortcutType) {
4343
setState(() {
4444
if (shortcutType != null) {
@@ -61,7 +61,7 @@ class _MyHomePageState extends State<MyHomePage> {
6161
type: 'action_two',
6262
localizedTitle: 'Action two',
6363
icon: 'ic_launcher'),
64-
]).then((value) {
64+
]).then((void _) {
6565
setState(() {
6666
if (shortcut == 'no action set') {
6767
shortcut = 'actions ready';
@@ -74,7 +74,7 @@ class _MyHomePageState extends State<MyHomePage> {
7474
Widget build(BuildContext context) {
7575
return Scaffold(
7676
appBar: AppBar(
77-
title: Text('$shortcut'),
77+
title: Text(shortcut),
7878
),
7979
body: const Center(
8080
child: Text('On home screen, long press the app icon to '

packages/quick_actions/quick_actions/test/quick_actions_test.dart

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,26 @@ void main() {
2323

2424
test('initialize() PlatformInterface', () async {
2525
const QuickActions quickActions = QuickActions();
26-
QuickActionHandler handler = (type) {};
26+
final QuickActionHandler handler = (String type) {};
2727

2828
await quickActions.initialize(handler);
2929
verify(QuickActionsPlatform.instance.initialize(handler)).called(1);
3030
});
3131

3232
test('setShortcutItems() PlatformInterface', () {
3333
const QuickActions quickActions = QuickActions();
34-
QuickActionHandler handler = (type) {};
34+
final QuickActionHandler handler = (String type) {};
3535
quickActions.initialize(handler);
36-
quickActions.setShortcutItems([]);
36+
quickActions.setShortcutItems(<ShortcutItem>[]);
3737

3838
verify(QuickActionsPlatform.instance.initialize(handler)).called(1);
39-
verify(QuickActionsPlatform.instance.setShortcutItems([])).called(1);
39+
verify(QuickActionsPlatform.instance.setShortcutItems(<ShortcutItem>[]))
40+
.called(1);
4041
});
4142

4243
test('clearShortcutItems() PlatformInterface', () {
4344
const QuickActions quickActions = QuickActions();
44-
QuickActionHandler handler = (type) {};
45+
final QuickActionHandler handler = (String type) {};
4546

4647
quickActions.initialize(handler);
4748
quickActions.clearShortcutItems();
@@ -57,15 +58,15 @@ class MockQuickActionsPlatform extends Mock
5758
implements QuickActionsPlatform {
5859
@override
5960
Future<void> clearShortcutItems() async =>
60-
super.noSuchMethod(Invocation.method(#clearShortcutItems, []));
61+
super.noSuchMethod(Invocation.method(#clearShortcutItems, <Object?>[]));
6162

6263
@override
6364
Future<void> initialize(QuickActionHandler? handler) async =>
64-
super.noSuchMethod(Invocation.method(#initialize, [handler]));
65+
super.noSuchMethod(Invocation.method(#initialize, <Object?>[handler]));
6566

6667
@override
67-
Future<void> setShortcutItems(List<ShortcutItem>? items) async =>
68-
super.noSuchMethod(Invocation.method(#setShortcutItems, [items]));
68+
Future<void> setShortcutItems(List<ShortcutItem>? items) async => super
69+
.noSuchMethod(Invocation.method(#setShortcutItems, <Object?>[items]));
6970
}
7071

7172
class MockQuickActions extends QuickActions {}
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
# 1.0.0
1+
## NEXT
2+
3+
* Updates code for analyzer changes.
4+
5+
## 1.0.0
26

37
* Initial release of quick_actions_platform_interface

packages/quick_actions/quick_actions_platform_interface/lib/method_channel/method_channel_quick_actions.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import 'package:quick_actions_platform_interface/types/types.dart';
99

1010
import '../platform_interface/quick_actions_platform.dart';
1111

12-
final MethodChannel _channel =
12+
const MethodChannel _channel =
1313
MethodChannel('plugins.flutter.io/quick_actions');
1414

1515
/// An implementation of [QuickActionsPlatform] that uses method channels.
@@ -22,7 +22,7 @@ class MethodChannelQuickActions extends QuickActionsPlatform {
2222
Future<void> initialize(QuickActionHandler handler) async {
2323
channel.setMethodCallHandler((MethodCall call) async {
2424
assert(call.method == 'launch');
25-
handler(call.arguments);
25+
handler(call.arguments as String);
2626
});
2727
final String? action =
2828
await channel.invokeMethod<String?>('getLaunchAction');

packages/quick_actions/quick_actions_platform_interface/lib/platform_interface/quick_actions_platform.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ abstract class QuickActionsPlatform extends PlatformInterface {
4040
///
4141
/// Call this once before any further interaction with the plugin.
4242
Future<void> initialize(QuickActionHandler handler) async {
43-
throw UnimplementedError("initialize() has not been implemented.");
43+
throw UnimplementedError('initialize() has not been implemented.');
4444
}
4545

4646
/// Sets the [ShortcutItem]s to become the app's quick actions.
4747
Future<void> setShortcutItems(List<ShortcutItem> items) async {
48-
throw UnimplementedError("setShortcutItems() has not been implemented.");
48+
throw UnimplementedError('setShortcutItems() has not been implemented.');
4949
}
5050

5151
/// Removes all [ShortcutItem]s registered for the app.
5252
Future<void> clearShortcutItems() {
53-
throw UnimplementedError("clearShortcutItems() has not been implemented.");
53+
throw UnimplementedError('clearShortcutItems() has not been implemented.');
5454
}
5555
}

packages/quick_actions/quick_actions_platform_interface/lib/types/quick_action_handler.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
/// Handler for a quick action launch event.
66
///
77
/// The argument [type] corresponds to the [ShortcutItem]'s field.
8-
typedef void QuickActionHandler(String type);
8+
typedef QuickActionHandler = void Function(String type);

packages/quick_actions/quick_actions_platform_interface/test/method_channel_quick_actions_test.dart

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ void main() {
1313
TestWidgetsFlutterBinding.ensureInitialized();
1414

1515
group('$MethodChannelQuickActions', () {
16-
MethodChannelQuickActions quickActions = MethodChannelQuickActions();
16+
final MethodChannelQuickActions quickActions = MethodChannelQuickActions();
1717

1818
final List<MethodCall> log = <MethodCall>[];
1919

@@ -29,9 +29,7 @@ void main() {
2929

3030
group('#initialize', () {
3131
test('passes getLaunchAction on launch method', () {
32-
quickActions.initialize((type) {
33-
'launch';
34-
});
32+
quickActions.initialize((String type) {});
3533

3634
expect(
3735
log,
@@ -59,19 +57,18 @@ void main() {
5957

6058
group('#setShortCutItems', () {
6159
test('passes shortcutItem through channel', () {
62-
quickActions.initialize((type) {
63-
'launch';
64-
});
65-
quickActions.setShortcutItems([
66-
ShortcutItem(type: 'test', localizedTitle: 'title', icon: 'icon.svg')
60+
quickActions.initialize((String type) {});
61+
quickActions.setShortcutItems(<ShortcutItem>[
62+
const ShortcutItem(
63+
type: 'test', localizedTitle: 'title', icon: 'icon.svg')
6764
]);
6865

6966
expect(
7067
log,
7168
<Matcher>[
7269
isMethodCall('getLaunchAction', arguments: null),
73-
isMethodCall('setShortcutItems', arguments: [
74-
{
70+
isMethodCall('setShortcutItems', arguments: <Map<String, String>>[
71+
<String, String>{
7572
'type': 'test',
7673
'localizedTitle': 'title',
7774
'icon': 'icon.svg',
@@ -111,9 +108,7 @@ void main() {
111108

112109
group('#clearShortCutItems', () {
113110
test('send clearShortcutItems through channel', () {
114-
quickActions.initialize((type) {
115-
'launch';
116-
});
111+
quickActions.initialize((String type) {});
117112
quickActions.clearShortcutItems();
118113

119114
expect(

packages/quick_actions/quick_actions_platform_interface/test/quick_actions_platform_interface_test.dart

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import 'package:flutter_test/flutter_test.dart';
66
import 'package:quick_actions_platform_interface/method_channel/method_channel_quick_actions.dart';
77
import 'package:quick_actions_platform_interface/platform_interface/quick_actions_platform.dart';
8+
import 'package:quick_actions_platform_interface/types/types.dart';
89

910
void main() {
1011
TestWidgetsFlutterBinding.ensureInitialized();
@@ -31,11 +32,12 @@ void main() {
3132
'Default implementation of initialize() should throw unimplemented error',
3233
() {
3334
// Arrange
34-
final QuickActionsPlatform = ExtendsQuickActionsPlatform();
35+
final ExtendsQuickActionsPlatform quickActionsPlatform =
36+
ExtendsQuickActionsPlatform();
3537

3638
// Act & Assert
3739
expect(
38-
() => QuickActionsPlatform.initialize((type) {}),
40+
() => quickActionsPlatform.initialize((String type) {}),
3941
throwsUnimplementedError,
4042
);
4143
});
@@ -44,11 +46,12 @@ void main() {
4446
'Default implementation of setShortcutItems() should throw unimplemented error',
4547
() {
4648
// Arrange
47-
final QuickActionsPlatform = ExtendsQuickActionsPlatform();
49+
final ExtendsQuickActionsPlatform quickActionsPlatform =
50+
ExtendsQuickActionsPlatform();
4851

4952
// Act & Assert
5053
expect(
51-
() => QuickActionsPlatform.setShortcutItems([]),
54+
() => quickActionsPlatform.setShortcutItems(<ShortcutItem>[]),
5255
throwsUnimplementedError,
5356
);
5457
});
@@ -57,11 +60,12 @@ void main() {
5760
'Default implementation of clearShortcutItems() should throw unimplemented error',
5861
() {
5962
// Arrange
60-
final QuickActionsPlatform = ExtendsQuickActionsPlatform();
63+
final ExtendsQuickActionsPlatform quickActionsPlatform =
64+
ExtendsQuickActionsPlatform();
6165

6266
// Act & Assert
6367
expect(
64-
() => QuickActionsPlatform.clearShortcutItems(),
68+
() => quickActionsPlatform.clearShortcutItems(),
6569
throwsUnimplementedError,
6670
);
6771
});

packages/url_launcher/url_launcher/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## NEXT
1+
## 6.0.16
22

33
* Moves Android and iOS implementations to federated packages.
44

packages/url_launcher/url_launcher/pubspec.yaml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ description: Flutter plugin for launching a URL. Supports
33
web, phone, SMS, and email schemes.
44
repository: https://github.com/flutter/plugins/tree/master/packages/url_launcher/url_launcher
55
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+url_launcher%22
6-
version: 6.0.15
7-
# Temporarily disable publishing to allow moving Android and iOS
8-
# implementations.
9-
publish_to: none
6+
version: 6.0.16
107

118
environment:
129
sdk: ">=2.14.0 <3.0.0"
@@ -32,11 +29,8 @@ dependencies:
3229
flutter:
3330
sdk: flutter
3431
meta: ^1.3.0
35-
# Temporary path dependencies to allow moving Android and iOS implementations.
36-
url_launcher_android:
37-
path: ../url_launcher_android
38-
url_launcher_ios:
39-
path: ../url_launcher_ios
32+
url_launcher_android: ^6.0.13
33+
url_launcher_ios: ^6.0.13
4034
url_launcher_linux: ^2.0.0
4135
url_launcher_macos: ^2.0.0
4236
url_launcher_platform_interface: ^2.0.3

packages/webview_flutter/webview_flutter_android/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## 2.4.0
22

33
* Adds support for Android's `WebView.loadData` and `WebView.loadDataWithBaseUrl` methods and implements the `loadFile` and `loadHtmlString` methods from the platform interface.
4+
* Updates to webview_flutter_platform_interface version 1.5.2.
45

56
## 2.3.1
67

packages/webview_flutter/webview_flutter_android/example/lib/web_view.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ class WebViewController {
590590
bool? hasNavigationDelegate;
591591
bool? hasProgressTracking;
592592
bool? debuggingEnabled;
593-
WebSetting<String?> userAgent = WebSetting<String?>.absent();
593+
WebSetting<String?> userAgent = const WebSetting<String?>.absent();
594594
bool? zoomEnabled;
595595
if (currentValue.javascriptMode != newValue.javascriptMode) {
596596
javascriptMode = newValue.javascriptMode;

packages/webview_flutter/webview_flutter_android/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ flutter:
1919
dependencies:
2020
flutter:
2121
sdk: flutter
22-
webview_flutter_platform_interface: ^1.5.1
22+
webview_flutter_platform_interface: ^1.5.2
2323

2424
dev_dependencies:
2525
build_runner: ^2.1.4

0 commit comments

Comments
 (0)