import 'package:flutter/material.dart'; import 'package:imagini/screens/photo/components/body.dart'; import 'package:imagini/screens/photo/photo-bloc.dart'; import 'package:imagini/bloc/bloc-prov.dart'; import 'package:flutter_platform_widgets/flutter_platform_widgets.dart'; class PhotoScreen extends StatefulWidget { @override _PhotoScreenState createState() => _PhotoScreenState(); } class _PhotoScreenState extends State { PhotoBloc exampleBloc; @override void initState() { super.initState(); exampleBloc = PhotoBloc(); } @override void dispose() { exampleBloc.dispose(); super.dispose(); } @override Widget build(BuildContext context) { return BlocProvider( bloc: exampleBloc, child: PlatformScaffold( appBar: PlatformAppBar( title: Text('Photos'), 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(), ), ); } }