Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yangjiayi committed Oct 12, 2022
1 parent 8f31650 commit 3970bd3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion sdk/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ void main() async {
{"dynamic_page": (context, params) => FairWidget(path: params?['path'])});

///注入FairWidget的构建回调
FairDevTools.fairWidgetBuilder = (path) => FairWidget(path: path);
FairDevTools.fairWidgetBuilder =
(name, path) => FairWidget(name: name, path: path);

///开发者选项线上环境配置
FairDevTools.config = FairDevConfig()
Expand Down
2 changes: 1 addition & 1 deletion sdk/lib/src/dev_tool/fair_dev_tool.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:fair_pushy/src/dev_tool/model/dev_tool_model.dart';
import 'package:fair_pushy/src/dev_tool/ui/dev_tool_page.dart';
import 'package:flutter/material.dart';

typedef Widget FairWidgetHandler(String path);
typedef Widget FairWidgetHandler(String name, String path);

class FairDevTools {
static FairDevConfig? _config;
Expand Down
2 changes: 1 addition & 1 deletion sdk/lib/src/dev_tool/ui/bundle_list_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class _BundleListPageState extends State<BundleListPage> {
onPressed: () {
Navigator.of(context)
.push<void>(MaterialPageRoute(builder: (context) {
return FairDevTools.fairWidgetBuilder(FairPushy.getFilePath(
return FairDevTools.fairWidgetBuilder(item, FairPushy.getFilePath(
bundleId: widget.bundleId ?? "debug", filename: item));
}));
},
Expand Down

0 comments on commit 3970bd3

Please sign in to comment.