Flutter

Flutter is a UI toolkit from Google for mobile, desktop, and web, written in Dart. Widgets are the composition unit; a rebuild propagates when state changes (similar job to React components).

class Counter extends StatefulWidget {
  @override
  State<Counter> createState() => _CounterState();
}

class _CounterState extends State<Counter> {
  int count = 0;

  @override
  Widget build(BuildContext context) {
    return TextButton(
      onPressed: () => setState(() => count++),
      child: Text("$count"),
    );
  }
}

← Back to CS Glossary