首页
壁纸
关于
Search
1
IObit Uninstaller 注册码
2,122 阅读
2
与元素类型 "application" 相关联的属性 "tools:replace" 的前缀 "tools" 未绑定。
336 阅读
3
常用的开源API记录
181 阅读
4
flutter 隐藏中间省略号
177 阅读
5
诗集收藏•明:陈曦/高启
148 阅读
默认
开发
随记
工具
游戏
番剧
关于猫的随笔
登录
Search
路过的假面骑士
累计撰写
87
篇文章
累计收到
2
条评论
首页
栏目
默认
开发
随记
工具
游戏
番剧
关于猫的随笔
页面
壁纸
关于
搜索到
87
篇与
的结果
2023-02-07
Flutter 输入组件模板
class comInput extends StatelessWidget { final TextEditingController controller; final List<TextInputFormatter>? inputFormatters; final String hintText; final Widget? prewidget; final Widget? suffwidget; final TextInputType? keyType; final bool? readOnly; final bool? obscureText; const comInput( {super.key, required this.controller, this.inputFormatters, required this.hintText, this.prewidget, this.suffwidget, this.keyType, this.readOnly = false, this.obscureText = false}); @override Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.only(left: 18, right: 18), child: TextFormField( controller: controller, onEditingComplete: () { FocusScope.of(context).unfocus(); }, keyboardType: keyType != null ? keyType : TextInputType.number, textInputAction: TextInputAction.done, readOnly: readOnly!, obscureText: obscureText!, obscuringCharacter: '⁙', inputFormatters: inputFormatters != null ? inputFormatters : [ LengthLimitingTextInputFormatter(50), FilteringTextInputFormatter.allow(RegExp("[0-9.]")) ], cursorColor: colorController.buttom.value.withOpacity(0.5), decoration: InputDecoration( contentPadding: EdgeInsets.all(12.0), focusedErrorBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(12), borderSide: BorderSide(color: Colors.red, width: 2)), focusedBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(12), borderSide: BorderSide(color: colorController.buttom.value, width: 2)), hintText: hintText, hintStyle: GoogleFonts.notoSans( color: getIsDark(context) == true ? appColor.white.withOpacity(0.8) : appColor.black.withOpacity(0.3)), prefixIcon: prewidget != null ? Padding( padding: const EdgeInsets.only(left: 6, right: 6), child: prewidget, ) : SizedBox(), suffixIcon: suffwidget != null ? Padding( padding: const EdgeInsets.only(left: 6, right: 6), child: suffwidget, ) : SizedBox(), suffixIconConstraints: BoxConstraints( maxHeight: 30, maxWidth: 40, ), prefixIconConstraints: BoxConstraints( maxHeight: 30, maxWidth: 40, ), border: OutlineInputBorder( borderRadius: BorderRadius.circular(12), ), )), ); } }
2023年02月07日
30 阅读
0 评论
0 点赞
2022-12-23
记录一些正则匹配
String urlRegExp = r'(?:(?:https?|ftp)://)?[\w/-?=%.]+.[\w/-?=%.]+';String hashtagRegExp = r'(#+[a-zA-Z0-9(_)]{1,})';String userTagRegExp = r'(?<![\w@])@([\w@]+(?:.!+)*)';String emailRegExp =r"([a-zA-Z0-9.a-zA-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[a-zA-Z0-9]+\.[a-zA-Z]+)";
2022年12月23日
17 阅读
0 评论
0 点赞
2022-12-14
VSCODE开发环境配置之Flutter环境配置
1.官网下载VScode(https://code.visualstudio.com/)2.安装完成后,打开插件中心,搜索对应语言插件(如chinese,japanese)3.安装flutter插件(其他两个也一并安装),同时会提醒你安装dart插件4.安装git(官网:https://git-scm.com/)5.拉取项目如果是windows11,随便选择一个磁盘,鼠标右键,选择“在终端中打开”,接着输入(直接复制粘贴)“git clone 项目地址”,敲下回车,就会开始拉取项目了这表示拉取完成6.使用VScode打开刚才拉取下来的项目,开始开发
2022年12月14日
40 阅读
0 评论
0 点赞
2022-12-13
JetBrains激活服务器地址
JetBrains激活服务器地址:http://jetbrains-lic.novx.org激活码发布页:https://novx.org/jetbrains
2022年12月13日
65 阅读
0 评论
0 点赞
2022-12-11
Flutter开发记录:输入框
import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:wormhole_jp/style/color.dart'; class comSystemInput extends StatelessWidget { final TextEditingController textEditingController; final String hintText; final Widget prefixIcon; final Widget? suffixIcon; final bool? readOnly; const comSystemInput( {super.key, required this.textEditingController, required this.hintText, required this.prefixIcon, this.suffixIcon, this.readOnly}); @override Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.only(left: 12, right: 12), child: TextFormField( controller: textEditingController, onEditingComplete: () { FocusScope.of(context).unfocus(); }, inputFormatters: [ LengthLimitingTextInputFormatter(50), FilteringTextInputFormatter.allow(RegExp("[0-9.]")) ], keyboardType: TextInputType.number, textInputAction: TextInputAction.done, readOnly: readOnly != null ? readOnly! : false, enableInteractiveSelection: false, enableIMEPersonalizedLearning: false, toolbarOptions: ToolbarOptions( copy: true, cut: true, paste: true, selectAll: true, ), decoration: InputDecoration( focusedErrorBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(12), borderSide: BorderSide(color: Colors.red, width: 2)), focusedBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(12), borderSide: BorderSide(color: appColor.buttom, width: 2)), hintText: hintText, hintStyle: GoogleFonts.notoSans(color: appColor.black.withOpacity(0.3)), prefixIcon: prefixIcon, suffixIcon: suffixIcon != null ? suffixIcon : null, suffixIconConstraints: BoxConstraints( maxHeight: 35, maxWidth: 43, ), border: OutlineInputBorder( borderRadius: BorderRadius.circular(12), borderSide: BorderSide(color: appColor.black.withOpacity(0.5))), ), ), ); } }
2022年12月11日
12 阅读
0 评论
0 点赞
1
...
6
7
8
...
18