v1.0.0url_textformfield
专为输入 URL 设计的文本框,支持在输入内容的开头和结尾添加前缀和后缀文本
1喜欢 8近 30 天下载150Pub 分数
AndroidiOSWebmacOSWindowsLinux
sivaprasadnk/url_textformfield open-source repository details.
{"sdk":"flutter"}{"sdk":"flutter"}^2.0.0以下为英文项目原文快照,最新内容请访问 GitHub。
Textformfield designed for inputing urls, with options to add leading and trailing text, appended at begining and end of input
Add this to your package's pubspec.yaml file
dependencies:
url_textformfield: ^1.0.0
First, you just have to import the package using:
import 'package:url_textformfield/url_textformfield.dart';
Then , use the widget as below,
@override
Widget build(BuildContext context) {
return UrlTextFormField(
focusNode: ctrlFocusNode,
padding: const EdgeInsets.all(10),
onChanged: (val) {},
leadingText: 'https://',
suffixIcon: const Icon(
Icons.check,
color: Colors.green,
),
trailingText: ".com",
);
screenshot
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.