51 lines
1.4 KiB
Dart
51 lines
1.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
/// ============================================================
|
|
/// 【LegalDocumentPage】通用协议正文页
|
|
///
|
|
/// 作用:
|
|
/// 统一承接《用户协议》《隐私政策》这类长文本页面。
|
|
/// 两份协议只换 title/content,不再重复写两套滚动布局。
|
|
/// ============================================================
|
|
class LegalDocumentPage extends StatelessWidget {
|
|
const LegalDocumentPage({
|
|
super.key,
|
|
required this.title,
|
|
required this.content,
|
|
});
|
|
|
|
final String title;
|
|
final String content;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: const Color(0xFFF5F7FA),
|
|
appBar: AppBar(
|
|
title: Text(title),
|
|
),
|
|
body: SafeArea(
|
|
child: SingleChildScrollView(
|
|
padding: const EdgeInsets.fromLTRB(16, 16, 16, 24),
|
|
child: Container(
|
|
width: double.infinity,
|
|
padding: const EdgeInsets.all(16),
|
|
decoration: BoxDecoration(
|
|
color: Colors.white,
|
|
borderRadius: BorderRadius.circular(16),
|
|
),
|
|
child: SelectableText(
|
|
content,
|
|
style: const TextStyle(
|
|
fontSize: 14,
|
|
height: 1.8,
|
|
color: Color(0xFF323233),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|