GithubHelp home page GithubHelp logo

Comments (21)

AlexV525 avatar AlexV525 commented on July 26, 2024

Please provide the usage of your code.

from flutter_wechat_assets_picker.

fangshengfy avatar fangshengfy commented on July 26, 2024

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.

fangshengfy avatar fangshengfy commented on July 26, 2024

BottomNavigationBar color from white to black

from flutter_wechat_assets_picker.

fangshengfy avatar fangshengfy commented on July 26, 2024

it‘s ok after Lock screen

from flutter_wechat_assets_picker.

fangshengfy avatar fangshengfy commented on July 26, 2024

test phone is redmi 7

from flutter_wechat_assets_picker.

AlexV525 avatar AlexV525 commented on July 26, 2024

Can you provide a smallest demo to reproduce the issue?

from flutter_wechat_assets_picker.

fangshengfy avatar fangshengfy commented on July 26, 2024

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.

fangshengfy avatar fangshengfy commented on July 26, 2024

lock screen didn't fix it

from flutter_wechat_assets_picker.

AlexV525 avatar AlexV525 commented on July 26, 2024

I didn't found any BottomNavigationBar in here.

Before First Select After Second Select
image image image
image

from flutter_wechat_assets_picker.

fangshengfy avatar fangshengfy commented on July 26, 2024

Screenshot_2020-06-28-19-30-15-505_com example fl

from flutter_wechat_assets_picker.

fangshengfy avatar fangshengfy commented on July 26, 2024

Screenshot_2020-06-28-19-32-38-685_com example fl

from flutter_wechat_assets_picker.

fangshengfy avatar fangshengfy commented on July 26, 2024

because your BottomNavigationBar is black

from flutter_wechat_assets_picker.

AlexV525 avatar AlexV525 commented on July 26, 2024

Cannot reproduce, because the code you have provided starts with a black navigator on my side.

from flutter_wechat_assets_picker.

fangshengfy avatar fangshengfy commented on July 26, 2024

but redme 7 defalut color is white

from flutter_wechat_assets_picker.

AlexV525 avatar AlexV525 commented on July 26, 2024

Oh now it takes effect.

from flutter_wechat_assets_picker.

AlexV525 avatar AlexV525 commented on July 26, 2024

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.

fangshengfy avatar fangshengfy commented on July 26, 2024

Screenshot_2020-06-28-21-27-11-692_com example pr
Screenshot_2020-06-28-21-25-35-463_com example pr

to be honest,it is not a best solution

from flutter_wechat_assets_picker.

AlexV525 avatar AlexV525 commented on July 26, 2024

You can use a light theme to implement your picker, rather than a dark version.

from flutter_wechat_assets_picker.

AlexV525 avatar AlexV525 commented on July 26, 2024

Though, it's not an issue from the picker. :-)

from flutter_wechat_assets_picker.

fangshengfy avatar fangshengfy commented on July 26, 2024
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.

AlexV525 avatar AlexV525 commented on July 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.