Comments (13)
@tanveer1302 please provide your code and logs.it's work well on my device.what's your device type?
from images_picker.
@tanveer1302 please provide your code and logs.it's work well on my device.what's your device type?
I used the example code without any changes. Everything opens till I open the camera. Once i click the picture with camera, the picture gets selected and all other options work fine i.e., retake and cancel ones. but the confirm/Ok button on the camera screen doesn't work at all.
import 'dart:io';
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:flutter/services.dart';
import 'package:images_picker/images_picker.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@OverRide
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State {
String _platformVersion = 'Unknown';
String path;
@OverRide
void initState() {
super.initState();
}
@OverRide
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Column(
children: [
Text('Running on: $_platformVersion\n'),
RaisedButton(
child: Text('pick'),
onPressed: ()async {
List res = await ImagesPicker.pick(
count: 1,
pickType: PickType.video,
cropOpt: CropOption(),
);
if (res!=null) {
print(res[0]?.path);
setState(() {
path = res[0]?.thumbPath;
});
}
},
),
RaisedButton(
child: Text('openCamera'),
onPressed: ()async {
List res = await ImagesPicker.openCamera(
// pickType: PickType.video,
);
if (res!=null) {
print(res[0]?.path);
setState(() {
path = res[0]?.path;
});
}
},
),
path!=null?Container(
height: 200,
child: Image.file(
File(path),
fit: BoxFit.contain,
),
):SizedBox.shrink(),
],
),
),
);
}
}
from images_picker.
@tanveer1302 android or ios ?
from images_picker.
android
from images_picker.
@tanveer1302 was pick api work well?
from images_picker.
works great. It would be great if you can provide some more customization to the pick UI e.g., custom Button Name, color, custom alert message, etc.
from images_picker.
@tanveer1302 this is a new plugin, so implement important feature first. I will think your idea.
And I will check the bug you say above with camera
from images_picker.
thanks. But the alert message needs to be changed when user tries to select more than the defined limit. The message is not clear for the user and instead of "Ok" on the action for alert, it shows some message like "I know the".
For now can you please change the alert message to
You can select maximum of $count images
and Instead of alert action "I know the", change it to "Ok"
from images_picker.
@tanveer1302 I test open camera and take a photo, it did well. And I retake and cancel ones, camera is work well. My test phone is XIAOMI with andoird 8.
from images_picker.
I am facing the same issue. ImagesPicker.openCamera did not do anythig. So looked into the method implementation tried the following code.
MethodChannel _channel = const MethodChannel('chavesgu/images_picker');
List<dynamic> res = await _channel.invokeMethod('openCamera', {
"pickType": PickType.image.toString(),
});
The above code threw an exception
): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: MissingPluginException(No implementation found for method openCamera on channel chavesgu/images_picker)
E/flutter (31143): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:157:7)
E/flutter (31143): <asynchronous suspension>
E/flutter (31143): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:332:12)
E/flutter (31143)
from images_picker.
I am facing the same issue. ImagesPicker.openCamera did not do anythig. So looked into the method implementation tried the following code.
MethodChannel _channel = const MethodChannel('chavesgu/images_picker'); List<dynamic> res = await _channel.invokeMethod('openCamera', { "pickType": PickType.image.toString(), });
The above code threw an exception
): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: MissingPluginException(No implementation found for method openCamera on channel chavesgu/images_picker) E/flutter (31143): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:157:7) E/flutter (31143): <asynchronous suspension> E/flutter (31143): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:332:12) E/flutter (31143)
what's your flutter version.
Show your flutter doctor
from images_picker.
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 1.22.3, on Microsoft Windows [Version 10.0.18363.900], locale en-IN)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
X Android license status unknown.
Run flutter doctor --android-licenses
to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[!] Android Studio (version 4.1.0)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] Connected device (1 available)
! Doctor found issues in 2 categories.
from images_picker.
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 1.22.3, on Microsoft Windows [Version 10.0.18363.900], locale en-IN)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
X Android license status unknown.
Runflutter doctor --android-licenses
to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[!] Android Studio (version 4.1.0)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] Connected device (1 available)! Doctor found issues in 2 categories.
Can you just run example successfully?
from images_picker.
Related Issues (20)
- Android 13 issue HOT 19
- Not picture or video dialog shown - Android Bug
- PlatformException(file does not exist, , null, null) HOT 1
- You need to use a Theme.AppCompat theme (or descendant) with this activity.
- Cycle path: FlutterPluginRegistrant → images_picker → ZLPhotoBrowser → FlutterPluginRegistrant
- 连续多次,多张图片 原图上传到服务器会导致应用闪退
- 1x1 aspect ratio HOT 2
- OPPOR15手机选择图片 崩溃率达到98% HOT 2
- the number of videos displayed is not equal to the number of thumbnails
- Images are getting compressed HOT 1
- ios build error
- Android build Error
- Update Permission for Android 13 HOT 9
- Error android 13, need update and add android:exported="true" in Androidmanifest
- Image metadata
- Cant download image
- App crashed when click photo with camera HOT 1
- When i build in ios, Cannot find 'Res' in scope
- image picker is not working suddenly from 9pm 10th jan 2022
- Support Flash on iOS & Customize UI For Android & iOS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from images_picker.