66 lines
1.6 KiB
Dart
66 lines
1.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter/services.dart';
|
|
import 'package:flutter_html/flutter_html.dart';
|
|
|
|
class CharacterView extends StatefulWidget {
|
|
final String title;
|
|
final String imagePath;
|
|
final String content;
|
|
|
|
const CharacterView({
|
|
super.key,
|
|
required this.title,
|
|
required this.imagePath,
|
|
required this.content,
|
|
});
|
|
|
|
@override
|
|
_CharacterViewState createState() => _CharacterViewState();
|
|
}
|
|
|
|
class _CharacterViewState extends State<CharacterView> {
|
|
String _content = '';
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
_content = widget.content;
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: Colors.white,
|
|
appBar: AppBar(
|
|
title: Text(widget.title),
|
|
backgroundColor: Color.fromARGB(225, 79, 76, 182),
|
|
),
|
|
body: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
SizedBox(
|
|
height: 10,
|
|
child: Container(
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.only(
|
|
bottomLeft: Radius.circular(40),
|
|
bottomRight: Radius.circular(40),
|
|
),
|
|
color: Color.fromARGB(225, 79, 76, 182),
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(height: 0),
|
|
Expanded(
|
|
child: SingleChildScrollView(
|
|
padding: const EdgeInsets.only(left: 18.0, right: 18, bottom: 18),
|
|
child: Text(_content),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
// ),
|
|
);
|
|
}
|
|
}
|