mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-21 17:46:24 +08:00
@@ -1,20 +1,29 @@
|
||||
import 'package:PiliPlus/pages/setting/widgets/model.dart';
|
||||
import 'package:PiliPlus/pages/setting/models/model.dart';
|
||||
import 'package:PiliPlus/pages/setting/models/privacy_settings.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class PrivacySetting extends StatelessWidget {
|
||||
class PrivacySetting extends StatefulWidget {
|
||||
const PrivacySetting({super.key, this.showAppBar});
|
||||
|
||||
final bool? showAppBar;
|
||||
|
||||
@override
|
||||
State<PrivacySetting> createState() => _PrivacySettingState();
|
||||
}
|
||||
|
||||
class _PrivacySettingState extends State<PrivacySetting> {
|
||||
final settings = privacySettings;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: showAppBar == false ? null : AppBar(title: const Text('隐私设置')),
|
||||
appBar:
|
||||
widget.showAppBar == false ? null : AppBar(title: const Text('隐私设置')),
|
||||
body: ListView(
|
||||
children: [
|
||||
...privacySettings.map((item) => item.widget),
|
||||
SizedBox(height: MediaQuery.paddingOf(context).bottom + 80),
|
||||
],
|
||||
padding: EdgeInsets.only(
|
||||
bottom: MediaQuery.paddingOf(context).bottom + 80,
|
||||
),
|
||||
children: settings.map((item) => item.widget).toList(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user