flutter two packages conflict - flutter

I'm trying to use date_picker_timeline saying :
pubspec.YAML
dependencies:
bottom_navy_bar: ^6.0.0
cloud_firestore: ^3.1.18
cupertino_icons: ^1.0.2
dash: ^1.0.3
drop_down_list: ^0.0.2
firebase_auth: ^3.3.20
firebase_core: ^1.18.0
flutter:
sdk: flutter
flutter_secure_storage: ^5.0.2
flutter_signin_button: ^2.0.0
google_fonts: ^3.0.1
google_sign_in: ^5.4.0
line_icons: ^2.0.1
provider: ^6.0.3
snippet_coder_utils: ^1.0.8
date_picker_timeline:
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/date_picker_timeline-1.2.3/lib/date_picker_widget.dart:104:8: Error: Can't declare a member that conflicts with an inherited one.
void initState() {
^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/date_picker_timeline-1.2.3/lib/date_picker_widget.dart:128:20: Error: The method 'call' isn't defined for the class 'void'.
Try correcting the name to the name of an existing method, or defining a method named 'call'.
super.initState();
my datepiker method
DatePicker datePickerMethod() {
return DatePicker(
DateTime.now(),
controller: dp,
initialSelectedDate: DateTime.now(),
selectionColor: Colors.blueAccent,
selectedTextColor: Colors.white,
);
}
already tried to flutter clear alson to delet puspec.lock not working

Related

Any thoughts on why I cannot get this freezed (flutter/dart) example (with generics) to build?

I am new to flutter and dart. I'm trying to get the following example to work in my test project:
https://pub.dev/packages/freezed#deserializing-generic-classes
Here is my entire dart file (api_response.dart):
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:flutter/foundation.dart';
part 'api_response.freezed.dart';
part 'api_response.g.dart';
#Freezed(genericArgumentFactories: true)
class ApiResponse<T> with _$ApiResponse {
const factory ApiResponse<T>.data(T data) = ApiResponseData;
const factory ApiResponse<T>.error(String message) = ApiResponseError;
factory ApiResponse<T>.fromJson(Map<String, dynamic> json, T Function(Object?) fromJsonT) => _$ApiResponseFromJson(json, fromJsonT);
}
When I build with this command:
flutter pub run build_runner build --delete-conflicting-outputs
I receive the following error:
[INFO] Running build...
[SEVERE] freezed:freezed on lib/models/api_response.dart:
This builder requires Dart inputs without syntax errors.
However, package:psf_provider/models/api_response.dart (or an existing part) contains the following errors.
api_response.dart:9:32: Functions must have an explicit list of parameters.
api_response.dart:9:3: Only redirecting factory constructors can be declared to be 'const'.
api_response.dart:9:32: A function body must be provided.
And 13 more...
Here is my pubspec.yaml file definitions to show the versions I'm using:
environment:
sdk: ">=2.17.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
flutter_hooks: ^0.18.0
hooks_riverpod: ^2.0.0-dev.9
dio: ^4.0.0
flutter_secure_storage: ^4.1.0
easy_localization: ^3.0.1
settings_ui: ^2.0.0
freezed_annotation: ^2.1.0
json_annotation: ^4.6.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^1.0.0
build_runner: ^2.2.0
freezed: ^2.1.0+1
json_serializable: ^6.3.1
Any ideas? Thanks for looking!
It looks like the docs are outdated. It should be like the following:
#Freezed(genericArgumentFactories: true)
class ApiResponse<T> with _$ApiResponse<T> {
factory ApiResponse.data(T data) = ApiResponseData;
factory ApiResponse.error(String message) = ApiResponseError;
factory ApiResponse.fromJson(
Map<String, dynamic> json,
T Function(Object? json) fromJsonT,
) =>
_$ApiResponseFromJson<T>(json, fromJsonT);
}

issue with video_player and channel getting null

i got a issue that i try understand how i can fix this
i get this error message about the Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null)
i have try look into but i have no idea why or how it hapending the full message within the post
i try understand what the origin this happened i try clean the build folder via flutter clean this happend
i try run build runner it may missing something nope i got no idea what seem to be the issue here
[GETX] REPLACE ROUTE /splash
[GETX] NEW ROUTE /login
I/flutter (17459): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (17459): │ #0 LoggerService.info
package:demo_ecom/…/utils/logger_service.dart:19
I/flutter (17459): │ #1 _LoginScreenState.initState
package:demo_ecom/…/login/login_screen.dart:32
I/flutter (17459): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (17459): │ 💡 Load Login Screen
I/flutter (17459): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
E/flutter (17459): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null)
E/flutter (17459): #0 VideoPlayerApi.initialize
package:video_player_platform_interface/messages.dart:156
E/flutter (17459): <asynchronous suspension>
E/flutter (17459):
E/flutter (17459): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null)
E/flutter (17459): #0 VideoPlayerApi.create
package:video_player_platform_interface/messages.dart:181
E/flutter (17459): <asynchronous suspension>
E/flutter (17459): #1 MethodChannelVideoPlayer.create
package:video_player_platform_interface/method_channel_video_player.dart:47
E/flutter (17459): <asynchronous suspension>
E/flutter (17459): #2 VideoPlayerController.initialize
package:video_player/video_player.dart:308
E/flutter (17459): <asynchronous suspension>
E/flutter (17459):
Lost connection to device.
the file that play this vid as follow
import 'dart:async';
import 'package:demo_ecom/common/utils/logger_service.dart';
import 'package:demo_ecom/widgets/login/login_buttons.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:video_player/video_player.dart';
import 'package:demo_ecom/generated/l10n.dart';
import 'login_form.dart';
class LoginScreen extends StatefulWidget {
const LoginScreen({Key key}) : super(key: key);
#override
_LoginScreenState createState() => _LoginScreenState();
}
class _LoginScreenState extends State<LoginScreen> {
final _formKey = GlobalKey<FormState>();
VideoPlayerController _controller;
bool _visible = false;
#override
void initState() {
super.initState();
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
]);
LoggerService().info('Load Login Screen');
_controller = VideoPlayerController.asset('assets/media/login-vid.mp4');
_controller.initialize().then((_) {
_controller.setLooping(true);
Timer(const Duration(milliseconds: 100), () {
setState(() {
_controller.play();
_visible = true;
});
});
});
}
#override
void dispose() {
super.dispose();
if (_controller != null) {
_controller.dispose();
_controller = null;
}
}
Widget _getVideoBackground() {
return AnimatedOpacity(
opacity: _visible ? 1.0 : 0.0,
duration: const Duration(milliseconds: 1000),
child: VideoPlayer(_controller),
);
}
Widget _getBackgroundColor() {
return Container(
color: Colors.black.withAlpha(120),
);
}
Widget _getContent(BuildContext context) {
final splogen_1 = S.of(context).login_slogen;
final splogen_2 = S.of(context).login_slogen2;
return Form(
key: _formKey,
child: ListView(
shrinkWrap: true,
padding: EdgeInsets.all(15.0),
children: <Widget>[
const SizedBox(
height: 40.0,
),
const Image(
image: AssetImage('assets/media/logo.jpg'),
width: 150.0,
),
Text(
splogen_1,
style: TextStyle(color: Colors.white, fontSize: 40),
textAlign: TextAlign.center,
),
Container(
margin: const EdgeInsets.only(left: 30.0, right: 30.0, top: 40.0),
alignment: Alignment.center,
child: Text(
splogen_2,
textAlign: TextAlign.center,
style: TextStyle(color: Colors.white, fontSize: 20),
),
),
LoginForm(),
LoginButtons()
],
),
);
}
#override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
body: Center(
child: Stack(
children: <Widget>[
_getVideoBackground(),
_getBackgroundColor(),
_getContent(context),
],
),
),
),
);
}
}
the pubspec as follow
name: demo_ecom
description: Demo Ecom App
# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+2
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
# Service locator
provider: ^5.0.0
# Connectivity
data_connection_checker: ^0.3.4
# Logging
logger: ^1.0.0
# Json
json_annotation: ^4.0.1
# firebase
firebase_core: ^0.7.0
firebase_remote_config: "^0.6.0"
firebase_auth: "^0.20.1"
firebase_crashlytics: ^0.4.0+1
#auth social
google_sign_in: "^4.5.1"
flutter_facebook_auth: "^1.0.0"
# localization
intl: ^0.17.0
# ui tools
flutter_password_strength: ^0.1.6
flutter_signin_button: ^1.1.0
animations: ^2.0.0
pull_to_refresh: ^1.6.4
get: ^3.26.0
flutter_easyloading: ^3.0.0
responsive_framework: ^0.1.0
animated_text_kit: ^4.1.0
flutter_spinkit: "^5.0.0"
convex_bottom_bar: ^3.0.0
introduction_screen: ^2.0.0
flash: ^1.5.1
material_floating_search_bar: ^0.3.3
video_player: ^2.0.0
chewie: ^1.0.0
# ui icons
cupertino_icons: ^1.0.2
font_awesome_flutter: ^9.0.0
flutter_icons: ^1.1.0
# misc tools
validators: ^2.0.1
dio: ^3.0.10
pretty_dio_logger: ^1.1.1
jiffy: ^4.0.0
equatable: ^2.0.0
meta: ^1.3.0
stack_trace: ^1.10.0
shared_preferences: ^2.0.5
async: ^2.5.0
# override requirement that conflict will rise if removed
dependency_overrides:
analyzer: ^1.3.0
yaml: ^3.1.0
intl: ^0.17.0
dart_style: ^2.0.0
args: ^2.0.0
glob: ^2.0.0
source_gen: ^1.0.0
logging: ^1.0.1
convert: ^3.0.0
crypto: ^3.0.0
vin_decoder: ^0.1.3
json_annotation: ^4.0.1
font_awesome_flutter: ^9.0.0
dev_dependencies:
# add build runner if not already added
build_runner: ^1.12.2
flutter_test:
sdk: flutter
# Linting
lint: ^1.5.3
# Json
json_serializable: ^4.1.0
# misc tools
mockito: ^5.0.2
flutter_launcher_icons: ^0.9.0
environment_config: ^2.2.5
flutter_rename_app: ^1.0.0
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
assets:
- assets/fonts/
- assets/media/
- assets/icons/
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-package
# To hide the notification bar, use the fullscreen parameter. Has no affect in web since web
# has no notification bar. Defaults to false.
# NOTE: Unlike Android, iOS will not automatically show the notification bar when the app loads.
# To show the notification bar, add the following code to your Flutter app:
# WidgetsFlutterBinding.ensureInitialized();
# SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom, SystemUiOverlay.top]);
#fullscreen: true
# If you have changed the name(s) of your info.plist file(s), you can specify the filename(s)
# with the info_plist_files parameter. Remove only the # characters in the three lines below,
# do not remove any spaces:
#info_plist_files:
# - 'ios/Runner/Info-Debug.plist'
# - 'ios/Runner/Info-Release.plist'
flutter_intl:
enabled: true
localizely:
project_id: c4305176-c927-4336-80bd-7bbc91f25b3d
flutter_icons:
image_path: 'assets/assets/icons/app_icon.png'
android: true
ios: true
flutter_rename_app:
application_name: Demo Ecom
dart_package_name: demo_ecom
application_id: com.wolberg.pro.demo
bundle_id: com.wolberg.pro.demo
android_package_name: com.wolberg.pro.demo
targets:
$default:
builders:
injectable_generator:injectable_builder:
options:
auto_register: true
# auto registers any class with a name matches the given pattern
class_name_pattern:
"Service$|Repository$"
# auto registers any class inside a file with a
# name matches the given pattern
file_name_pattern: "_service$|_repository$"
#flutter pub run flutter_rename_app
i got no idea what i can do not sure what i did here wrong thanks for the helpers

After selecting image from image picker , flutter app crashes

It works good when I tab on selecting image from camera. After selecting image from camera it suddenly crashes and goes back to previous screen .. terminal is show no error .. m using try & catch method but it catch no error as well.
Future pickimage() async {
try{
await ImagePicker.pickImage(
source: ImageSource.camera,
imageQuality: 50,
).then((img) => setState(() {
immage = img;
imagefile = File(immage.path);
}));
if (imagefile != null) {
print('heloo data is saving to database');
await saveimage();
}
}catch(e){
print(e);
}
}
m using latest image_picker() version this is my pub dependences
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.0
carousel_slider: ^2.3.1
animated_text_kit: ^1.3.1
cloud_firestore: ^0.14.3
progress_dialog: ^1.2.4
firebase_auth: ^0.18.4+1
firebase_core: ^0.5.3
google_maps_flutter: ^1.0.6
geolocator: ^6.1.5
geoflutterfire: ^2.2.1
image_picker: ^0.6.7+22
firebase_storage: ^5.2.0
latlng: ^0.0.2
location: ^3.1.0
simple_animations: ^2.4.0
liquid_swipe: ^1.5.0
otp_text_field: ^1.0.1
charts_flutter: ^0.9.0
flutter_echarts: ^1.5.0
flutter_staggered_animations: "^0.1.2"
Have you added few lines of configuration on AndroidManifest.xml ?
You should add:
<activity
android:name="com.yalantis.ucrop.UCropActivity"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar"/>
check this url: https://pub.dev/packages/image_cropper/versions/1.3.1
and section: How to install
This is an error in the plugin. You can track the similar issues on GitHub (for example here and here) and provide your error and device hardware info for developers.
Any Feedback on this?
It seems it happening every time i call pickImage.
Future getImage() async {
final _imageFiles =
await ImagePicker().getImage(source: ImageSource.gallery);
if (_imageFiles != null) {
File _imageFile = await Navigator.of(context).push(
MaterialPageRoute(
builder: (_) => ImageCropper(file: File(_imageFiles.path))),
);
if (_imageFile != null) {
setState(() {
profilePicChange = _imageFile.path;
// Navigator.pop(context);
});
}
}
In my case apps crush with message "Lost connection to device." both on real device and on simulator.

Stripe cannot make make payment error in webview

I'm using stripe payment gateway in my app everything works fine when i enter card details after that it redirect to the OTP page after enter otp and submit it throws this error
This problem occurs only in live mode, in test mode debit card won't ask for OTP
I/flutter ( 5342): errprint : PlatformException(failed, failed, null, null)
payment-service.dart
import 'dart:convert';
import 'package:flutter/services.dart';
import 'package:http/http.dart' as http;
import 'package:stripe_payment/stripe_payment.dart';
class StripeTransactionResponse {
String message;
bool success;
StripeTransactionResponse({this.message, this.success});
}
class StripeService {
static String apiBase = 'https://api.stripe.com/v1';
static String paymentApiUrl = '${StripeService.apiBase}/payment_intents';
static String secret = 'xxxMy_secretxxx';
static Map<String, String> headers = {
'Authorization': 'Bearer ${StripeService.secret}',
'Content-Type': 'application/x-www-form-urlencoded'
};
static init() {
StripePayment.setOptions(StripeOptions(
publishableKey: "xxxMy_keyxxx",
androidPayMode: 'production'));
}
static Future<StripeTransactionResponse> payViaExistingCard(
{String amount, String currency, CreditCard card}) async {
try {
var paymentMethod = await StripePayment.createPaymentMethod(
PaymentMethodRequest(card: card));
var paymentIntent =
await StripeService.createPaymentIntent(amount, currency);
print("payment intent ${paymentIntent}");
var response = await StripePayment.confirmPaymentIntent(PaymentIntent(
clientSecret: paymentIntent['client_secret'],
paymentMethodId: paymentMethod.id));
print("Payment confirm ${response.status}");
if (response.status == 'succeeded') {
return new StripeTransactionResponse(
message: 'Transaction successful', success: true);
} else {
return new StripeTransactionResponse(
message: 'Transaction failed', success: false);
}
} on PlatformException catch (err) {
print("errprint : $err");
return StripeService.getPlatformExceptionErrorResult(err);
} catch (err) {
print("errprint$err");
return new StripeTransactionResponse(
message: 'Transaction failed: ${err.toString()}', success: false);
}
}
static Future<Map<String, dynamic>> createPaymentIntent(
String amount, String currency) async {
try {
Map<String, dynamic> body = {
'amount': amount,
'currency': currency,
'payment_method_types[]': 'card',
'description': 'Software development services',
'shipping[name]': 'Jenny Rosen',
'shipping[address][line1]': '510 Townsend St',
'shipping[address][postal_code]': '98140',
'shipping[address][city]': 'San Francisco',
'shipping[address][state]': 'TN',
'shipping[address][country]': 'IN',
};
var response = await http.post(StripeService.paymentApiUrl,
body: body, headers: StripeService.headers);
print("check post res${jsonDecode(response.body)}");
return jsonDecode(response.body);
} catch (err) {
print('err charging user: ${err.toString()}');
}
return null;
}
}
This is my pubspec.yaml
name: message
description: A new Flutter project.
# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
intro_slider: ^2.3.2
firebase_auth: ^0.18.0+1
cloud_firestore: ^0.14.0+2
fluttertoast: ^7.0.2
image_picker: ^0.6.0+9
shared_preferences: ^0.5.3+1
firebase_storage: ^4.0.0
#flutter_html: ^1.0.2
firebase_core: ^0.5.0
giffy_dialog:
cached_network_image: ^2.2.0+1
modal_progress_hud: ^0.1.3
intl: ^0.16.1
flutter_clipboard_manager:
sentry: ^2.2.0
timeago: ^2.0.27
qr_flutter:
graphql:
image_cropper: ^1.0.2
contacts_service: ^0.4.6
permission_handler: ^5.0.1+1
share: ^0.6.1
fleva_icons: ^1.0.0
google_fonts : ^0.2.0
flutter_staggered_grid_view: ^0.3.0
flutter_icons: ^1.0.0+1
flutter_cache_store:
web3dart: ^1.2.3
bitcoins: ^1.0.3
#bitcoinFlutter
bitcoin_flutter: ^2.0.1
carousel_slider: ^1.3.1
transparent_image: ^1.0.0
smooth_star_rating: ^1.0.3
dots_indicator: ^1.1.0
bip32: ^1.0.5
bip39: ^1.0.3
tuple:
hex: ^0.1.2
scoped_model: ^1.0.1
equatable:
crypto: ^2.1.5
encrypt: ^4.0.2
localstorage:
path_provider:
photo_view: ^0.4.0
mime: ^0.9.6+2
ntp: ^1.0.3
decimal:
virtual_keyboard:
local_auth:
url_launcher: ^5.7.2
launch_review: ^2.0.0
flutter_secure_storage: ^3.3.4
giphy_client: ^0.2.0
flutter_barcode_scanner:
firebase_messaging: ^5.0.2
font_awesome_flutter:
#otpinput field
pin_code_fields: ^5.0.1
#otpanimation lib
flare_flutter: ^2.0.6
flutter_slidable: ^0.5.7
file_picker: ^2.0.6
ethereum_address:
flutter_downloader:
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.3
#upi payment gateway
upi_india: ^2.1.2
cool_alert: ^1.0.1
#webview for paymentgateway
#webview_flutter: ^1.0.0
#paypal payment gateway
http_auth: ^0.3.0
#Razorpay payment gateway
#razorpay_flutter: ^1.2.2
#stripe payment gateway
stripe_payment: ^1.0.8
#stripeUI
flutter_credit_card: ^0.1.3
progress_dialog: ^1.2.2
dev_dependencies:
flutter_test:
sdk: flutter
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
assets:
- assets/img_not_available.jpeg
- assets/flags/
- assets/emoji/
- assets/images/
- assets/bg1.jpg
- assets/giphy.png
- assets/anime/otp.flr
- assets/splash.png
- assets/splashc.jpg
- assets/json/FacebookPost.json
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages
Assuming that "OTP" is a "one time password" as part of a 3D Secure flow, then you can trigger this in test mode by using the SCA regulatory test cards such as the 3155 or 3184 card.
It's not clear where your error is coming from, but if you can share more detail with reproduction in test mode then someone may be able to offer more suggestions.

MissingPluginException(No implementation found for method init on channel plugins.flutter.io/google_sign_in) FLUTTER

I have run flutter doctor and it is reporting no error. The google authentication works fine in IOS but not for android. People tend to say an update does the job but it has not worked for me.It crashes on: _currentUser = await _googleSignIn.signIn();
try {
_currentUser = await _googleSignIn.signIn();
final GoogleSignInAuthentication googleSignInAuthentication =
await _currentUser.authentication;
final AuthCredential credential = GoogleAuthProvider.getCredential(
accessToken: googleSignInAuthentication.accessToken,
idToken: googleSignInAuthentication.idToken,
);
final authResult = await _auth.signInWithCredential(credential);
final user = await _auth.currentUser();
}catch(ex){}
The pubspec file is as follows:
name: app
description: A new Flutter project.
publish_to: 'none' # Remove this line if you wish to publish to
pub.dev
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.3
modal_progress_hud: ^0.1.3
http: ^0.12.2
shared_preferences: ^0.5.8
firebase_core: ^0.4.5
firebase_auth: ^0.16.1
cloud_firestore: ^0.13.7
flutter_facebook_login: ^3.0.0
flutter_facebook_auth: ^0.2.3
google_sign_in: ^4.5.1
flutter_signin_button: ^1.0.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
assets:
- assets/images/
fonts:
- family: Questrial
fonts:
- asset: assets/fonts/Questrial-Regular.ttf
weight: 900
This was solved in one of two ways, I moved from master to stable branch and also completed the Facebook authentication. For whatever reason there is some dependency if you use the SignInButtons package so both needed to be implemented.