Git Product home page Git Product logo

Comments (13)

chavesgu avatar chavesgu commented on June 16, 2024

@tanveer1302 please provide your code and logs.it's work well on my device.what's your device type?

from images_picker.

tanveer1302 avatar tanveer1302 commented on June 16, 2024

@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.

chavesgu avatar chavesgu commented on June 16, 2024

@tanveer1302 android or ios ?

from images_picker.

tanveer1302 avatar tanveer1302 commented on June 16, 2024

android

from images_picker.

chavesgu avatar chavesgu commented on June 16, 2024

@tanveer1302 was pick api work well?

from images_picker.

tanveer1302 avatar tanveer1302 commented on June 16, 2024

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.

chavesgu avatar chavesgu commented on June 16, 2024

@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.

tanveer1302 avatar tanveer1302 commented on June 16, 2024

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.

chavesgu avatar chavesgu commented on June 16, 2024

@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.

helloalbin avatar helloalbin commented on June 16, 2024

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.

chavesgu avatar chavesgu commented on June 16, 2024

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.

helloalbin avatar helloalbin commented on June 16, 2024

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.

chavesgu avatar chavesgu commented on June 16, 2024

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.

Can you just run example successfully?

from images_picker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.