random improvements

This commit is contained in:
ashilkn 2023-10-18 07:39:23 +05:30
parent 3171a7cd7c
commit 0e22b40c9b
3 changed files with 4 additions and 3 deletions

View file

@ -213,6 +213,7 @@ class _TextInputDialogState extends State<TextInputDialog> {
@override
void initState() {
super.initState();
_textEditingController =
widget.textEditingController ?? TextEditingController();
_inputIsEmptyNotifier = widget.initialValue?.isEmpty ?? true
@ -223,7 +224,6 @@ class _TextInputDialogState extends State<TextInputDialog> {
_inputIsEmptyNotifier.value = _textEditingController.text.isEmpty;
}
});
super.initState();
}
@override
@ -235,7 +235,7 @@ class _TextInputDialogState extends State<TextInputDialog> {
@override
Widget build(BuildContext context) {
final widthOfScreen = MediaQuery.of(context).size.width;
final widthOfScreen = MediaQuery.sizeOf(context).width;
final isMobileSmall = widthOfScreen <= mobileSmallThreshold;
final colorScheme = getEnteColorScheme(context);
return Container(

View file

@ -90,6 +90,7 @@ class _TextInputWidgetState extends State<TextInputWidget> {
@override
void initState() {
super.initState();
widget.submitNotifier?.addListener(_onSubmit);
widget.cancelNotifier?.addListener(_onCancel);
_textController = widget.textEditingController ?? TextEditingController();
@ -109,7 +110,6 @@ class _TextInputWidgetState extends State<TextInputWidget> {
widget.isEmptyNotifier!.value = _textController.text.isEmpty;
});
}
super.initState();
}
@override

View file

@ -85,6 +85,7 @@ class _AllSearchSectionsState extends State<AllSearchSections> {
builder: (context, snapshot) {
if (snapshot.hasData) {
return ListView.builder(
padding: const EdgeInsets.only(bottom: 120),
physics: const BouncingScrollPhysics(),
itemCount: searchTypes.length,
itemBuilder: (context, index) {