ModernMemoires/lib/views/settings_page/settings_page.dart

125 lines
4.2 KiB
Dart

import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import '../../utils/widgets/BottomNavigationWidget.dart';
import 'widgets/CustomDivider.dart';
import 'widgets/SetPinPopup.dart';
import 'widgets/TextSwitchContainer.dart';
class SettingsPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xffeeeeee),
body: Container(
padding: 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: EdgeInsets.only(bottom: 10),
alignment: Alignment.topLeft,
child: Text('settings',
style:
TextStyle(fontWeight: FontWeight.w500, fontSize: 24)),
),
TextSwitchContainer(
leftText: "change color",
onTap: () => context.go("/color"),
),
CustomDivider(),
TextSwitchContainer(
leftText: "pin",
hasSwitch: true,
onTap: () => {showSetPinPopup(context)},
onSwitchToggle: (value) => print('Switch toggled: $value'),
),
CustomDivider(),
TextSwitchContainer(
leftText: "your data",
onTap: () => print('Container tapped'),
),
// Community section
Padding(
padding: const EdgeInsets.fromLTRB(0, 50, 0, 10),
child: Container(
alignment: Alignment.topLeft,
margin: EdgeInsets.only(bottom: 10),
child: Text('community',
style:
TextStyle(fontWeight: FontWeight.w500, fontSize: 24)),
),
),
TextSwitchContainer(
leftText: "join our discord",
rightText: "fullfilled",
onTap: () => print('Container tapped'),
),
CustomDivider(),
TextSwitchContainer(
leftText: "our instagram",
rightText: "@get.fullfilled",
onTap: () => print('Container tapped'),
),
CustomDivider(),
TextSwitchContainer(
leftText: "share fullfilled with your loved ones",
onTap: () => print('Container tapped'),
),
Padding(
padding: const EdgeInsets.fromLTRB(0, 50, 0, 10),
child: Container(
alignment: Alignment.topLeft,
child: Text('humans behind fullfilled',
style:
TextStyle(fontWeight: FontWeight.w500, fontSize: 24)),
),
),
TextSwitchContainer(
leftText: "about us",
onTap: () => print('Container tapped'),
),
CustomDivider(),
TextSwitchContainer(
leftText: "support us",
onTap: () => print('Container tapped'),
),
CustomDivider(),
TextSwitchContainer(
leftText: "give feedback",
onTap: () => print('Container tapped'),
),
//
ListTile(
title: Text('imprint & privacy policy',
style: TextStyle(color: Colors.grey, fontSize: 15)),
onTap: () => {}, // Implement your logic
),
SizedBox(
height: 150,
)
],
),
),
),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
floatingActionButton: CustomBottomNavigationBar(initialSelectedIndex: 2),
);
}
void showSetPinPopup(BuildContext context) {
showDialog(
context: context,
builder: (BuildContext context) {
return SetPinPopup();
},
);
}
}