-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMauiProgram.cs
63 lines (57 loc) · 1.63 KB
/
MauiProgram.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
using CommunityToolkit.Maui;
using Microsoft.Maui.Handlers;
using Microsoft.Maui.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.Maui.Controls.Hosting;
using ToDoListApp;
using System;
using Microcharts.Maui;
using Plugin.Maui.Biometric;
#if ANDROID
using Microsoft.Maui.Controls.Compatibility.Platform.Android;
#endif
#if DEBUG
using Maui.FreakyEffects;
using The49.Maui.BottomSheet;
using DotNet.Meteor.HotReload.Plugin;
#endif
namespace ToDoListApp;
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
// DI for biometricss
builder.Services.AddSingleton<IBiometric>(BiometricAuthenticationService.Default);
builder
.UseMauiApp<App>()
.UseMauiCommunityToolkit()
.UseMicrocharts()
#if DEBUG
.UseBottomSheet()
.EnableHotReload()
.ConfigureEffects(effects =>
{
effects.InitFreakyEffects();
})
#endif
.ConfigureFonts(fonts =>
{
fonts.AddFont("Inter-Regular.ttf", "InterRegular");
fonts.AddFont("Inter-SemiBold.ttf", "InterSemiBold");
fonts.AddFont("Inter-Bold.ttf", "InterBold");
})
.ConfigureMauiHandlers(handlers =>
{
#if ANDROID
handlers.AddHandler<CustomViewCell, CustomViewCellHandler>();
#endif
})
.ConfigureEssentials(essentials =>
{
essentials.UseVersionTracking();
});
AndroidHandlers.Apply();
return builder.Build();
}
}