Skip to content
代码片段 群组 项目
提交 89c4ab57 编辑于 作者: Neil Wang's avatar Neil Wang 提交者: Neil Wang
浏览文件

refactor: #845 remove destinationHost in projectRepositoryPage

上级 720849ad
No related branches found
No related tags found
无相关合并请求
......@@ -66,7 +66,7 @@ class _ProjectPageState extends State<ProjectPage> with TickerProviderStateMixin
body: TabBarView(
controller: _tabController,
children: [
ProjectRepositoryPage(fullPath: widget.arguments['relativePath'], destinationHost: ProjectProvider().specifiedHost, projectName: widget.arguments["name"]),
ProjectRepositoryPage(fullPath: widget.arguments['relativePath'], projectName: widget.arguments["name"]),
ProjectIssuesPage(
refreshKey: _refreshKey,
projectId: _projectId,
......
......@@ -16,10 +16,9 @@ import 'package:webview_flutter/webview_flutter.dart';
import 'package:webview_flutter_wkwebview/webview_flutter_wkwebview.dart';
class ProjectRepositoryPage extends StatefulWidget {
const ProjectRepositoryPage({required this.fullPath, required this.destinationHost, required this.projectName, Key? key}) : super(key: key);
const ProjectRepositoryPage({required this.fullPath, required this.projectName, Key? key}) : super(key: key);
final String fullPath;
final String projectName;
final String? destinationHost;
@override
State<ProjectRepositoryPage> createState() => _ProjectRepositoryPageState();
......
......@@ -42,7 +42,7 @@ void main() {
when(client.post<dynamic>('/api/graphql', buildRequestBodyOfCheckRepositoryIsEmpty(fullPath))).thenAnswer((_) => Future(() => Response.of<dynamic>(checkRepositoryIsEmptyResponse())));
var builder = MultiProvider(
providers: [ChangeNotifierProvider(create: (context) => ConnectionProvider())],
child: MaterialApp(onGenerateRoute: onGenerateRoute, home: const Scaffold(body: ProjectRepositoryPage(fullPath: fullPath, destinationHost: null, projectName: "demo"))),
child: MaterialApp(onGenerateRoute: onGenerateRoute, home: const Scaffold(body: ProjectRepositoryPage(fullPath: fullPath, projectName: "demo"))),
);
await tester.pumpWidget(builder);
......@@ -101,7 +101,7 @@ void main() {
when(client.post<dynamic>('/api/graphql', buildRequestBodyOfCheckRepositoryIsEmpty(fullPath))).thenAnswer((_) => Future(() => Response.of<dynamic>(checkRepositoryIsEmptyResponse())));
var builder = MultiProvider(
providers: [ChangeNotifierProvider(create: (context) => ConnectionProvider())],
child: MaterialApp(onGenerateRoute: onGenerateRoute, home: const Scaffold(body: ProjectRepositoryPage(fullPath: fullPath, destinationHost: null, projectName: "demo"))),
child: MaterialApp(onGenerateRoute: onGenerateRoute, home: const Scaffold(body: ProjectRepositoryPage(fullPath: fullPath, projectName: "demo"))),
);
await tester.pumpWidget(builder);
......@@ -121,7 +121,7 @@ void main() {
when(client.post<dynamic>('/api/graphql', buildRequestBodyOfCheckRepositoryIsEmpty(fullPath))).thenAnswer((_) => Future(() => Response.of<dynamic>(checkRepositoryIsEmptyResponse(empty: true))));
var builder = MultiProvider(
providers: [ChangeNotifierProvider(create: (context) => ConnectionProvider())],
child: MaterialApp(onGenerateRoute: onGenerateRoute, home: const Scaffold(body: ProjectRepositoryPage(fullPath: fullPath, destinationHost: null, projectName: "demo"))),
child: MaterialApp(onGenerateRoute: onGenerateRoute, home: const Scaffold(body: ProjectRepositoryPage(fullPath: fullPath, projectName: "demo"))),
);
await tester.pumpWidget(builder);
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册