import 'package:flutter/material.dart';
import 'package:imagini/screens/gallery/components/body.dart';
import 'package:imagini/screens/gallery/gallery-bloc.dart';
import 'package:imagini/bloc/bloc-prov.dart';
import 'package:flutter_platform_widgets/flutter_platform_widgets.dart';
class GalleryScreen extends StatefulWidget {
@override
_GalleryScreenState createState() => _GalleryScreenState();
}
class _GalleryScreenState extends State<GalleryScreen> {
GalleryBloc exampleBloc;
void initState() {
super.initState();
exampleBloc = GalleryBloc();
void dispose() {
exampleBloc.dispose();
super.dispose();
Widget build(BuildContext context) {
return BlocProvider(
bloc: exampleBloc,
child: PlatformScaffold(
appBar: PlatformAppBar(
title: Text('Gallery'),
cupertino: (_, __) => CupertinoNavigationBarData(
// Issue with cupertino where a bar with no transparency
// will push the list down. Adding some alpha value fixes it (in a hacky way)
backgroundColor: Colors.lightGreen.withAlpha(254),
),
body: Body(),
);