migrate flutter3.0
This commit is contained in:
@@ -31,7 +31,7 @@ class _SFTPDownloadedPageState extends State<SFTPDownloadedPage> {
|
||||
super.initState();
|
||||
sftpDownloadDir.then((dir) {
|
||||
_path = PathWithPrefix(dir.path);
|
||||
_prefixPath = dir.path + '/';
|
||||
_prefixPath = '${dir.path}/';
|
||||
setState(() {});
|
||||
});
|
||||
}
|
||||
@@ -58,8 +58,8 @@ class _SFTPDownloadedPageState extends State<SFTPDownloadedPage> {
|
||||
],
|
||||
),
|
||||
body: FadeIn(
|
||||
child: _buildBody(),
|
||||
key: UniqueKey(),
|
||||
child: _buildBody(),
|
||||
),
|
||||
bottomNavigationBar: SafeArea(
|
||||
child: _buildPath(),
|
||||
|
||||
@@ -122,6 +122,7 @@ class _SFTPPageState extends State<SFTPPage> {
|
||||
} else {
|
||||
return RefreshIndicator(
|
||||
child: FadeIn(
|
||||
key: Key(_status.spi!.name + _status.path!.path),
|
||||
child: ListView.builder(
|
||||
itemCount: _status.files!.length + 1,
|
||||
controller: _scrollController,
|
||||
@@ -155,7 +156,6 @@ class _SFTPPageState extends State<SFTPPage> {
|
||||
);
|
||||
},
|
||||
),
|
||||
key: Key(_status.spi!.name + _status.path!.path),
|
||||
),
|
||||
onRefresh: () => listDir(path: _status.path?.path));
|
||||
}
|
||||
@@ -277,7 +277,7 @@ class _SFTPPageState extends State<SFTPPage> {
|
||||
return;
|
||||
}
|
||||
_status.client!
|
||||
.mkdir(_status.path!.path + '/' + textController.text);
|
||||
.mkdir('${_status.path!.path}/${textController.text}');
|
||||
Navigator.of(context).pop();
|
||||
listDir();
|
||||
},
|
||||
@@ -316,7 +316,7 @@ class _SFTPPageState extends State<SFTPPage> {
|
||||
return;
|
||||
}
|
||||
(await _status.client!
|
||||
.open(_status.path!.path + '/' + textController.text))
|
||||
.open('${_status.path!.path}/${textController.text}'))
|
||||
.writeBytes(Uint8List(0));
|
||||
Navigator.of(context).pop();
|
||||
listDir();
|
||||
|
||||
Reference in New Issue
Block a user