import React from 'react';
import {Platform,ToastAndroid,Text} from 'react-native';
// import {Snackbar} from 'react-native-paper';
import Snackbar from 'react-native-snackbar';

export const notify = (message='',type='SHORT') => {
    if (Platform.OS != 'android') {
        Snackbar.show({
            text:message,
            duration: (type=='SHORT'?Snackbar.LENGTH_SHORT:Snackbar.LENGTH_LONG),
        });
    } else {
        const toast_time=type=='SHORT'?ToastAndroid.SHORT:ToastAndroid.LONG;
        ToastAndroid.show(message, toast_time);
    }
}