Comments (21)
Please provide the usage of your code.
from flutter_wechat_assets_picker.
Please provide the usage of your code.
action(String name) async {
if (name == '相册') {
final List<AssetEntity> assets = await AssetPicker.pickAssets(context);
} else if (name == '拍摄') {
File file = await Navigator.push(
context,
MaterialPageRoute(
builder: (context) => Camera(mode: CameraMode.fullscreen)));
} else{
}
}
from flutter_wechat_assets_picker.
BottomNavigationBar color from white to black
from flutter_wechat_assets_picker.
it‘s ok after Lock screen
from flutter_wechat_assets_picker.
test phone is redmi 7
from flutter_wechat_assets_picker.
Can you provide a smallest demo to reproduce the issue?
from flutter_wechat_assets_picker.
Can you provide a smallest demo to reproduce the issue?
import 'package:flutter/material.dart';
import 'package:wechat_assets_picker/wechat_assets_picker.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(),
floatingActionButton: FloatingActionButton(
onPressed: ()async{
final List<AssetEntity> assets = await AssetPicker.pickAssets(context);
},
tooltip: 'Increment',
child: Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}
from flutter_wechat_assets_picker.
lock screen didn't fix it
from flutter_wechat_assets_picker.
I didn't found any BottomNavigationBar
in here.
Before | First Select | After | Second Select |
---|---|---|---|
from flutter_wechat_assets_picker.
from flutter_wechat_assets_picker.
from flutter_wechat_assets_picker.
because your BottomNavigationBar is black
from flutter_wechat_assets_picker.
Cannot reproduce, because the code you have provided starts with a black navigator on my side.
from flutter_wechat_assets_picker.
but redme 7 defalut color is white
from flutter_wechat_assets_picker.
Oh now it takes effect.
from flutter_wechat_assets_picker.
Finish investigation, ref flutter/40590 .
Add below line into the main
method which will be:
void main() {
runApp(MyApp());
WidgetsBinding.instance.renderView.automaticSystemUiAdjustment = false;
}
from flutter_wechat_assets_picker.
to be honest,it is not a best solution
from flutter_wechat_assets_picker.
You can use a light theme to implement your picker, rather than a dark version.
from flutter_wechat_assets_picker.
Though, it's not an issue from the picker. :-)
from flutter_wechat_assets_picker.
void main() {
WidgetsBinding.instance.renderView.automaticSystemUiAdjustment = false;
runApp(createApp());
}
Color barColor;
@override
initState() {
super.initState();
FlutterStatusbarcolor.getNavigationBarColor().then((value) {
if(value!=null)
barColor = value;
});
}
if(barColor!=null){
//android
if(barColor.value==Colors.white.value){
//底部为白色
await FlutterStatusbarcolor.setNavigationBarColor(Colors.black);
await FlutterStatusbarcolor.setNavigationBarWhiteForeground(true);
//状态栏的前景色需要区别,我的状态栏是白底黑字
await FlutterStatusbarcolor.setStatusBarWhiteForeground(true);
final List<AssetEntity> assets = await AssetPicker.pickAssets(context);
//状态栏的前景色需要区别,我的状态栏是白底黑字
await FlutterStatusbarcolor.setStatusBarWhiteForeground(false);
await FlutterStatusbarcolor.setNavigationBarColor(barColor);
await FlutterStatusbarcolor.setNavigationBarWhiteForeground(false);
}else{
//底部为黑色
await FlutterStatusbarcolor.setNavigationBarColor(Colors.white);
await FlutterStatusbarcolor.setNavigationBarWhiteForeground(false);
//状态栏的前景色需要区别
await FlutterStatusbarcolor.setStatusBarWhiteForeground(true);
final List<AssetEntity> assets = await AssetPicker.pickAssets(context);
//状态栏的前景色需要区别
await FlutterStatusbarcolor.setStatusBarWhiteForeground(false);
await FlutterStatusbarcolor.setNavigationBarColor(barColor);
await FlutterStatusbarcolor.setNavigationBarWhiteForeground(true);
}
}else{
//ios或回调未完成
await FlutterStatusbarcolor.setStatusBarWhiteForeground(true);
final List<AssetEntity> assets = await AssetPicker.pickAssets(context);
//状态栏的前景色需要区别,我的状态栏是白底黑字
await FlutterStatusbarcolor.setStatusBarWhiteForeground(false);
}
it is my current solution
from flutter_wechat_assets_picker.
The pickerTheme
property provided the ability to set the brightness to the status bar and the navigation bar.
Locking this until the official one is resolved.
from flutter_wechat_assets_picker.
Related Issues (20)
- 一加ACEP 16G运行内存,3万多张图片,加载了6-7秒出来网格 HOT 1
- [BUG] Type 'DecoderCallback' not found. HOT 3
- [BUG] Assets not visible error HOT 3
- [BUG] Error with something HOT 2
- [Feature] Make the demo app (APK) available for quick testing
- Error: 'DecoderCallback' isn't a type. DecoderCallback decode,
- 预览选中的图片会默认预览相册中的第一张图
- [Feature] faster loading of large photo library on iOS HOT 1
- 在MIUI 14.0.28 调起AssetPicker.pickAssets 报错 HOT 1
- [BUG] 图片和视频的预览功能的请求 HOT 8
- [Feature] Pick Asset from Google Drive HOT 1
- Error: Type 'DecoderCallback' not found. HOT 1
- [Feature] 能否像微信选择资源时一样,如果选视频,只能选一个,如果选图片,最多选9个
- [BUG] Permission State error from permission not requested HOT 4
- [BUG] Error with something
- [BUG] 手机相册为空时,无法进行拍照 HOT 3
- [BUG] 部分机型读取图片列表加载过慢,8600多个图片,加载总耗时30S HOT 1
- [BUG] I am getting FullSizeRender image name. HOT 1
- [BUG] Permission state error with PermissionState.denied on Android 13 HOT 3
- [BUG] Error with something : file:///Users/jintian/.pub-cache/hosted/pub.flutter-io.cn/photo_manager-3.0.0-dev.5/android/src/main/kotlin/com/fluttercandies/photo_manager/core/PhotoManager.kt:14:52 Unresolved reference: AndroidQDBUtils e: file:///Users/jintian/.pub-cache/hosted/pub.flutter-io.cn/photo_manager-3.0.0-dev.5/android/src/main/kotlin/com/fluttercandies/photo_manager/core/PhotoManager.kt:16:52 Unresolved reference: DBUtils e: file:///Users/jintian/.pub-cache/hosted/pub.flutter-io.cn/photo_manager-3.0.0-dev.5/android/src/main/kotlin/com/fluttercandies/photo_manager/core/PhotoManager.kt:36:84 Unresolved reference: DBUtils e: file:///Users/jintian/.pub-cache/hosted/pub.flutter-io.cn/photo_manager-3.0.0-dev.5/android/src/main/kotlin/com/fluttercandies/photo_manager/core/PhotoManager.kt:37:18 Unresolved reference: AndroidQDBUtils HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_wechat_assets_picker.