Skip to content

Commit

Permalink
fix: analyze
Browse files Browse the repository at this point in the history
  • Loading branch information
ttypic committed Oct 8, 2024
1 parent d41e3f6 commit b267b4e
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 16 deletions.
4 changes: 0 additions & 4 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ linter:
rules:
- always_declare_return_types
- always_put_required_named_parameters_first
- always_require_non_null_named_parameters
- always_use_package_imports
- avoid_bool_literals_in_conditional_expressions
- avoid_catches_without_on_clauses
Expand All @@ -44,8 +43,6 @@ linter:
- avoid_relative_lib_imports
- avoid_renaming_method_parameters
- avoid_return_types_on_setters
- avoid_returning_null
- avoid_returning_null_for_future
- avoid_returning_null_for_void
- avoid_returning_this
- avoid_setters_without_getters
Expand All @@ -66,7 +63,6 @@ linter:
- do_not_use_environment
- empty_constructor_bodies
- hash_and_equals
- invariant_booleans
- join_return_with_assignment
- leading_newlines_in_multiline_strings
- lines_longer_than_80_chars
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class PushNotificationsReceivedSliver extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
const Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: const [
children: [
Text(
'Received messages',
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ class PushNotificationsSliver extends StatelessWidget {
],
);

Widget buildSummaryText() => Column(
children: const [
Widget buildSummaryText() => const Column(
children: [
Text(
'Activate your device, view your local device information, '
'subscribe to a push channel with either your device or '
Expand Down
4 changes: 2 additions & 2 deletions example/lib/ui/realtime_sliver.dart
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ class RealtimeSliver extends HookWidget {
),
PaginatedResultViewer<ably.Message>(
title: 'History',
subtitle: Column(
children: const [
subtitle: const Column(
children: [
TextRow(
'Hint',
'Use realtime history as a way to get messages that were'
Expand Down
2 changes: 0 additions & 2 deletions lib/src/platform/src/codec.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import 'dart:io' as io show Platform;
import 'dart:typed_data';
import 'package:ably_flutter/ably_flutter.dart';
import 'package:ably_flutter/src/platform/platform_internal.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';

/// @nodoc
Expand Down
6 changes: 4 additions & 2 deletions test/ably_flutter_plugin_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ void main() {
const _nativeLibraryVersion = '1.1.0';

setUp(() {
channel.setMockMethodCallHandler((methodCall) async {
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(channel, (methodCall) async {
switch (methodCall.method) {
case PlatformMethod.resetAblyClients:
return true;
Expand All @@ -39,7 +40,8 @@ void main() {
});

tearDown(() {
channel.setMockMethodCallHandler(null);
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(channel, null);
});

test(PlatformMethod.getPlatformVersion, () async {
Expand Down
4 changes: 2 additions & 2 deletions test/mock_method_call_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class MockMethodCallManager {
MockMethodCallManager() {
final channel =
MethodChannel('io.ably.flutter.plugin', StandardMethodCodec(Codec()));
TestDefaultBinaryMessengerBinding.instance!.defaultBinaryMessenger
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(channel, handler);
Platform(methodChannel: channel);
}
Expand All @@ -25,7 +25,7 @@ class MockMethodCallManager {
handleCounter = 0;
final channel =
MethodChannel('io.ably.flutter.plugin', StandardMethodCodec(Codec()));
TestDefaultBinaryMessengerBinding.instance!.defaultBinaryMessenger
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(channel, handler);
Platform(methodChannel: channel);
}
Expand Down

0 comments on commit b267b4e

Please sign in to comment.