diff --git a/samples/CommunityToolkit.Maui.Sample/AppShell.xaml.cs b/samples/CommunityToolkit.Maui.Sample/AppShell.xaml.cs index d24ccb279f..5010fa1b96 100644 --- a/samples/CommunityToolkit.Maui.Sample/AppShell.xaml.cs +++ b/samples/CommunityToolkit.Maui.Sample/AppShell.xaml.cs @@ -93,6 +93,7 @@ public partial class AppShell : Shell CreateViewModelMapping(), CreateViewModelMapping(), CreateViewModelMapping(), + CreateViewModelMapping(), // Add Extensions View Models CreateViewModelMapping(), diff --git a/samples/CommunityToolkit.Maui.Sample/CommunityToolkit.Maui.Sample.csproj b/samples/CommunityToolkit.Maui.Sample/CommunityToolkit.Maui.Sample.csproj index b07f22205f..d4a9ebcdc9 100644 --- a/samples/CommunityToolkit.Maui.Sample/CommunityToolkit.Maui.Sample.csproj +++ b/samples/CommunityToolkit.Maui.Sample/CommunityToolkit.Maui.Sample.csproj @@ -1,4 +1,4 @@ - + $(NetVersion)-ios;$(NetVersion)-android;$(NetVersion)-maccatalyst diff --git a/samples/CommunityToolkit.Maui.Sample/MauiProgram.cs b/samples/CommunityToolkit.Maui.Sample/MauiProgram.cs index f0f048a0b6..e1f0e3f671 100644 --- a/samples/CommunityToolkit.Maui.Sample/MauiProgram.cs +++ b/samples/CommunityToolkit.Maui.Sample/MauiProgram.cs @@ -211,6 +211,7 @@ static void RegisterViewsAndViewModels(in IServiceCollection services) services.AddTransientWithShellRoute(); services.AddTransientWithShellRoute(); services.AddTransientWithShellRoute(); + services.AddTransientWithShellRoute(); // Add Extensions Pages + ViewModels services.AddTransientWithShellRoute(); @@ -262,7 +263,8 @@ static void RegisterEssentials(in IServiceCollection services) services.AddSingleton(FileSystem.Current); services.AddSingleton(FolderPicker.Default); services.AddSingleton(Badge.Default); - services.AddSingleton(SpeechToText.Default); + services.AddKeyedSingleton("Online"); + services.AddKeyedSingleton("Offline"); services.AddSingleton(TextToSpeech.Default); } diff --git a/samples/CommunityToolkit.Maui.Sample/Pages/Essentials/OfflineSpeechToTextPage.xaml b/samples/CommunityToolkit.Maui.Sample/Pages/Essentials/OfflineSpeechToTextPage.xaml new file mode 100644 index 0000000000..1fec0cb133 --- /dev/null +++ b/samples/CommunityToolkit.Maui.Sample/Pages/Essentials/OfflineSpeechToTextPage.xaml @@ -0,0 +1,100 @@ + + + + + + + + + + +