Commit 7a57759d by Karthik Ponnam

v3.1.2 analysis failed fixed

parent 27523390
## [3.1.2]
- Flutter analysis failed fixed
## [3.1.1] ## [3.1.1]
- Not Compiling in android (issue with AndroidX) - Not Compiling in android (issue with AndroidX)
......
...@@ -13,7 +13,7 @@ If you dont want to use androidx then use `fluttertoast` version `2.2.11` ...@@ -13,7 +13,7 @@ If you dont want to use androidx then use `fluttertoast` version `2.2.11`
```yaml ```yaml
# add this line to your dependencies # add this line to your dependencies
fluttertoast: ^3.1.1 fluttertoast: ^3.1.2
``` ```
```dart ```dart
......
...@@ -2,7 +2,6 @@ import 'dart:async'; ...@@ -2,7 +2,6 @@ import 'dart:async';
import 'dart:ui'; import 'dart:ui';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:meta/meta.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
enum Toast { LENGTH_SHORT, LENGTH_LONG } enum Toast { LENGTH_SHORT, LENGTH_LONG }
...@@ -32,7 +31,6 @@ class Fluttertoast { ...@@ -32,7 +31,6 @@ class Fluttertoast {
return res; return res;
} }
static Future<bool> showToast({ static Future<bool> showToast({
@required String msg, @required String msg,
Toast toastLength, Toast toastLength,
...@@ -58,10 +56,11 @@ class Fluttertoast { ...@@ -58,10 +56,11 @@ class Fluttertoast {
gravityToast = "bottom"; gravityToast = "bottom";
} }
if(backgroundColor == null && defaultTargetPlatform == TargetPlatform.iOS) { if (backgroundColor == null &&
defaultTargetPlatform == TargetPlatform.iOS) {
backgroundColor = Colors.black; backgroundColor = Colors.black;
} }
if(textColor == null && defaultTargetPlatform == TargetPlatform.iOS) { if (textColor == null && defaultTargetPlatform == TargetPlatform.iOS) {
textColor = Colors.white; textColor = Colors.white;
} }
final Map<String, dynamic> params = <String, dynamic>{ final Map<String, dynamic> params = <String, dynamic>{
...@@ -70,12 +69,11 @@ class Fluttertoast { ...@@ -70,12 +69,11 @@ class Fluttertoast {
'time': timeInSecForIos, 'time': timeInSecForIos,
'gravity': gravityToast, 'gravity': gravityToast,
'bgcolor': backgroundColor != null ? backgroundColor.value : null, 'bgcolor': backgroundColor != null ? backgroundColor.value : null,
'textcolor': textColor != null ? textColor.value: null, 'textcolor': textColor != null ? textColor.value : null,
'fontSize': fontSize, 'fontSize': fontSize,
}; };
bool res = await _channel.invokeMethod('showToast', params); bool res = await _channel.invokeMethod('showToast', params);
return res; return res;
} }
} }
name: fluttertoast name: fluttertoast
description: Toast Library for FLutter description: Toast Library for Flutter, Easily create toast messages in single line of code
version: 3.1.1 version: 3.1.2
author: Karthik Ponnam <ponnamkarthik3@gmail.com> author: Karthik Ponnam <ponnamkarthik3@gmail.com>
homepage: https://github.com/PonnamKarthik/FlutterToast homepage: https://github.com/PonnamKarthik/FlutterToast
...@@ -10,7 +10,6 @@ environment: ...@@ -10,7 +10,6 @@ environment:
dependencies: dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
meta: ^1.1.7
# For information on the generic Dart part of this file, see the # For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec # following page: https://www.dartlang.org/tools/pub/pubspec
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment