lesnitsky / howtodothisinflutter Goto Github PK
View Code? Open in Web Editor NEW📄Flutter cheat sheet
License: MIT License
📄Flutter cheat sheet
License: MIT License
You use 'type' in a few places like
type State = { yada:yada };
I don't recognize the type keyword in vanilla JavaScript. Is this a Babel feature? If so, can we put that in the explanations? If not, maybe change it to a const?
In Flutter, stateless component does not have state so it makes sense to change PureComponent
to Stateless Component
So this
import React from 'react';
type Props = {
name: string,
};
class Greeter extends React.PureComponent<Props, {}> {
render() {
return (
<View>
<Text>Hello, {this.props.name}</Text>
</View>
);
}
}
becomes
import React from 'react';
type Props = {
name: string,
};
const Greeter = props => (
<View>
<Text>Hello, {props.name}</Text>
</View>
);
What do you think?
It confused me which website I was opening as you have used Flutter's logo.
I think it makes sense to change to anything else than that. But I understand it might not be a priority :)
json encoding and decoding is famously complicated in flutter because runtime reflection is disabled, so it'd be good to give readers an indication of their different options—similar to how this page works—in order to avoid a situation where someone expects that json is plug-and-play, but then realizes that things are more complicated than they expected.
@lesnitsky I like the Check if dev snippet.
Sadly lint isn't happy about it.
And as I'm pretty new to dart I'm not sure what to do^^
The function assert should have a return type but doesn't.
Try adding a return type to the function.dart(always_declare_return_types)
Type annotate public APIs.dart(type_annotate_public_apis)
Expected an identifier.dart(missing_identifier)
and it thinks (isDev = true)
is a named parameter
Named parameters must be enclosed in curly braces ('{' and '}').
Try surrounding the named parameters in curly braces.dart(named_parameter_outside_group)
and the last one
A function body must be provided.
Try adding a function body.dart(missing_function_body)
I'm actually not really in need for this, just curious. So it's no urgent issue.
final newItems = items.addAll(otherItems);
should be final newItems = items..addAll(otherItems);
It is written with 2 dots in recipes/array.md
but on the website, it only shows 1 dot.
I am not sure if it works in Flutter as it doesn't work on DartPad.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.