30 lines
679 B
Dart
30 lines
679 B
Dart
|
import 'package:flutter/widgets.dart';
|
||
|
|
||
|
class ServerLogWidget extends StatefulWidget {
|
||
|
final Color textColor;
|
||
|
final String addString;
|
||
|
|
||
|
const ServerLogWidget(this.addString, {required this.textColor, super.key});
|
||
|
|
||
|
@override
|
||
|
State<StatefulWidget> createState() => ServerLogWidgetState();
|
||
|
}
|
||
|
|
||
|
class ServerLogWidgetState extends State<ServerLogWidget> {
|
||
|
List<String> log = [];
|
||
|
|
||
|
ServerLogWidgetState();
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
log.add(widget.addString);
|
||
|
|
||
|
return Column(
|
||
|
children: [
|
||
|
for (int i = 0; i < log.length; i++)
|
||
|
Text(style: TextStyle(color: widget.textColor, fontSize: 20), log[i])
|
||
|
],
|
||
|
);
|
||
|
}
|
||
|
}
|