Created
December 14, 2019 16:45
-
-
Save rrifafauzikomara/160ed00e9e136f7cf01db9cf6f704a39 to your computer and use it in GitHub Desktop.
This file contains 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_modularization/ui/detail_page.dart'; | |
import 'package:flutter_modularization/widget/card_list_movie.dart'; | |
import 'package:flutter_modularization/widget/chip_genre_movie.dart'; | |
import 'package:network/network.dart'; | |
import 'package:bloc/bloc.dart'; | |
class HomePage extends StatefulWidget { | |
final String title; | |
const HomePage({Key key, this.title}) : super(key: key); | |
@override | |
_HomePageState createState() => _HomePageState(); | |
} | |
class _HomePageState extends State<HomePage> { | |
final bloc = MovieListBloc(); | |
@override | |
void initState() { | |
super.initState(); | |
bloc.fetchAllMovie(); | |
} | |
@override | |
void dispose() { | |
bloc.dispose(); | |
super.dispose(); | |
} | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
backgroundColor: Colors.white, | |
appBar: AppBar( | |
title: Text(widget.title, | |
style: TextStyle( | |
fontWeight: FontWeight.bold, | |
color: Color.fromRGBO(58, 66, 86, 1.0) | |
),), | |
), | |
body: getListMovie(), | |
); | |
} | |
Widget getListMovie() { | |
} | |
Widget showListMovie(AsyncSnapshot<Movie> snapshot) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment