AwaitablePopups 0.3.8

There is a newer version of this package available.
See the version list below for details.
dotnet add package AwaitablePopups --version 0.3.8                
NuGet\Install-Package AwaitablePopups -Version 0.3.8                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AwaitablePopups" Version="0.3.8" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AwaitablePopups --version 0.3.8                
#r "nuget: AwaitablePopups, 0.3.8"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install AwaitablePopups as a Cake Addin
#addin nuget:?package=AwaitablePopups&version=0.3.8

// Install AwaitablePopups as a Cake Tool
#tool nuget:?package=AwaitablePopups&version=0.3.8                

Table of Contents

Codacy Codacy Badge NuGet nuget CodeFactor CodeFactor Fuget AwaitablePopups on fuget.org (Use Fuget to see API differences between each package.)

https://www.fuget.org/packages/AwaitablePopups/badges

About The Project

Awaitable Popups is a neat blend of the Rg.Plugins.Popup and AsyncAwaitBestPractices plugins to bring you a quick way to add popups into your Xamarin Forms App using familiar concepts

Built With

Getting Started

First, you must follow the initialisation guide set out by Rg.Plugins.Popup, once you have that, have a look at usage down below

Installation

You can install the nuget by looking up 'AwaitablePopups' in your nuget package manager, or by getting it here

Usage

here is an example of what this plugin makes easy (Looks slow due to giphy)

Gif Example

I have included the older, 'safer' example, and the new simplfied example.

New Example

To Use the plugin for its inbuilt popup pages (Dual/Single Response, TextInput and loader.) All you need are these one liners

SingleResponse Popup Page

return await SingleResponseViewModel.GeneratePopup(new PopupButton(Color.Goldenrod, Color.Black, "Okay"), Color.Gray, "Your Phone Number or Pin is incorrect, please try again.", "NoSource.png");

DualResponse Popup Page

return await DualResponseViewModel.GeneratePopup(new PopupButton(Color.Green, Color.Black, "I Accept"), new PopupButton(Color.Red, Color.Black, "I decline"), Color.Gray, "Do you accept the terms and conditions?", "NoSource.png");

Loader Popup Page

  await PopupService.WrapTaskInLoader(Task.Delay(10000), Color.Blue, Color.White, LoadingReasons(), Color.Black);

Text Input PopupPage

await TextInputViewModel.GeneratePopup(new PopupButton(Color.Green, Color.Black, "I Accept"), new PopupButton(Color.Red, Color.Black, "I decline"), Color.Green, "TEXT HERE", "Placeholder");

LoginPage is currently going through some testing, come back soon. LoginPage PopupPage

await LoginPageViewModel.GeneratePopup(CHECK DOCUMENTATION);

or, to return from the loader a value

await PopupService.WrapReturnableTaskInLoader<bool>(IndepthCheckAgainstDatabase(), Color.Blue, Color.White, LoadingReasons(), Color.Black);

you can also add in synchronous functions, however they are wrapped in a task


private bool LongRunningFunction(int millisecondDelay)
{
    Thread.Sleep(millisecondDelay);
    return true;
}
await PopupService.WrapReturnableFuncInLoader(LongRunningFunction, 6000, Color.Blue, Color.White, LoadingReasons(), Color.Black);

That's it! for a more indepth of how it works, check out the Github at AwaitablePopups

License

This project uses the MIT License

Contact

My Github, or reach me on the Xamarin Slack, or on my E-mail

Project Link: AwaitablePopups

Acknowledgements

  • Brimmick has been a model to follow (might steal his hackernews app for an example)
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.5 2,181 1/13/2021
1.1.4 838 8/26/2020
1.1.3 454 8/24/2020
1.1.2 476 8/20/2020
1.1.1-rc 407 8/18/2020
1.1.0 469 8/7/2020
1.0.2 537 7/21/2020
1.0.1 502 7/3/2020
1.0.0 596 7/1/2020 1.0.0 is deprecated because it is no longer maintained.
0.3.8 616 6/8/2020 0.3.8 is deprecated because it is no longer maintained.
0.3.5 646 5/4/2020 0.3.5 is deprecated because it is no longer maintained.
0.3.4 607 4/20/2020 0.3.4 is deprecated because it is no longer maintained.
0.3.3 785 4/20/2020 0.3.3 is deprecated because it is no longer maintained.
0.3.1 787 4/20/2020 0.3.1 is deprecated because it is no longer maintained.
0.3.1-Alpha 652 4/17/2020 0.3.1-Alpha is deprecated because it is no longer maintained.
0.3.0 738 3/24/2020 0.3.0 is deprecated because it is no longer maintained.
0.2.5 1,073 3/23/2020 0.2.5 is deprecated because it is no longer maintained.
0.2.4 1,111 3/23/2020 0.2.4 is deprecated because it is no longer maintained.
0.2.3 1,121 3/23/2020 0.2.3 is deprecated because it is no longer maintained.
0.2.1 1,119 3/23/2020 0.2.1 is deprecated because it is no longer maintained.
0.2.0 1,016 3/20/2020 0.2.0 is deprecated because it is no longer maintained.
0.1.9 1,235 3/20/2020 0.1.9 is deprecated because it is no longer maintained.
0.1.8 950 3/11/2020 0.1.8 is deprecated because it is no longer maintained.
0.1.7 945 3/9/2020 0.1.7 is deprecated because it is no longer maintained.
0.1.6 1,064 2/24/2020 0.1.6 is deprecated because it is no longer maintained.
0.1.5 1,079 2/10/2020 0.1.5 is deprecated because it is no longer maintained.
0.1.3 1,657 1/31/2020 0.1.3 is deprecated because it is no longer maintained.
0.1.2 1,412 1/31/2020 0.1.2 is deprecated because it is no longer maintained.

Fixed Major bug in LoginViewModel using its GeneratePopup Methods which caused it to return bad results. This was due to me assigning the wrong ViewModel in the background.

Beginning the process of Interfacing this out. Added Basic interfaces for all the ViewModels. However, not too useful just yet.

Added in the new EntryInputViewModel. Its the same as the original TextInput, however, this uses the much smaller entry field opposed to the Editor in the TextInput. IN hindsight a name change would've been smarter

Fixed issues with the example app, as i had some brainfog and had switched the text/vibe of the left and right buttons