Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Apply feedback from PR
Browse files Browse the repository at this point in the history
  • Loading branch information
mvanbeusekom committed Feb 8, 2022
1 parent 0c507df commit a45e70c
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 24 deletions.
2 changes: 1 addition & 1 deletion packages/quick_actions/quick_actions_ios/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# quick\_actions\_ios

The Android implementation of [`quick_actions`][1].
The iOS implementation of [`quick_actions`][1].

## Usage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// @dart = 2.9
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:quick_actions_ios/quick_actions_ios.dart';
Expand All @@ -12,7 +11,7 @@ void main() {

testWidgets('Can set shortcuts', (WidgetTester tester) async {
final QuickActionsIos quickActions = QuickActionsIos();
await quickActions.initialize(null);
await quickActions.initialize((String value){});

const ShortcutItem shortCutItem = ShortcutItem(
type: 'action_one',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,11 @@ class _MyHomePageState extends State<MyHomePage> {
});

quickActions.setShortcutItems(<ShortcutItem>[
// NOTE: This first action icon will only work on iOS.
// In a real world project keep the same file name for both platforms.
const ShortcutItem(
type: 'action_one',
localizedTitle: 'Action one',
icon: 'AppIcon',
),
// NOTE: This second action icon will only work on Android.
// In a real world project keep the same file name for both platforms.
const ShortcutItem(
type: 'action_two',
localizedTitle: 'Action two',
icon: 'ic_launcher'),
]).then((void _) {
setState(() {
if (shortcut == 'no action set') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,17 @@ dependencies:
sdk: flutter
quick_actions_ios:
# When depending on this package from a real application you should use:
# quick_actions: ^x.y.z
# quick_actions_ios: ^x.y.z
# See https://dart.dev/tools/pub/dependencies#version-constraints
# The example app is bundled with the plugin so we use a path dependency on
# the parent directory to use the current plugin's version.
path: ../

dev_dependencies:
espresso: ^0.1.0+2
flutter_driver:
sdk: flutter
integration_test:
sdk: flutter
pedantic: ^1.10.0

flutter:
uses-material-design: true
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// @dart=2.9

import 'package:integration_test/integration_test_driver.dart';

Future<void> main() => integrationDriver();
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#import "FLTQuickActionsPlugin.h"

static NSString *const CHANNEL_NAME = @"plugins.flutter.io/quick_actions_ios";
static NSString *const kChannelName = @"plugins.flutter.io/quick_actions_ios";

@interface FLTQuickActionsPlugin ()
@property(nonatomic, retain) FlutterMethodChannel *channel;
Expand All @@ -15,7 +15,7 @@ @implementation FLTQuickActionsPlugin

+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar {
FlutterMethodChannel *channel =
[FlutterMethodChannel methodChannelWithName:CHANNEL_NAME
[FlutterMethodChannel methodChannelWithName:kChannelName
binaryMessenger:[registrar messenger]];
FLTQuickActionsPlugin *instance = [[FLTQuickActionsPlugin alloc] init];
instance.channel = channel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export 'package:quick_actions_platform_interface/types/types.dart';
const MethodChannel _channel =
MethodChannel('plugins.flutter.io/quick_actions_ios');

/// An implementation of [QuickActionsPlatform] that for iOS.
/// An implementation of [QuickActionsPlatform] for iOS.
class QuickActionsIos extends QuickActionsPlatform {
/// Registers this class as the default instance of [QuickActionsPlatform].
static void registerWith() {
Expand Down
1 change: 0 additions & 1 deletion packages/quick_actions/quick_actions_ios/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,5 @@ dev_dependencies:
integration_test:
sdk: flutter
mockito: ^5.0.0
pedantic: ^1.11.0
plugin_platform_interface: ^2.1.2

4 changes: 0 additions & 4 deletions script/configs/exclude_all_plugins_app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,3 @@

# This is a permament entry, as it should never be a direct app dependency.
- plugin_platform_interface
# TODO(mvanbeusekom): Remove the exclusion of the quick_actions_ios once the
# native implementation is removed from the quick_actions
# package.
- quick_actions_ios

0 comments on commit a45e70c

Please sign in to comment.