mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-26 21:35:49 +08:00
22 lines
410 B
Dart
22 lines
410 B
Dart
import 'package:PiliPlus/utils/platform_utils.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
Widget selectableText(
|
|
String text, {
|
|
TextStyle? style,
|
|
}) {
|
|
if (PlatformUtils.isDesktop) {
|
|
return SelectionArea(
|
|
child: Text(
|
|
style: style,
|
|
text,
|
|
),
|
|
);
|
|
}
|
|
return SelectableText(
|
|
style: style,
|
|
text,
|
|
scrollPhysics: const NeverScrollableScrollPhysics(),
|
|
);
|
|
}
|