首页
壁纸
关于
Search
1
IObit Uninstaller 注册码
2,119 阅读
2
与元素类型 "application" 相关联的属性 "tools:replace" 的前缀 "tools" 未绑定。
336 阅读
3
常用的开源API记录
181 阅读
4
flutter 隐藏中间省略号
177 阅读
5
诗集收藏•明:陈曦/高启
148 阅读
默认
开发
随记
工具
游戏
番剧
关于猫的随笔
登录
Search
路过的假面骑士
累计撰写
87
篇文章
累计收到
2
条评论
首页
栏目
默认
开发
随记
工具
游戏
番剧
关于猫的随笔
页面
壁纸
关于
搜索到
58
篇与
的结果
2023-02-14
Flutter 使用辅助线
debugPaintSizeEnabled = true; //显示辅助线(开发使用)
2023年02月14日
29 阅读
0 评论
0 点赞
2023-02-10
FLutter 失去键盘输入焦点
import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; getKeyboardLosesFocus(BuildContext context) { SystemChannels.textInput.invokeMapMethod('TextInput.hide'); FocusScope.of(context).unfocus(); }
2023年02月10日
23 阅读
0 评论
0 点赞
2023-02-09
flutter 隐藏中间省略号
class systemOverflowTextCenter extends StatelessWidget { final String text; final Color? color; const systemOverflowTextCenter({Key? key, required this.text, this.color}) : super(key: key); @override Widget build(BuildContext context) { String? overText; overText = text.replaceRange( text.length - (text.length - 4), text.length - 4, '......'); return Text( overText, style: GoogleFonts.notoSans( color: color != null ? color : appColor.white, fontWeight: FontWeight.bold), ); } }
2023年02月09日
177 阅读
0 评论
0 点赞
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 点赞
1
...
5
6
7
...
12