GithubHelp home page GithubHelp logo

flutter_in_action_source_code's Introduction

flutter_in_action_source_code's People

Contributors

wendux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flutter_in_action_source_code's Issues

本地语言bug

iOS:1. 设置本地语言为 中文简体,系统回掉 取到的是 美国英文;
2. (系统中文)先设置app为中文环境,重启app,然后选auto,app显示中文,在重启app,又会显示为英文;

Android:1. 系统设置为中文,app中取到的是 zh_Hans_CN,设置auto的话还是显示英文;

localeResolutionCallback:
                (Locale _locale, Iterable<Locale> supportedLocales) {
              if (localeModel.getLocale() != null) {
                //如果已经选定语言,则不跟随系统
                return localeModel.getLocale();
              } else {
                Locale locale;
                //APP语言跟随系统语言,如果系统语言不是中文简体或美国英语,
                //则默认使用美国英语
                print(_locale);
                print(supportedLocales.toList()[0]);
                print(supportedLocales.toList()[1]);
                if (supportedLocales.contains(_locale)) {
                  locale = _locale;
                } else {
                  locale = Locale('en', 'US');
                }
                return locale;
              }
            }

退出登陆,程序崩溃

The following NoSuchMethodError was thrown during performLayout():
The getter 'key' was called on null.
Receiver: null
Tried calling: key

image

空安全问题?

大佬您好,关于此处: User get user => _profile.user;
由于_profile.userUser? 类型的, 所以在get的返回类型中改为了 User?
但当改好后User? get user => _profile.user; 又出现问题提示:The return type of getter 'user' is 'User?' which isn't a subtype of the type 'User' of its setter 'user'.

请问这种该如何解决呢? 谢谢!

github_client_app 在判断用户未登录,如何直接跳转到login页面?

在home_page.dart中,我想在判断用户未登录后,直接跳转到login路由,修改代码如下:
//注释掉原代码中的return,添加 Navigator.of(context).pushNamed("login");
if (!userModel.isLogin) {
Navigator.of(context).pushNamed("login");
// return Center(
// child: RaisedButton(
// child: Text(GmLocalizations.of(context).login),
// onPressed: () => Navigator.of(context).pushNamed("login"),
// ),
// );
}
但由于body部分必须要return一个widget,所以上述代码报错。
请问如果要实现上述意图,代码如何操作,谢谢?

登录不了

是用真实账号登录么 用自己的登录不了啊

登录报错

报错位置
lib/common/git_api.dart
报错方法

// 登录接口,登录成功后返回用户信息
Future login(String login, String pwd) async {

}

打印的日志

login e:DioError [DioErrorType.RESPONSE]: Http status error [404]

实战报错

Configure project :path_provider

Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':path_provider'.

Could not resolve all artifacts for configuration ':path_provider:classpath'.
Could not download guava.jar (com.google.guava:guava:26.0-jre)
> Could not get resource 'https://jcenter.bintray.com/com/google/guava/guava/26.0-jre/guava-26.0-jre.jar'.
> Read timed out
Could not download kotlin-reflect.jar (org.jetbrains.kotlin:kotlin-reflect:1.3.11)
> Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-reflect/1.3.11/kotlin-reflect-1.3.11.jar'.
> Read timed out
Could not download kotlin-stdlib.jar (org.jetbrains.kotlin:kotlin-stdlib:1.3.11)
> Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib/1.3.11/kotlin-stdlib-1.3.11.jar'.
> Read timed out

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 47s
Command: D:\worker\android\github_client_app\android\gradlew.bat app:properties

Finished with error: Please review your Gradle project setup in the android/ folder.

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.