moor_flutter 4.1.0 moor_flutter: ^4.1.0 copied to clipboard
Flutter implementation of moor, a safe and reactive persistence library for Dart applications
import 'package:flutter/material.dart';
import 'package:moor_example/bloc.dart';
import 'package:provider/provider.dart';
import 'widgets/homescreen.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Provider<TodoAppBloc>(
create: (_) => TodoAppBloc(),
dispose: (_, bloc) => bloc.close(),
child: MaterialApp(
title: 'moor Demo',
theme: ThemeData(
primarySwatch: Colors.orange,
typography: Typography.material2018(),
),
home: HomeScreen(),
),
);
}
}