copy text to clipboard

Clipboard.setData(ClipboardData(text: string));

since Flutter1.9, you can use SelectableText, it enable the copy feature.

get text from clipboard

final clipboardData = await Clipboard.getData(Clipboard.kTextPlain);
String content = clipboardData.text;

close the keyboard

// Flutter v1.7.8+hotfix.2
FocusScope.of(context).unfocus();

// Before
FocusScope.of(context).requestFocus(FocusNode());

fix issue ListView inside ListView

add code as follow in the nested ListView

shrinkWrap: true,
physics: ClampingScrollPhysics(),

transparent appbar

Scaffold(
  extendBodyBehindAppBar: true,
  appBar: AppBar(
    backgroundColor: Colors.transparent,
    elevation: 0,
    ....
  )
)

hide the back button in the appbar

AppBar(
  automaticallyImplyLeading: false,
)

To be continue

Everything will be alright because of you.

相关文章:

  • 2022-12-23
  • 2021-11-28
  • 2022-12-23
  • 2022-03-07
猜你喜欢
  • 2021-07-01
  • 2021-11-26
  • 2021-09-13
  • 2022-01-20
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案