Skip to content

Instantly share code, notes, and snippets.

@rrifafauzikomara
Created December 14, 2019 16:45
Show Gist options
  • Save rrifafauzikomara/160ed00e9e136f7cf01db9cf6f704a39 to your computer and use it in GitHub Desktop.
Save rrifafauzikomara/160ed00e9e136f7cf01db9cf6f704a39 to your computer and use it in GitHub Desktop.
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