2020-07-27 20:43:58 +00:00
|
|
|
import 'dart:io';
|
|
|
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:mobile_nebula/components/SpecialTextField.dart';
|
|
|
|
|
|
|
|
class ConfigTextItem extends StatelessWidget {
|
2022-09-21 20:27:35 +00:00
|
|
|
const ConfigTextItem(
|
|
|
|
{Key? key, this.placeholder, this.controller, this.style = const TextStyle(fontFamily: 'RobotoMono')})
|
|
|
|
: super(key: key);
|
2020-07-27 20:43:58 +00:00
|
|
|
|
2022-09-21 20:27:35 +00:00
|
|
|
final String? placeholder;
|
|
|
|
final TextEditingController? controller;
|
2022-08-05 21:42:17 +00:00
|
|
|
final TextStyle style;
|
2020-07-27 20:43:58 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Padding(
|
|
|
|
padding: Platform.isAndroid ? EdgeInsets.all(5) : EdgeInsets.zero,
|
|
|
|
child: SpecialTextField(
|
|
|
|
autocorrect: false,
|
|
|
|
minLines: 3,
|
|
|
|
maxLines: 10,
|
|
|
|
placeholder: placeholder,
|
2022-08-05 21:42:17 +00:00
|
|
|
style: style,
|
2020-07-27 20:43:58 +00:00
|
|
|
controller: controller));
|
|
|
|
}
|
|
|
|
}
|