Commit 7a57759d by Karthik Ponnam

v3.1.2 analysis failed fixed

parent 27523390
## [3.1.2]
- Flutter analysis failed fixed
## [3.1.1]
- 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`
```yaml
# add this line to your dependencies
fluttertoast: ^3.1.1
fluttertoast: ^3.1.2
```
```dart
......
......@@ -2,7 +2,6 @@ import 'dart:async';
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:meta/meta.dart';
import 'package:flutter/foundation.dart';
enum Toast { LENGTH_SHORT, LENGTH_LONG }
......@@ -32,7 +31,6 @@ class Fluttertoast {
return res;
}
static Future<bool> showToast({
@required String msg,
Toast toastLength,
......@@ -58,10 +56,11 @@ class Fluttertoast {
gravityToast = "bottom";
}
if(backgroundColor == null && defaultTargetPlatform == TargetPlatform.iOS) {
if (backgroundColor == null &&
defaultTargetPlatform == TargetPlatform.iOS) {
backgroundColor = Colors.black;
}
if(textColor == null && defaultTargetPlatform == TargetPlatform.iOS) {
if (textColor == null && defaultTargetPlatform == TargetPlatform.iOS) {
textColor = Colors.white;
}
final Map<String, dynamic> params = <String, dynamic>{
......@@ -70,12 +69,11 @@ class Fluttertoast {
'time': timeInSecForIos,
'gravity': gravityToast,
'bgcolor': backgroundColor != null ? backgroundColor.value : null,
'textcolor': textColor != null ? textColor.value: null,
'textcolor': textColor != null ? textColor.value : null,
'fontSize': fontSize,
};
bool res = await _channel.invokeMethod('showToast', params);
return res;
}
}
name: fluttertoast
description: Toast Library for FLutter
version: 3.1.1
description: Toast Library for Flutter, Easily create toast messages in single line of code
version: 3.1.2
author: Karthik Ponnam <ponnamkarthik3@gmail.com>
homepage: https://github.com/PonnamKarthik/FlutterToast
......@@ -10,7 +10,6 @@ environment:
dependencies:
flutter:
sdk: flutter
meta: ^1.1.7
# For information on the generic Dart part of this file, see the
# 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