File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 5
5
import 'package:flutter/material.dart' ;
6
6
import 'package:flutter_common_exports/flutter_common_exports.dart' ;
7
7
import 'package:wechat_assets_picker/wechat_assets_picker.dart' ;
8
+ import 'package:wechat_camera_picker/wechat_camera_picker.dart' ;
8
9
9
10
import '../constants/picker_model.dart' ;
10
11
import '../main.dart' ;
@@ -93,7 +94,10 @@ class _MultiAssetsPageState extends State<MultiAssetsPage> {
93
94
behavior: HitTestBehavior .opaque,
94
95
onTap: () async {
95
96
final AssetEntity result =
96
- await AssetPicker .pickFromCamera (context);
97
+ await CameraPicker .pickFromCamera (
98
+ context,
99
+ isAllowRecording: true ,
100
+ );
97
101
if (result != null ) {
98
102
Navigator .of (context)
99
103
.pop (< AssetEntity > [...assets, result]);
Original file line number Diff line number Diff line change 5
5
import 'package:flutter/material.dart' ;
6
6
import 'package:flutter_common_exports/flutter_common_exports.dart' ;
7
7
import 'package:wechat_assets_picker/wechat_assets_picker.dart' ;
8
+ import 'package:wechat_camera_picker/wechat_camera_picker.dart' ;
8
9
9
10
import '../constants/picker_model.dart' ;
10
11
import '../main.dart' ;
@@ -92,8 +93,10 @@ class _SingleAssetPageState extends State<SingleAssetPage> {
92
93
return GestureDetector (
93
94
behavior: HitTestBehavior .opaque,
94
95
onTap: () async {
95
- final AssetEntity result =
96
- await AssetPicker .pickFromCamera (context);
96
+ final AssetEntity result = await CameraPicker .pickFromCamera (
97
+ context,
98
+ isAllowRecording: true ,
99
+ );
97
100
if (result != null ) {
98
101
Navigator .of (context).pop (< AssetEntity > [result]);
99
102
}
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ dependencies:
12
12
13
13
wechat_assets_picker :
14
14
path : ../
15
+ wechat_camera_picker : ^1.0.0
15
16
16
17
dev_dependencies :
17
18
flutter_asset_generator : " >=0.4.7 <2.0.0"
@@ -20,4 +21,3 @@ flutter:
20
21
uses-material-design : true
21
22
assets :
22
23
- assets/
23
-
You can’t perform that action at this time.
0 commit comments