Skip to content

Instantly share code, notes, and snippets.

View gazialankus's full-sized avatar

Gazihan Alankus gazialankus

  • Izmir University of Economics
  • Izmir, Turkey
View GitHub Profile
import 'package:flutter/material.dart';
// This example showcases how by using functions instead of StatelessWidgets,
// this can cause bugs when using InheritedWidgets
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(context) {
import 'package:flutter/material.dart';
// This example showcases how extracting widgets into StatelessWidgets
// instead of functions can improve performances, by rebuilding
// only what needs to update when the state changes
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
import 'package:flutter/material.dart';
// This example showcases how, by using functions over classes,
// this _can_ break features such as AnimatedSwitcher
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(context) {