flustars icon indicating copy to clipboard operation
flustars copied to clipboard

🔥🔥🔥 Flutter common utils library. SpUtil, ScreenUtil,WidgetUtil. 也许是目前最好用的SharedPreferences工具类。WidgetUtil 获取图片尺寸宽高, View尺寸&在屏幕上的坐标。

Results 15 flustars issues
Sort by recently updated
recently updated
newest added

经测,在小米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获取的宽高不准确,具体代码如下: ![image](https://user-images.githubusercontent.com/7465355/143853490-fdf61795-058a-4c99-a13d-476d72706afb.png) 获取了appBar的高度作为shouMenu的top,但是实际位置不对: ![image](https://user-images.githubusercontent.com/7465355/143853748-749a36b4-b33b-4642-8787-75efd87df3bf.png) ScreenUtil没做其他任何初始化。是我用的有问题吗?还是有什么其他问题呢?求解答下,多谢了

After executing `flutter pub outdated` ![image](https://user-images.githubusercontent.com/14133753/142975385-92dbd946-b94a-4775-bf3c-7e1fceb0e088.png)

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:...

Add android camera yuv420 to jpg format image.

_bottomBarHeight = mediaQuery.padding.bottom; 应该为 _bottomBarHeight = kBottomNavigationBarHeight;