public async Task <IInAppNotification> ShowNotification(InAppNotificationControlViewModel viewModel = null, int milliseconds = 0)
        {
            IInAppNotification notification = GetNotification(viewModel);

            await notification.Show(milliseconds);

            return(notification);
        }
        public IInAppNotification GetNotification(InAppNotificationControlViewModel viewModel = null)
        {
            IInAppNotification notification = MainPage.Instance.MainInAppNotification;

            if (viewModel != null)
            {
                notification.ViewModel = viewModel;
            }

            return(notification);
        }
예제 #3
0
        public App(IPresentationFactory presentationFactory, IPermissions currentPermissions, IGeolocator geolocator, IClipboard clipboard, IInAppNotification inAppNotification)
        {
            PresentationFactory = presentationFactory;
            CurrentPermissions  = currentPermissions;
            Geolocator          = geolocator;
            Clipboard           = clipboard;
            InAppNotification   = inAppNotification;

            var mainPage = new MainPage();

            InitializeComponent();
            MainPage = mainPage;
        }