import 'package:flutter/services.dart';

/// 剪切板工具类
class ClipboardUtil {
  /// 复制文本到剪切板
  static Future<void> copyToClipboard(String text) async {
    await Clipboard.setData(ClipboardData(text: text));
  }

  /// 从剪切板获取文本
  static Future<String> getClipboardText() async {
    final data = await Clipboard.getData(Clipboard.kTextPlain);
    return data?.text ?? "";
  }
}
