This repository has been archived on 2023-11-13. You can view files and clone it, but cannot push or open issues or pull requests.
imagini/web_native/lib/screens/settings/settingsscreen.dart

46 lines
1.2 KiB
Dart
Raw Normal View History

2021-01-08 02:45:59 +00:00
import 'package:flutter/material.dart';
2021-01-23 16:57:07 +00:00
import 'package:imagini/screens/settings/components/body.dart';
import 'package:imagini/screens/settings/settings-bloc.dart';
2021-01-08 02:45:59 +00:00
import 'package:imagini/bloc/bloc-prov.dart';
import 'package:flutter_platform_widgets/flutter_platform_widgets.dart';
2021-01-23 16:57:07 +00:00
class SettingsScreen extends StatefulWidget {
2021-01-08 02:45:59 +00:00
@override
2021-01-23 16:57:07 +00:00
_SettingsScreenState createState() => _SettingsScreenState();
2021-01-08 02:45:59 +00:00
}
2021-01-23 16:57:07 +00:00
class _SettingsScreenState extends State<SettingsScreen> {
SettingsBloc exampleBloc;
2021-01-08 02:45:59 +00:00
@override
void initState() {
super.initState();
2021-01-23 16:57:07 +00:00
exampleBloc = SettingsBloc();
2021-01-08 02:45:59 +00:00
}
@override
void dispose() {
exampleBloc.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return BlocProvider(
bloc: exampleBloc,
child: PlatformScaffold(
appBar: PlatformAppBar(
2021-01-23 16:57:07 +00:00
title: Text('Settings'),
2021-01-08 02:45:59 +00:00
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(),
),
);
}
}