Guest User

Untitled

a guest
Jan 22nd, 2019
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter_bloc/flutter_bloc.dart';
  3. import 'package:url_launcher/url_launcher.dart';
  4.  
  5. import 'package:common_github_search/common_github_search.dart';
  6.  
  7. class SearchForm extends StatefulWidget {
  8. final GithubRepository githubRepository;
  9.  
  10. const SearchForm({
  11. Key key,
  12. @required this.githubRepository,
  13. }) : super(key: key);
  14.  
  15. @override
  16. _SearchFormState createState() => _SearchFormState();
  17. }
  18.  
  19. class _SearchFormState extends State<SearchForm> {
  20. GithubSearchBloc _githubSearchBloc;
  21.  
  22. @override
  23. void initState() {
  24. _githubSearchBloc = GithubSearchBloc(
  25. githubRepository: widget.githubRepository,
  26. );
  27. super.initState();
  28. }
  29.  
  30. @override
  31. void dispose() {
  32. _githubSearchBloc.dispose();
  33. super.dispose();
  34. }
  35.  
  36. @override
  37. Widget build(BuildContext context) {
  38. return Column(
  39. children: <Widget>[
  40. _SearchBar(githubSearchBloc: _githubSearchBloc),
  41. _SearchBody(githubSearchBloc: _githubSearchBloc)
  42. ],
  43. );
  44. }
  45. }
Add Comment
Please, Sign In to add comment