Created
April 26, 2020 14:34
-
-
Save IhwanID/4c043a9533f00e1ecbd06c994238597c to your computer and use it in GitHub Desktop.
Bloc Provider
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/material.dart'; | |
| import 'package:flutter_bloc/flutter_bloc.dart'; | |
| import 'package:pinjollist/bloc/bloc.dart'; | |
| import 'package:pinjollist/ui/companies_screen.dart'; | |
| void main() { | |
| runApp(BlocProvider<CompanyBloc>( | |
| create: (context) => CompanyBloc(), | |
| child: MyApp(), | |
| )); | |
| } | |
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| title: 'Pinjollist', | |
| theme: ThemeData( | |
| primarySwatch: Colors.blue, | |
| canvasColor: Colors.transparent, | |
| ), | |
| home: CompaniesScreen(), | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment