selfprivacy.org.app/lib/ui/pages/more/more.dart

117 lines
3.4 KiB
Dart
Raw Normal View History

2020-12-02 09:16:23 +00:00
import 'package:flutter/material.dart';
import 'package:selfprivacy/config/brand_colors.dart';
import 'package:selfprivacy/config/brand_theme.dart';
import 'package:selfprivacy/ui/components/brand_divider/brand_divider.dart';
import 'package:selfprivacy/ui/components/brand_header/brand_header.dart';
import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart';
2020-12-08 19:26:51 +00:00
import 'package:selfprivacy/ui/components/brand_text/brand_text.dart';
2020-12-30 14:13:25 +00:00
import 'package:selfprivacy/ui/pages/initializing/initializing.dart';
2021-01-06 17:35:57 +00:00
import 'package:selfprivacy/ui/pages/onboarding/onboarding.dart';
import 'package:selfprivacy/ui/pages/rootRoute.dart';
2020-12-02 09:16:23 +00:00
import 'package:selfprivacy/utils/route_transitions/basic.dart';
2020-12-06 07:46:12 +00:00
import 'about/about.dart';
import 'app_settings/app_setting.dart';
2021-01-14 21:48:05 +00:00
import 'console/console.dart';
2020-12-06 07:46:12 +00:00
import 'info/info.dart';
2020-12-02 09:16:23 +00:00
class MorePage extends StatelessWidget {
const MorePage({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
2020-12-03 16:52:53 +00:00
return Scaffold(
appBar: PreferredSize(
child: BrandHeader(title: 'Еще'),
preferredSize: Size.fromHeight(52),
),
body: ListView(
children: [
Padding(
padding: brandPagePadding2,
child: Column(
children: [
BrandDivider(),
2020-12-30 14:13:25 +00:00
_NavItem(
title: 'Мастер Подключения',
iconData: BrandIcons.settings,
goTo: InitializingPage(),
),
2020-12-03 16:52:53 +00:00
_NavItem(
2020-12-06 07:46:12 +00:00
title: 'Настройки приложения',
2020-12-03 16:52:53 +00:00
iconData: BrandIcons.settings,
2020-12-06 07:46:12 +00:00
goTo: AppSettingsPage(),
2020-12-03 16:52:53 +00:00
),
_NavItem(
title: 'О проекте Selfprivacy',
iconData: BrandIcons.triangle,
goTo: AboutPage(),
),
_NavItem(
title: 'О приложении',
iconData: BrandIcons.help,
goTo: InfoPage(),
),
2021-01-06 17:35:57 +00:00
_NavItem(
title: 'Onboarding',
iconData: BrandIcons.triangle,
goTo: OnboardingPage(nextPage: RootPage()),
),
2021-01-14 21:48:05 +00:00
_NavItem(
title: 'Console',
iconData: BrandIcons.triangle,
goTo: Console(),
),
2020-12-03 16:52:53 +00:00
],
),
)
],
),
2020-12-02 09:16:23 +00:00
);
}
}
class _NavItem extends StatelessWidget {
const _NavItem({
Key key,
@required this.iconData,
@required this.goTo,
@required this.title,
}) : super(key: key);
final IconData iconData;
final Widget goTo;
final String title;
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () => Navigator.of(context).push(materialRoute(goTo)),
child: Container(
padding: EdgeInsets.symmetric(vertical: 24),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: 1.0,
color: BrandColors.dividerColor,
),
),
),
child: Row(
children: [
2020-12-08 19:26:51 +00:00
BrandText.body1(title),
2020-12-02 09:16:23 +00:00
Spacer(),
2020-12-03 16:52:53 +00:00
SizedBox(
width: 56,
2020-12-08 19:26:51 +00:00
child: Icon(
iconData,
size: 20,
),
2020-12-03 16:52:53 +00:00
),
2020-12-02 09:16:23 +00:00
],
),
),
);
}
}