Giter VIP home page Giter VIP logo

carguo / gsy_flutter_book Goto Github PK

View Code? Open in Web Editor NEW
4.1K 4.1K 542.0 147.58 MB

Flutter 完整开发实战详解系列,提供在线预览和pdf下载,本系列将完整讲述:如何快速从 0 开发一个完整的 Flutter APP,配套高完成度 Flutter 开源项目 GSYGithubAppFlutter ,同时会提供一些Flutter的开发细节技巧,之后深入源码和实战为你全面解析 Flutter 。

Home Page: https://juejin.im/user/582aca2ba22b9d006b59ae68/posts

License: MIT License

flutter flutter-book flutter-demo flutter-learn gitbook

gsy_flutter_book's Issues

.DS_Store

写的很好,谢谢分享,建议删除 .DS_Store

3.1的代码,之后几个也一样,没跑起来会报错,对新人有点不友好

For Example:
`import 'package:flutter/material.dart';

class DEMOWidget extends StatelessWidget {
final String text;

//数据可以通过构造方法传递进来
DEMOWidget(this.text);

@OverRide
Widget build(BuildContext context) {
//这里返回你需要的控件
//这里末尾有没有的逗号,对于格式化代码而已是不一样的。
return Container(
//白色背景
color: Colors.white,
//Dart语法中,?? 表示如果text为空,就返回尾号后的内容。
child: Text(text ?? "这就是无状态DMEO"),
);
}
}`

这段直接粘贴到main.dart 里加上void main 要报错,我改成了这个
`import 'package:flutter/material.dart';

String text = "这就是无状态Demo";
void main() => runApp(new DEMOWidget(text));

class DEMOWidget extends StatelessWidget {
final String text;

DEMOWidget(this.text);
@OverRide
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Welcome to Flutter',
home: new Scaffold(
appBar: new AppBar(
title: new Text('Welcome to Flutter'),
),
body: new Container(
//白色背景
color: Colors.white,
//Dart语法中,?? 表示如果text为空,就返回尾号后的内容。
child: Text(text ?? "这就是无状态DMEO"),
),
),
);
}
}
`

就是有一点没看明白,text在这个类里面是必须赋值的,为什么
child: Text(text ?? "这就是无状态DMEO"),
要这样写,小弟求解答

hybrid 问题请教

猫哥好,在掘金上看到你的文章来的,我现在想使用Android 原生的editText 在flutter中,然后不知道怎么消失掉键盘,我看你文章中提到了解决你困扰你的键盘问题,想请教下我如何在editText失去焦点的时候将键盘关掉呢?

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.