TF-282 Fix bug email address is cut off when displaying on the mobile app
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SuggestionsBoxController {
|
||||
final BuildContext context;
|
||||
|
||||
OverlayEntry? overlayEntry;
|
||||
|
||||
bool _isOpened = false;
|
||||
|
||||
bool get isOpened => _isOpened;
|
||||
|
||||
SuggestionsBoxController(this.context);
|
||||
|
||||
void open() {
|
||||
if (_isOpened) return;
|
||||
assert(overlayEntry != null);
|
||||
Overlay.of(context)?.insert(overlayEntry!);
|
||||
_isOpened = true;
|
||||
}
|
||||
|
||||
void close() {
|
||||
if (!_isOpened) return;
|
||||
assert(overlayEntry != null);
|
||||
overlayEntry!.remove();
|
||||
_isOpened = false;
|
||||
}
|
||||
|
||||
void toggle() {
|
||||
if (_isOpened) {
|
||||
close();
|
||||
} else {
|
||||
open();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user