Skip to content

Commit f62e313

Browse files
committed
🎨 Move camera methods to wechat_camera_picker.
Related to #52 .
1 parent 4f0588c commit f62e313

File tree

3 files changed

+1
-473
lines changed

3 files changed

+1
-473
lines changed

lib/src/widget/asset_picker.dart

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import 'package:wechat_assets_picker/wechat_assets_picker.dart';
1818
import '../constants/constants.dart';
1919
import 'builder/fade_image_builder.dart';
2020
import 'builder/slide_page_transition_builder.dart';
21-
import 'camera_picker.dart';
2221
import 'fixed_appbar.dart';
2322

2423
class AssetPicker extends StatelessWidget {
@@ -184,27 +183,6 @@ class AssetPicker extends StatelessWidget {
184183
}
185184
}
186185

187-
/// Static method to create [AssetEntity] through camera.
188-
/// 通过相机创建 [AssetEntity] 的静态方法
189-
static Future<AssetEntity> pickFromCamera(
190-
BuildContext context, {
191-
bool shouldKeptInLocal = true,
192-
}) async {
193-
final AssetEntity result = await Navigator.of(
194-
context,
195-
rootNavigator: true,
196-
).push<AssetEntity>(
197-
SlidePageTransitionBuilder<AssetEntity>(
198-
builder: CameraPicker(
199-
shouldKeptInLocal: shouldKeptInLocal,
200-
),
201-
transitionCurve: Curves.easeIn,
202-
transitionDuration: const Duration(milliseconds: 300),
203-
),
204-
);
205-
return result;
206-
}
207-
208186
/// Register observe callback with assets changes.
209187
/// 注册资源(图库)变化的监听回调
210188
static void registerObserve([ValueChanged<MethodCall> callback]) {

0 commit comments

Comments
 (0)