mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-05-11 18:36:11 +02:00
opt mobile chat message store
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
89b3e68788
commit
65529b10b6
8 changed files with 139 additions and 70 deletions
|
@ -37,6 +37,7 @@ class ConnectionPage extends StatefulWidget implements PageShape {
|
|||
class _ConnectionPageState extends State<ConnectionPage> {
|
||||
/// Controller for the id input bar.
|
||||
final _idController = IDTextEditingController();
|
||||
final RxBool _idEmpty = true.obs;
|
||||
|
||||
/// Update url. If it's not null, means an update is available.
|
||||
var _updateUrl = '';
|
||||
|
@ -60,6 +61,10 @@ class _ConnectionPageState extends State<ConnectionPage> {
|
|||
if (_updateUrl.isNotEmpty) setState(() {});
|
||||
});
|
||||
}
|
||||
|
||||
_idController.addListener(() {
|
||||
_idEmpty.value = _idController.text.isEmpty;
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -158,6 +163,14 @@ class _ConnectionPageState extends State<ConnectionPage> {
|
|||
),
|
||||
),
|
||||
),
|
||||
Obx(() => Offstage(
|
||||
offstage: _idEmpty.value,
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
_idController.clear();
|
||||
},
|
||||
icon: Icon(Icons.clear, color: MyTheme.darkGray)),
|
||||
)),
|
||||
SizedBox(
|
||||
width: 60,
|
||||
height: 60,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue