![]() |
VOOZH | about |
dotnet add package SweetMeSoft.Mobile.Base --version 1.11.136
NuGet\Install-Package SweetMeSoft.Mobile.Base -Version 1.11.136
<PackageReference Include="SweetMeSoft.Mobile.Base" Version="1.11.136" />
<PackageVersion Include="SweetMeSoft.Mobile.Base" Version="1.11.136" />Directory.Packages.props
<PackageReference Include="SweetMeSoft.Mobile.Base" />Project file
paket add SweetMeSoft.Mobile.Base --version 1.11.136
#r "nuget: SweetMeSoft.Mobile.Base, 1.11.136"
#:package SweetMeSoft.Mobile.Base@1.11.136
#addin nuget:?package=SweetMeSoft.Mobile.Base&version=1.11.136Install as a Cake Addin
#tool nuget:?package=SweetMeSoft.Mobile.Base&version=1.11.136Install as a Cake Tool
Base library with a set of utilities, base classes and services to accelerate .NET MAUI application development.
SweetMeSoft.Mobile.Base is a library for .NET MAUI that provides a robust base architecture for mobile applications, following the MVVM pattern. It includes a base ViewModel with integrated functionalities, a popup service, and extensions for simple initial configuration.
AppHostBuilderExtensions):
UseSweetMeSoftBase for MauiAppBuilder that initializes necessary dependencies like CommunityToolkit.Maui and UserDialogs.AppBaseViewModel):
NavigationViewModel (not included but implicit) for simple navigation management.Get and Post methods that integrate with SweetMeSoft.Connectivity to perform HTTP requests. They automatically manage connectivity, authentication tokens and loading indicators.Acr.UserDialogs for alerts and confirmations, and uses its own PopupsService to show a "loading" popup.Logout method to clear user preferences and restart navigation.PopupsService):
LoadingPopup) consistently throughout the application.dotnet add package SweetMeSoft.Mobile.Base
MauiProgram.csIn your MauiProgram.cs file, use the UseSweetMeSoftBase method to register the library and its dependencies.
using SweetMeSoft.Mobile.Base;
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
// Call the extension method and pass your API base URL
.UseSweetMeSoftBase("https://api.yourdomain.com")
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});
// ... Register your own views and viewmodels
// builder.Services.AddSingleton<MyPage>();
// builder.Services.AddSingleton<MyViewModel>();
return builder.Build();
}
}
AppBaseViewModelCreate your ViewModels inheriting from AppBaseViewModel to access all the integrated functionality.
using SweetMeSoft.Mobile.Base.ViewModels;
using CommunityToolkit.Mvvm.Input; // Required for [RelayCommand]
using System.Threading.Tasks;
public partial class MyViewModel : AppBaseViewModel
{
// Observable properties can be defined with CommunityToolkit.Mvvm
// [ObservableProperty]
// private string myData;
public MyViewModel()
{
// AppBaseViewModel handles navigation through Shell or NavigationPage
}
[RelayCommand]
private async Task LoadDataAsync()
{
// The 'true' in showLoading is the default value, which
// will automatically activate PopupsService.ShowLoading/HideLoading.
var result = await Get<MyDataModel>("/my-api/endpoint", showLoading: true);
if (result != null)
{
// ... process the result
// MyData = result.SomeProperty;
}
}
[RelayCommand]
private async Task GoToDetailsAsync()
{
// Navigate to another page registered in the DI Container
await GoToAsync<DetailsPage>();
}
}
Bind your ViewModel commands to your view controls.
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:vm="clr-namespace:MyProject.ViewModels"
x:Class="MyProject.MyPage"
x:DataType="vm:MyViewModel">
<VerticalStackLayout>
<Button Text="Load Data" Command="{Binding LoadDataCommand}" />
<Button Text="View Details" Command="{Binding GoToDetailsCommand}" />
</VerticalStackLayout>
</ContentPage>
This project is under the MIT license.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-android36.0 net10.0-android36.0 is compatible. net10.0-ios26.0 net10.0-ios26.0 is compatible. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.11.136 | 716 | 12/3/2025 |
| 1.11.135 | 693 | 12/3/2025 |
| 1.11.134 | 699 | 12/3/2025 |
| 1.11.133 | 702 | 12/3/2025 |
| 1.11.132 | 293 | 11/30/2025 |
| 1.11.131 | 436 | 11/20/2025 |
| 1.11.130 | 209 | 10/21/2025 |
| 1.11.129 | 354 | 9/17/2025 |
| 1.11.128 | 265 | 4/19/2025 |
| 1.11.127 | 295 | 4/19/2025 |
| 1.11.126 | 297 | 4/19/2025 |
| 1.11.125 | 203 | 4/19/2025 |
| 1.11.124 | 196 | 4/19/2025 |
| 1.11.123 | 266 | 4/4/2025 |
| 1.11.122 | 254 | 7/23/2024 |
| 1.11.121 | 239 | 6/26/2024 |
| 1.11.120 | 217 | 6/24/2024 |
| 1.11.119 | 236 | 6/21/2024 |
| 1.11.118 | 229 | 6/21/2024 |
| 1.11.117 | 232 | 5/31/2024 |