mvu 0.1.0-beta.3 mvu: ^0.1.0-beta.3 copied to clipboard
Model-View-Update implementation on top of Provider.
import 'package:flutter/material.dart';
import 'todo/example.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: HomePage(),
);
}
}
class HomePage extends StatelessWidget {
const HomePage({
Key key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('MVU'),
),
body: ListView(
children: [
Card(
child: ListTile(
title: Text('Todo'),
onTap: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) => MvuExample(),
),
),
),
),
],
),
);
}
}