Skip to content

Commit

Permalink
[lint]
Browse files Browse the repository at this point in the history
  • Loading branch information
mym0404 committed Feb 5, 2024
1 parent 0dae058 commit e5a1fe4
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions lib/src/pencil_kit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import '../pencil_kit.dart';

/// Optional callback invoked when a web view is first created. [controller] is
/// the [PencilKitController] for the created pencil kit view.
typedef PencilKitViewCreatedCallback = void Function(PencilKitController controller);
typedef PencilKitViewCreatedCallback = void Function(
PencilKitController controller);

/// PKTool type enum for [PencilKitController.setPKTool]
enum ToolType {
Expand Down Expand Up @@ -176,7 +177,8 @@ class _PencilKitState extends State<PencilKit> {
viewType: 'plugins.mjstudio/flutter_pencil_kit',
creationParamsCodec: const StandardMessageCodec(),
onPlatformViewCreated: _onPencilKitPlatformViewCreated,
hitTestBehavior: widget.hitTestBehavior ?? PlatformViewHitTestBehavior.opaque,
hitTestBehavior:
widget.hitTestBehavior ?? PlatformViewHitTestBehavior.opaque,
);
} else {
return _buildUnAvailable();
Expand All @@ -186,7 +188,8 @@ class _PencilKitState extends State<PencilKit> {

class PencilKitController {
PencilKitController._({required int viewId, required this.widget})
: _channel = MethodChannel('plugins.mjstudio/flutter_pencil_kit_$viewId') {
: _channel =
MethodChannel('plugins.mjstudio/flutter_pencil_kit_$viewId') {
_channel.setMethodCallHandler(
(MethodCall call) async {
if (call.method == 'toolPickerVisibilityDidChange') {
Expand Down Expand Up @@ -295,7 +298,8 @@ class PencilKitController {
/// // handle error
/// }
/// ```
Future<void> loadBase64Data(String base64Data) => _channel.invokeMethod('loadBase64Data', base64Data);
Future<void> loadBase64Data(String base64Data) =>
_channel.invokeMethod('loadBase64Data', base64Data);
/// Set PKTool toolType, width, and color
///
Expand All @@ -307,7 +311,8 @@ class PencilKitController {
/// See also:
///
/// * [ToolType] available tool types
Future<void> setPKTool({required ToolType toolType, double? width, Color? color}) =>
Future<void> setPKTool(
{required ToolType toolType, double? width, Color? color}) =>
_channel.invokeMethod('setPKTool', <String, Object?>{
'toolType': toolType.name,
'width': width,
Expand Down

0 comments on commit e5a1fe4

Please sign in to comment.