Skip to content

Instantly share code, notes, and snippets.

View roshakorost's full-sized avatar

Rostyslav roshakorost

View GitHub Profile
@roshakorost
roshakorost / rebuild2.dart
Created July 1, 2020 13:20
Rebuild: using const widgets
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
@override
Widget build(BuildContext context) {
return Scaffold(
body: Parent(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
@roshakorost
roshakorost / rebuild1.dart
Last active July 1, 2020 11:38
Rebuild: everything is rebuild
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
@override
Widget build(BuildContext context) {
return Scaffold(
body: Parent(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [Expanded(child: Sibling()), Expanded(child: Counter(_counter))],