mirror of
https://github.com/foss42/apidash.git
synced 2025-05-21 08:16:29 +08:00
39 lines
926 B
Dart
39 lines
926 B
Dart
import 'package:apidash_design_system/apidash_design_system.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class ADRawTextField extends StatelessWidget {
|
|
const ADRawTextField({
|
|
super.key,
|
|
this.onChanged,
|
|
this.controller,
|
|
this.hintText,
|
|
this.style,
|
|
this.readOnly = false,
|
|
});
|
|
|
|
final void Function(String)? onChanged;
|
|
final TextEditingController? controller;
|
|
final String? hintText;
|
|
final TextStyle? style;
|
|
final bool readOnly;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return TextField(
|
|
readOnly: readOnly,
|
|
controller: controller,
|
|
onChanged: onChanged,
|
|
style: style,
|
|
decoration: InputDecoration(
|
|
isDense: true,
|
|
border: InputBorder.none,
|
|
hintText: hintText,
|
|
contentPadding: kPv8,
|
|
),
|
|
onTapOutside: (PointerDownEvent event) {
|
|
FocusManager.instance.primaryFocus?.unfocus();
|
|
},
|
|
);
|
|
}
|
|
}
|