fix issues
parent
79103a5c84
commit
4b89b78ab4
@ -1,16 +1,15 @@
|
|||||||
// import 'package:firebase_analytics/firebase_analytics.dart';
|
import 'package:firebase_analytics/firebase_analytics.dart';
|
||||||
// import 'package:firebase_analytics/observer.dart';
|
import 'package:firebase_analytics/observer.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
|
|
||||||
class AnalyticsService {
|
class AnalyticsService {
|
||||||
// final FirebaseAnalytics _analytics = FirebaseAnalytics();
|
final FirebaseAnalytics _analytics = FirebaseAnalytics();
|
||||||
//
|
|
||||||
// FirebaseAnalyticsObserver getAnalyticsObserver() => FirebaseAnalyticsObserver(analytics: _analytics);
|
FirebaseAnalyticsObserver getAnalyticsObserver() => FirebaseAnalyticsObserver(analytics: _analytics);
|
||||||
//
|
|
||||||
Future logEvent({required String eventCategory, required String eventAction}) async {
|
Future logEvent({required String eventCategory, required String eventAction}) async {
|
||||||
// await _analytics.logEvent(name: 'event', parameters: {
|
await _analytics.logEvent(name: 'event', parameters: {
|
||||||
// "eventCategory": eventCategory,
|
"eventCategory": eventCategory,
|
||||||
// "eventAction": eventAction,
|
"eventAction": eventAction,
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,78 +1,26 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_flexible_toast/flutter_flexible_toast.dart';
|
import 'package:fluttertoast/fluttertoast.dart';
|
||||||
|
|
||||||
class DrAppToastMsg {
|
class DrAppToastMsg {
|
||||||
void showLongToast(msg) {
|
|
||||||
FlutterFlexibleToast.showToast(
|
|
||||||
message: msg,
|
|
||||||
toastLength: Toast.LENGTH_LONG,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void showSuccesToast(msg) {
|
static void showSuccesToast(msg) {
|
||||||
FlutterFlexibleToast.showToast(
|
Fluttertoast.showToast(
|
||||||
message: msg,
|
msg: msg,
|
||||||
toastLength: Toast.LENGTH_SHORT,
|
toastLength: Toast.LENGTH_SHORT,
|
||||||
|
gravity: ToastGravity.TOP,
|
||||||
|
// timeInSecForIosWeb: timeInSeconds,
|
||||||
backgroundColor: Colors.green,
|
backgroundColor: Colors.green,
|
||||||
icon: ICON.SUCCESS,
|
textColor: Colors.white,
|
||||||
fontSize: 16,
|
fontSize: 16);
|
||||||
imageSize: 35,
|
|
||||||
textColor: Colors.white);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void showErrorToast(msg) {
|
static void showErrorToast(msg) {
|
||||||
FlutterFlexibleToast.showToast(
|
Fluttertoast.showToast(
|
||||||
message: msg,
|
msg: msg,
|
||||||
toastLength: Toast.LENGTH_SHORT,
|
toastLength: Toast.LENGTH_SHORT,
|
||||||
toastGravity: ToastGravity.TOP,
|
gravity: ToastGravity.TOP,
|
||||||
backgroundColor: Colors.red,
|
backgroundColor: Colors.red,
|
||||||
icon: ICON.CLOSE,
|
|
||||||
fontSize: 16,
|
|
||||||
imageSize: 35,
|
|
||||||
timeInSeconds: 912,
|
|
||||||
textColor: Colors.white);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void showShortToast(msg) {
|
|
||||||
FlutterFlexibleToast.showToast(
|
|
||||||
message: msg,
|
|
||||||
toastLength: Toast.LENGTH_SHORT,
|
|
||||||
icon: ICON.INFO,
|
|
||||||
timeInSeconds: 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void showTopShortToast(msg) {
|
|
||||||
FlutterFlexibleToast.showToast(
|
|
||||||
message: msg,
|
|
||||||
toastLength: Toast.LENGTH_SHORT,
|
|
||||||
toastGravity: ToastGravity.TOP,
|
|
||||||
icon: ICON.WARNING,
|
|
||||||
timeInSeconds: 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void showCenterShortToast(msg) {
|
|
||||||
FlutterFlexibleToast.showToast(
|
|
||||||
message: msg,
|
|
||||||
toastLength: Toast.LENGTH_SHORT,
|
|
||||||
toastGravity: ToastGravity.CENTER,
|
|
||||||
icon: ICON.WARNING,
|
|
||||||
timeInSeconds: 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void showCenterShortLoadingToast(msg) {
|
|
||||||
FlutterFlexibleToast.showToast(
|
|
||||||
message: msg,
|
|
||||||
toastLength: Toast.LENGTH_LONG,
|
|
||||||
toastGravity: ToastGravity.BOTTOM,
|
|
||||||
icon: ICON.LOADING,
|
|
||||||
radius: 20,
|
|
||||||
elevation: 10,
|
|
||||||
textColor: Colors.white,
|
textColor: Colors.white,
|
||||||
|
fontSize: 16);
|
||||||
timeInSeconds: 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void cancelToast(msg) {
|
|
||||||
FlutterFlexibleToast.cancel();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue