Skip to content

Commit

Permalink
chore: use abstract final instead of private constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
EchoEllet committed Nov 17, 2024
1 parent 0b9b59e commit 65f64d8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
4 changes: 1 addition & 3 deletions lib/src/common/utils/widgets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ import 'package:flutter/material.dart';
typedef WidgetWrapper = Widget Function(Widget child);

/// Provides utiulity widgets.
class UtilityWidgets {
const UtilityWidgets._();

abstract final class UtilityWidgets {
/// Conditionally wraps the [child] with [Tooltip] widget if [message]
/// is not null and not empty.
static Widget maybeTooltip({
Expand Down
4 changes: 1 addition & 3 deletions lib/src/editor/widgets/text/utils/text_block_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ typedef LeadingBlockIndentWidth = HorizontalSpacing Function(
typedef LeadingBlockNumberPointWidth = double Function(
double fontSize, int count);

class TextBlockUtils {
TextBlockUtils._();

abstract final class TextBlockUtils {
/// Get the horizontalSpacing using the default
/// implementation provided by [Flutter Quill]
static HorizontalSpacing defaultIndentWidthBuilder(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import 'clipboard_service.dart';
import 'default_clipboard_service.dart';

@experimental
class ClipboardServiceProvider {
ClipboardServiceProvider._();
abstract final class ClipboardServiceProvider {
static ClipboardService _instance = DefaultClipboardService();

static ClipboardService get instance => _instance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import 'copy_cut_service.dart';
import 'default_copy_cut_service.dart';

@immutable
class CopyCutServiceProvider {
const CopyCutServiceProvider._();
abstract final class CopyCutServiceProvider {
static CopyCutService _instance = DefaultCopyCutService();

static CopyCutService get instance => _instance;
Expand Down

0 comments on commit 65f64d8

Please sign in to comment.