29 lines
948 B
Dart
29 lines
948 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
|
|
import 'package:marking_app/utils/const_text.dart';
|
|
import 'package:marking_app/utils/my_text.dart';
|
|
|
|
// 协议富文本
|
|
class AgreementPage extends StatelessWidget {
|
|
final AGREEMENT_KEY type;
|
|
const AgreementPage({required this.type, super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
AgreementClass agreement = AGREEMENT_MAP[type]!;
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
backgroundColor: Theme.of(context).primaryColor,
|
|
title: quickText(agreement.title,color: Colors.white),
|
|
),
|
|
body: ListView(
|
|
padding: EdgeInsets.symmetric(horizontal: 14.w, vertical: 8.h),
|
|
children: [
|
|
HtmlWidget(agreement.richText,textStyle:const TextStyle(color: Colors.black)),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|