fix(gitlab): encode path

This commit is contained in:
Rongjian Zhang 2019-12-12 00:06:42 +08:00
parent d91ae0a213
commit a8faf76227
1 changed files with 2 additions and 1 deletions

View File

@ -19,8 +19,9 @@ class GitlabBlobScreen extends StatelessWidget {
return RefreshStatefulScaffold<GitlabBlob>(
title: AppBarTitle(path),
fetchData: () async {
final encodedPath = Uri.encodeComponent(path);
final res = await Provider.of<AuthModel>(context).fetchGitlab(
'/projects/$id/repository/files/$path?ref=master'); // TODO:
'/projects/$id/repository/files/$encodedPath?ref=master'); // TODO:
return GitlabBlob.fromJson(res);
},
bodyBuilder: (data, _) {