Compare commits

...

1 Commits

Author SHA1 Message Date
Vladislav Peshkov 8232d9a58b We now have a little DataPage mockup without logic 2024-01-17 20:21:51 +01:00
3 changed files with 76 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import 'package:moody/views/color_page/color_page.dart';
import 'package:moody/views/entry_view/entry_page.dart';
import 'package:moody/views/first_page/first_page.dart';
import 'package:moody/views/home_page/home_page.dart';
import 'package:moody/views/settings_page/data_page.dart';
import 'package:moody/views/settings_page/settings_page.dart';
import 'package:moody/views/start_page/start_page.dart';
import 'package:moody/views/statistic/statistic_page.dart';
@ -44,6 +45,10 @@ final GoRouter _router = GoRouter(
path: '/color',
pageBuilder: (context, state) => _noAnimationTransition(context, state, const ColorPage()),
),
GoRoute(
path: '/date_page',
pageBuilder: (context, state) => _noAnimationTransition(context, state, const DataPage()),
),
GoRoute(
path: '/write',
builder: (context, state) {

View File

@ -0,0 +1,70 @@
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:moody/views/settings_page/widgets/custom_divider_widget.dart';
import 'package:moody/views/settings_page/widgets/text_switch_container_widget.dart';
import '../../utils/definitions/style_guide.dart';
class DataPage extends StatefulWidget {
const DataPage({super.key});
@override
State<DataPage> createState() => _DataPage();
}
class _DataPage extends State<DataPage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppStyle.backgroundColor,
body: Container(
padding: const EdgeInsets.only(bottom: 0),
margin: const EdgeInsets.fromLTRB(30, 30, 30, 0),
child: SingleChildScrollView(
child: Column(
children: <Widget>[
const SizedBox(
height: 100,
),
// Settings section
Container(
margin: const EdgeInsets.only(bottom: 10),
alignment: Alignment.topLeft,
child: const Text('data', style: TextStyle(
fontWeight: FontWeight.w500, fontSize: 24)),
),
const CustomDivider(),
TextSwitchContainer(
leftText: "export Data",
onTap: () => {},
),
const CustomDivider(),
TextSwitchContainer(
leftText: "import Data",
onTap: () => {},
),
const CustomDivider(),
TextSwitchContainer(
leftText: "delete Data",
onTap: () => {},
),
const CustomDivider(),
TextSwitchContainer(
leftText: "<-",
onTap: () => context.go("/settings"),
),
],
),
),
),
);
}
}

View File

@ -87,7 +87,7 @@ Future<void> _launchUrl(Uri url) async {
const CustomDivider(),
TextSwitchContainer(
leftText: "your data",
onTap: () => {},
onTap: () => context.go("/date_page"),
),
// Community section
Padding(