flustars
flustars copied to clipboard
🔥🔥🔥 Flutter common utils library. SpUtil, ScreenUtil,WidgetUtil. 也许是目前最好用的SharedPreferences工具类。WidgetUtil 获取图片尺寸宽高, View尺寸&在屏幕上的坐标。
经测,在小米K40 Pro+手机(MIUI 13.0.5, Android 12)上,如使用Release模式运行:flutter run --release screenWidth, screenHeight, statusBarHeight, bottomBarHeight, appBarHeight等基础属性全为0,间接导致几乎所有方法均返回为0,如getSp
../../../appdev/flutter/.pub-cache/hosted/pub.dartlang.org/flustars-2.0.1/lib/src/widget_util.dart:26:20: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null. - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../appdev/flutter/packages/flutter/lib/src/widgets/binding.dart'). WidgetsBinding.instance?.addPostFrameCallback((Duration timeStamp) { ^ ../../../appdev/flutter/.pub-cache/hosted/pub.dartlang.org/flustars-2.0.1/lib/src/widget_util.dart:44:20: Warning: Operand of null-aware operation '?.'...
我用ScreenUtil获取的宽高不准确,具体代码如下:  获取了appBar的高度作为shouMenu的top,但是实际位置不对:  ScreenUtil没做其他任何初始化。是我用的有问题吗?还是有什么其他问题呢?求解答下,多谢了
After executing `flutter pub outdated` 
E/flutter: [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/shared_preferences) D/: addLayerName, tid:1690 W/InputMethodManager: startInputReason = 1 D/: addLayerName, tid:1690 E/ion: ioctl c0044901 failed with code -1:...
十六进制->RGB RGB->十六进制
Add android camera yuv420 to jpg format image.
_bottomBarHeight = mediaQuery.padding.bottom; 应该为 _bottomBarHeight = kBottomNavigationBarHeight;