Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (25 sloc) 874 Bytes
import 'package:flutter/material.dart';
import 'example-page.dart';
import 'example-model.dart';
void main() => runApp(ExampleApp());
class ExampleApp extends StatefulWidget {
State<StatefulWidget> createState() => _ExampleAppState();
class _ExampleAppState extends State<ExampleApp> {
/// The state of the app. Because it extends [Model], it can inform the [ReactiveWidget]
/// in the [ExamplePage] that it has updated, causing a rerender of the child of the [ReactiveWidget]
ExampleModel model;
void initState() {
/// Create the app state
model = ExampleModel();
Widget build(BuildContext context) => MaterialApp(
title: 'Example',
/// Render the homepage by callig the [ExamplePage] method, passing in the model
home: ExamplePage(model: model),
You can’t perform that action at this time.