2021-03-26 13:38:39 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:selfprivacy/ui/components/brand_divider/brand_divider.dart';
|
|
|
|
import 'package:selfprivacy/ui/components/brand_text/brand_text.dart';
|
|
|
|
import 'package:easy_localization/easy_localization.dart';
|
2021-05-25 21:53:54 +00:00
|
|
|
import 'package:selfprivacy/ui/components/pre_styled_buttons/pre_styled_buttons.dart';
|
2021-03-26 13:38:39 +00:00
|
|
|
|
|
|
|
class OnePage extends StatelessWidget {
|
|
|
|
const OnePage({
|
|
|
|
required this.title,
|
|
|
|
required this.child,
|
2022-06-05 22:40:34 +00:00
|
|
|
final super.key,
|
2022-06-05 19:36:32 +00:00
|
|
|
});
|
2021-03-26 13:38:39 +00:00
|
|
|
|
|
|
|
final String title;
|
|
|
|
final Widget child;
|
|
|
|
|
|
|
|
@override
|
2022-06-05 19:36:32 +00:00
|
|
|
Widget build(final BuildContext context) => Scaffold(
|
2022-06-05 22:40:34 +00:00
|
|
|
appBar: PreferredSize(
|
|
|
|
preferredSize: const Size.fromHeight(52),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
height: 51,
|
|
|
|
alignment: Alignment.center,
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 15),
|
|
|
|
child: BrandText.h4('basis.details'.tr()),
|
|
|
|
),
|
|
|
|
const BrandDivider(),
|
|
|
|
],
|
|
|
|
),
|
2021-05-25 21:53:54 +00:00
|
|
|
),
|
2022-06-05 22:40:34 +00:00
|
|
|
body: child,
|
|
|
|
bottomNavigationBar: SafeArea(
|
2021-05-25 21:53:54 +00:00
|
|
|
child: Container(
|
2022-06-05 22:40:34 +00:00
|
|
|
decoration: BoxDecoration(boxShadow: kElevationToShadow[3]),
|
|
|
|
height: kBottomNavigationBarHeight,
|
|
|
|
child: Container(
|
|
|
|
color: Theme.of(context).scaffoldBackgroundColor,
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: PreStyledButtons.close(
|
|
|
|
onPress: () => Navigator.of(context).pop(),
|
|
|
|
),
|
|
|
|
),
|
2021-03-26 13:38:39 +00:00
|
|
|
),
|
|
|
|
),
|
2022-06-05 22:40:34 +00:00
|
|
|
);
|
2021-03-26 13:38:39 +00:00
|
|
|
}
|