├── .editorconfig ├── .gitignore ├── Flutnet.Cli.sln ├── FlutnetUI.sln ├── LICENSE.GPL3 ├── LICENSE.LGPL3 ├── NOTICE.md ├── NuGet.Config ├── README.md ├── assets ├── images │ └── flutnet_logo_128x128_trasp.png ├── sdk.table.xml └── templates │ └── FlutnetSolutionName │ ├── .template.config │ └── template.json │ ├── FlutnetApp.Android │ ├── App.cs │ ├── Assets │ │ └── AboutAssets.txt │ ├── FlutnetApp.Android.csproj │ ├── MainActivity.cs │ ├── Properties │ │ ├── AndroidManifest.xml │ │ └── AssemblyInfo.cs │ └── Resources │ │ ├── AboutResources.txt │ │ ├── Resource.designer.cs │ │ ├── drawable │ │ ├── launch_background.xml │ │ └── launch_image.png │ │ ├── layout │ │ └── activity_main.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ └── values │ │ ├── colors.xml │ │ ├── ic_launcher_background.xml │ │ ├── strings.xml │ │ └── styles.xml │ ├── FlutnetApp.ModuleInterop.Android │ ├── FlutnetApp.ModuleInterop.Android.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ └── Transforms │ │ ├── EnumFields.xml │ │ ├── EnumMethods.xml │ │ └── Metadata.xml │ ├── FlutnetApp.PluginInterop.iOS │ ├── ApiDefinitions.cs │ ├── FlutnetApp.PluginInterop.iOS.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ └── StructsAndEnums.cs │ ├── FlutnetApp.ServiceLibrary │ ├── FlutnetApp.ServiceLibrary.csproj │ └── Service1.cs │ ├── FlutnetApp.iOS │ ├── AppDelegate.cs │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon1024.png │ │ │ ├── Icon120.png │ │ │ ├── Icon152.png │ │ │ ├── Icon167.png │ │ │ ├── Icon180.png │ │ │ ├── Icon20.png │ │ │ ├── Icon29.png │ │ │ ├── Icon40.png │ │ │ ├── Icon58.png │ │ │ ├── Icon60.png │ │ │ ├── Icon76.png │ │ │ ├── Icon80.png │ │ │ └── Icon87.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── xamarin-logo-black-and-white-1x-240.png │ │ │ ├── xamarin-logo-black-and-white-2x-480.png │ │ │ └── xamarin-logo-black-and-white-3x-720.png │ ├── Entitlements.plist │ ├── FlutnetApp.iOS.csproj │ ├── Info.plist │ ├── LaunchScreen.storyboard │ ├── Main.cs │ ├── Main.storyboard │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Resources │ │ └── LaunchScreen.xib │ ├── SceneDelegate.cs │ ├── ViewController.cs │ └── ViewController.designer.cs │ └── FlutnetSolutionName.sln ├── github_assets ├── build_artifacts.png ├── flutnet_console_1.png ├── flutnet_console_2.png ├── flutter_embedding.png ├── how_flutnet_works_r2.png └── restore_nuget.png ├── scripts ├── build-cli.cmd ├── build-cli.sh ├── build-ui.cmd ├── build-ui.sh ├── publish-cli.cmd ├── publish-cli.sh ├── publish-ui.cmd └── publish-ui.sh └── src ├── Flutnet.Cli.Core ├── AssemblyVisibility.cs ├── Dart │ ├── DartClassNameConverter.cs │ ├── DartEvent.cs │ ├── DartFileNameConverter.cs │ ├── DartGenerator.cs │ ├── DartImports.cs │ ├── DartMethod.cs │ ├── DartProject.cs │ ├── DartProjectDependency.cs │ ├── DartProjectException.cs │ ├── DartProjectType.cs │ ├── DartProperty.cs │ ├── DartPropertyNameConverter.cs │ ├── DartReturnType.cs │ ├── DartService.cs │ ├── DartSupport.cs │ ├── DartType.cs │ └── DartTypeCategory.cs ├── DartBridgeBuilder.cs ├── Exceptions │ ├── FlutterDataException.cs │ ├── FlutterInheritedDataException.cs │ ├── FlutterOperationException.cs │ ├── FlutterUnsupportedDartTypeException.cs │ └── MultipleExceptions.cs ├── Flutnet.Cli.Core.csproj ├── FlutterAssistant.cs ├── Infrastructure │ ├── AndroidToolsLocator.cs │ ├── AppSettings.cs │ ├── CommandLineErrorCode.cs │ ├── CommandLineException.cs │ ├── CommandTools.cs │ ├── DevWorkUnit.cs │ ├── DotNetTools.cs │ ├── FlutnetShell.cs │ ├── FlutterDoctorReport.cs │ ├── FlutterModuleBuildConfig.cs │ ├── FlutterTools.cs │ ├── FlutterVersion.cs │ ├── INameConverter.cs │ ├── Log.cs │ ├── NamingConventions.cs │ ├── SdkFlutterVersionComparer.cs │ ├── SdkTable.cs │ ├── SyncFolder.cs │ ├── SyncInfo.cs │ ├── UpdateManager.cs │ ├── WebApiClient.cs │ └── WebApiInterop.cs ├── NewProjectCreator.cs ├── NewProjectSettings.cs ├── Resources │ ├── EventExample.txt │ ├── bridgeV01.dart │ ├── bridgeV02.dart │ ├── bridgeV03.dart │ ├── bridgeV04.dart │ ├── bridgeV05.dart │ ├── bridgeV06.dart │ ├── bridgeV07.dart │ ├── bridgeV08.dart │ ├── bridgeV09.dart │ ├── bridgeV10.dart │ ├── bridgeV11.dart │ ├── bridgeV12.dart │ ├── converters.dart │ ├── convertersV2.dart │ ├── converters_test.dart │ ├── dynamic_deserialization_example.txt │ ├── exceptions.dart │ ├── flutter_xamarin_debug.dart │ ├── fnet_message_debug.dart │ ├── index.dart │ ├── lib_message.dart │ ├── message_serializer.dart │ └── methodDartExample.txt └── Utilities │ ├── AssemblyExtensions.cs │ ├── DirectoryInfoExtensions.cs │ ├── FileSystemInfoExtensions.cs │ ├── OperatingSystem.cs │ ├── ReflectionHelper.cs │ ├── ResourceReader.cs │ ├── SerDes.cs │ ├── SharpYamlExtensions.cs │ ├── StreamExtensions.cs │ ├── StreamUtils.cs │ ├── StringExtensions.cs │ └── VersionUtils.cs ├── Flutnet.Cli.DTO ├── BaseArgs.cs ├── Flutnet.Cli.DTO.csproj ├── FlutnetSetupArgs.cs ├── FlutterCompatibility.cs ├── FlutterDiagArgs.cs ├── FlutterInfoArgs.cs ├── FlutterIssues.cs ├── NewProjectArgs.cs └── UpdateCheckArgs.cs ├── Flutnet.Cli ├── CommandBase.cs ├── Commands │ ├── flutnet-exec │ │ ├── ExecCommand.cs │ │ └── ExecOptions.cs │ └── flutnet-pack │ │ ├── PackCommand.cs │ │ └── PackOptions.cs ├── ExceptionSerializer.cs ├── Flutnet.Cli.csproj ├── OptionsBase.cs ├── OptionsValidationException.cs ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ └── GlobalAssemblyInfo.cs ├── ReturnCodes.cs ├── flutnet-logo.ico └── flutnet.appsettings.json ├── Flutnet.Shared ├── ExpressionTools.cs ├── Flutnet.Shared.projitems ├── Flutnet.Shared.shproj ├── FlutnetAppInfo.cs ├── FlutnetErrorCode.cs ├── FlutnetException.cs ├── SignatureTools.cs ├── StringExtensions.cs └── TypeExtensions.cs ├── FlutnetUI.Ext ├── Adapters │ ├── AvaloniaAdapter.cs │ ├── BrushAdapter.cs │ ├── ContextMenuAdapter.cs │ ├── ControlAdapter.cs │ ├── FontAdapter.cs │ ├── FontFamilyAdapter.cs │ ├── GraphicsAdapter.cs │ ├── GraphicsPathAdapter.cs │ ├── ImageAdapter.cs │ └── PenAdapter.cs ├── Controls │ ├── HtmlControl.cs │ └── HtmlLabel.cs ├── DialogResult.cs ├── Extensions │ └── WindowExtensions.cs ├── FlutnetUI.Ext.csproj ├── HtmlContainer.cs ├── HtmlRendererRoutedEventArgs.cs ├── MessageBox.cs ├── MessageBoxAccentButtons.cs ├── MessageBoxButtons.cs ├── MessageBoxDefaultButton.cs ├── MessageBoxIcon.cs ├── MessageBoxOptions.cs ├── MessageBoxStyle.cs ├── Models │ └── MessageBoxButton.cs ├── Styles │ ├── Dark │ │ └── Dark.xaml │ ├── MacOs │ │ └── MacOs.xaml │ ├── Mint │ │ └── Mint.xaml │ ├── RoundButtons │ │ └── RoundButtons.xaml │ ├── Ubuntu │ │ └── Ubuntu.xaml │ └── Windows │ │ └── Windows.xaml ├── Utilities │ ├── HtmlUtil.cs │ └── PropertyHelper.cs ├── ViewModels │ └── MessageBoxViewModel.cs └── Views │ ├── MessageBoxView.xaml │ └── MessageBoxView.xaml.cs ├── FlutnetUI ├── App.xaml ├── App.xaml.cs ├── Assets │ ├── Fonts │ │ ├── Roboto-Black.ttf │ │ ├── Roboto-BlackItalic.ttf │ │ ├── Roboto-Bold.ttf │ │ ├── Roboto-BoldItalic.ttf │ │ ├── Roboto-Italic.ttf │ │ ├── Roboto-Light.ttf │ │ ├── Roboto-LightItalic.ttf │ │ ├── Roboto-Medium.ttf │ │ ├── Roboto-MediumItalic.ttf │ │ ├── Roboto-Regular.ttf │ │ ├── Roboto-Thin.ttf │ │ └── Roboto-ThinItalic.ttf │ ├── Icons.xaml │ ├── Logo.png │ ├── Logo_txt.png │ ├── avalonia-logo.ico │ └── flutnet-logo.ico ├── Converters │ ├── IntToBoolConverter.cs │ └── InverseBooleanConverter.cs ├── FlutnetUI.appsettings.json ├── FlutnetUI.csproj ├── Models │ ├── FlutnetAppSettings.cs │ ├── FlutnetProjectSettings.cs │ └── SetupResult.cs ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── Resources │ └── Setup_Styles.css ├── Themes │ ├── Default.xaml │ └── MessageBox.xaml ├── Utilities │ ├── AndroidSdkLocator.cs │ ├── AppSettings.cs │ ├── ApplicationExtensions.cs │ ├── AssemblyExtensions.cs │ ├── Bash.cs │ ├── CommandLineTools.cs │ ├── Launcher.cs │ ├── Log.cs │ ├── NamingConventions.cs │ ├── OperatingSystem.cs │ └── RxUnhandledExceptionObserver.cs ├── ViewModels │ ├── AboutViewModel.cs │ ├── AdvancedWizardPageViewModel.cs │ ├── ConfigureAppViewModel.cs │ ├── ConfigureProjectViewModel.cs │ ├── CreateProjectProgressViewModel.cs │ ├── IPageViewModel.cs │ ├── MainPageViewModel.cs │ ├── MainWindowViewModel.cs │ ├── NewProjectViewModel.cs │ ├── PageViewModel.cs │ ├── SetupAssistedProgressViewModel.cs │ ├── SetupAssistedViewModel.cs │ ├── SetupCheckFlutterErrorViewModel.cs │ ├── SetupCheckFlutterViewModel.cs │ ├── SetupFinishViewModel.cs │ ├── SetupWelcomeViewModel.cs │ ├── SetupWindowViewModel.cs │ ├── TreeItem.cs │ └── WizardPageViewModel.cs ├── Views │ ├── AboutView.xaml │ ├── AboutView.xaml.cs │ ├── ConfigureAppView.xaml │ ├── ConfigureAppView.xaml.cs │ ├── ConfigureProjectView.xaml │ ├── ConfigureProjectView.xaml.cs │ ├── CreateProjectProgressView.xaml │ ├── CreateProjectProgressView.xaml.cs │ ├── MainPageView.xaml │ ├── MainPageView.xaml.cs │ ├── MainWindow.xaml │ ├── MainWindow.xaml.cs │ ├── NewProjectView.xaml │ ├── NewProjectView.xaml.cs │ ├── SetupAssistedProgressView.xaml │ ├── SetupAssistedProgressView.xaml.cs │ ├── SetupAssistedView.xaml │ ├── SetupAssistedView.xaml.cs │ ├── SetupCheckFlutterErrorView.xaml │ ├── SetupCheckFlutterErrorView.xaml.cs │ ├── SetupCheckFlutterView.xaml │ ├── SetupCheckFlutterView.xaml.cs │ ├── SetupFinishView.xaml │ ├── SetupFinishView.xaml.cs │ ├── SetupWelcomeView.xaml │ ├── SetupWelcomeView.xaml.cs │ ├── SetupWindow.xaml │ └── SetupWindow.xaml.cs └── nuget.config └── HtmlRenderer.Core ├── Adapters ├── Entities │ ├── RColor.cs │ ├── RDashStyle.cs │ ├── RFontStyle.cs │ ├── RKeyEvent.cs │ ├── RMouseEvent.cs │ ├── RPoint.cs │ ├── RRect.cs │ └── RSize.cs ├── RAdapter.cs ├── RBrush.cs ├── RContextMenu.cs ├── RControl.cs ├── RFont.cs ├── RFontFamily.cs ├── RGraphics.cs ├── RGraphicsPath.cs ├── RImage.cs └── RPen.cs ├── Core ├── CssData.cs ├── CssDefaults.cs ├── Dom │ ├── Border.cs │ ├── CssBox.cs │ ├── CssBoxFrame.cs │ ├── CssBoxHr.cs │ ├── CssBoxImage.cs │ ├── CssBoxProperties.cs │ ├── CssLayoutEngine.cs │ ├── CssLayoutEngineTable.cs │ ├── CssLength.cs │ ├── CssLineBox.cs │ ├── CssRect.cs │ ├── CssRectImage.cs │ ├── CssRectWord.cs │ ├── CssSpacingBox.cs │ ├── CssUnit.cs │ ├── HoverBoxBlock.cs │ └── HtmlTag.cs ├── Entities │ ├── CssBlock.cs │ ├── CssBlockSelectorItem.cs │ ├── HtmlGenerationStyle.cs │ ├── HtmlImageLoadEventArgs.cs │ ├── HtmlLinkClickedEventArgs.cs │ ├── HtmlLinkClickedException.cs │ ├── HtmlRefreshEventArgs.cs │ ├── HtmlRenderErrorEventArgs.cs │ ├── HtmlRenderErrorType.cs │ ├── HtmlScrollEventArgs.cs │ ├── HtmlStylesheetLoadEventArgs.cs │ └── LinkElementData.cs ├── Handlers │ ├── BackgroundImageDrawHandler.cs │ ├── BordersDrawHandler.cs │ ├── ContextMenuHandler.cs │ ├── FontsHandler.cs │ ├── ImageDownloader.cs │ ├── ImageLoadHandler.cs │ ├── SelectionHandler.cs │ └── StylesheetLoadHandler.cs ├── HtmlContainerInt.cs ├── HtmlRendererUtils.cs ├── Parse │ ├── CssParser.cs │ ├── CssValueParser.cs │ ├── DomParser.cs │ ├── HtmlParser.cs │ ├── RegexParserHelper.cs │ └── RegexParserUtils.cs └── Utils │ ├── ArgChecker.cs │ ├── CommonUtils.cs │ ├── CssConstants.cs │ ├── CssUtils.cs │ ├── DomUtils.cs │ ├── HtmlConstants.cs │ ├── HtmlUtils.cs │ ├── ImageError.png │ ├── ImageLoad.png │ ├── RenderUtils.cs │ └── SubString.cs └── HtmlRenderer.Core.csproj /.editorconfig: -------------------------------------------------------------------------------- 1 | [*.cs] 2 | file_header_template = Copyright (c) 2020-2021 Novagem Solutions S.r.l.\n\nThis file is part of Flutnet.\n\nFlutnet is a free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nFlutnet is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY, without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with Flutnet. If not, see . 3 | -------------------------------------------------------------------------------- /NuGet.Config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /assets/images/flutnet_logo_128x128_trasp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/images/flutnet_logo_128x128_trasp.png -------------------------------------------------------------------------------- /assets/sdk.table.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with your package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using Android.App; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("FlutnetApp.Android")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("FlutnetApp")] 14 | [assembly: AssemblyCopyright("Copyright © 2020")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: ComVisible(false)] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers 27 | // by using the '*' as shown below: 28 | // [assembly: AssemblyVersion("1.0.*")] 29 | [assembly: AssemblyVersion("1.0.0.0")] 30 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/AboutResources.txt: -------------------------------------------------------------------------------- 1 | Images, layout descriptions, binary blobs and string dictionaries can be included 2 | in your application as resource files. Various Android APIs are designed to 3 | operate on the resource IDs instead of dealing with images, strings or binary blobs 4 | directly. 5 | 6 | For example, a sample Android app that contains a user interface layout (main.xml), 7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) 8 | would keep its resources in the "Resources" directory of the application: 9 | 10 | Resources/ 11 | drawable/ 12 | icon.png 13 | 14 | layout/ 15 | main.xml 16 | 17 | values/ 18 | strings.xml 19 | 20 | In order to get the build system to recognize Android resources, set the build action to 21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but 22 | instead operate on resource IDs. When you compile an Android application that uses resources, 23 | the build system will package the resources for distribution and generate a class called "R" 24 | (this is an Android convention) that contains the tokens for each one of the resources 25 | included. For example, for the above Resources layout, this is what the R class would expose: 26 | 27 | public class R { 28 | public class drawable { 29 | public const int icon = 0x123; 30 | } 31 | 32 | public class layout { 33 | public const int main = 0x456; 34 | } 35 | 36 | public class strings { 37 | public const int first_string = 0xabc; 38 | public const int second_string = 0xbcd; 39 | } 40 | } 41 | 42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main 43 | to reference the layout/main.xml file, or R.strings.first_string to reference the first 44 | string in the dictionary file values/strings.xml. -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/drawable/launch_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/drawable/launch_image.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #2c3e50 4 | #1B3147 5 | #3498db 6 | 7 | -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #2C3E50 4 | -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | FlutnetAppName 3 | Settings 4 | 5 | -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.Android/Resources/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.ModuleInterop.Android/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("FlutnetApp.ModuleInterop.Android")] 8 | [assembly: AssemblyDescription("Xamarin.Android bindings for Flutter module AAR")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("FlutnetApp.ModuleInterop")] 12 | [assembly: AssemblyCopyright("Copyright © 2020")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | [assembly: ComVisible(false)] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.ModuleInterop.Android/Transforms/EnumFields.xml: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.ModuleInterop.Android/Transforms/EnumMethods.xml: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.ModuleInterop.Android/Transforms/Metadata.xml: -------------------------------------------------------------------------------- 1 |  2 | Flutnet.Interop.Plugins 3 | 4 | -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.PluginInterop.iOS/ApiDefinitions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Foundation; 3 | 4 | namespace FlutnetApp.PluginInterop 5 | { 6 | // @interface GeneratedPluginRegistrant : NSObject 7 | [BaseType(typeof(NSObject))] 8 | interface GeneratedPluginRegistrant 9 | { 10 | // + (void)registerWithRegistry:(NSObject*)registry; 11 | [Static] 12 | [Export("registerWithRegistry:")] 13 | void Register(NSObject registry); 14 | } 15 | 16 | [Static] 17 | interface Constants 18 | { 19 | // extern double FlutterPluginRegistrantVersionNumber; 20 | [Field("FlutterPluginRegistrantVersionNumber", "__Internal")] 21 | double FlutterPluginRegistrantVersionNumber { get; } 22 | 23 | // extern const unsigned char [] FlutterPluginRegistrantVersionString; 24 | [Field("FlutterPluginRegistrantVersionString", "__Internal")] 25 | [Internal] 26 | //byte[] FlutterPluginRegistrantVersionString { get; } 27 | IntPtr FlutterPluginRegistrantVersionString { get; } 28 | } 29 | } -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.PluginInterop.iOS/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | using Foundation; 5 | 6 | // This attribute allows you to mark your assemblies as “safe to link”. 7 | // When the attribute is present, the linker—if enabled—will process the assembly 8 | // even if you’re using the “Link SDK assemblies only” option, which is the default for device builds. 9 | 10 | [assembly: LinkerSafe] 11 | 12 | // Information about this assembly is defined by the following attributes. 13 | // Change them to the values specific to your project. 14 | 15 | [assembly: AssemblyTitle("FlutnetApp.PluginInterop.iOS")] 16 | [assembly: AssemblyDescription("Xamarin.iOS bindings for FlutterPluginRegistrant framework")] 17 | [assembly: AssemblyConfiguration("")] 18 | [assembly: AssemblyCompany("")] 19 | [assembly: AssemblyProduct("FlutnetApp.PluginInterop")] 20 | [assembly: AssemblyCopyright("Copyright © 2020")] 21 | [assembly: AssemblyTrademark("")] 22 | [assembly: AssemblyCulture("")] 23 | 24 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 25 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 26 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 27 | // [assembly: AssemblyVersion("1.0.*")] 28 | [assembly: AssemblyVersion("1.0.0.0")] 29 | [assembly: AssemblyFileVersion("1.0.0.0")] 30 | 31 | // The following attributes are used to specify the signing key for the assembly, 32 | // if desired. See the Mono documentation for more information about signing. 33 | 34 | //[assembly: AssemblyDelaySign(false)] 35 | //[assembly: AssemblyKeyFile("")] -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.PluginInterop.iOS/StructsAndEnums.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace FlutnetApp.PluginInterop 4 | { 5 | } -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.ServiceLibrary/FlutnetApp.ServiceLibrary.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | OnOutputUpdated 6 | true 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | AfterBuild 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | AfterBuild 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.ServiceLibrary/Service1.cs: -------------------------------------------------------------------------------- 1 | using Flutnet.ServiceModel; 2 | 3 | namespace FlutnetApp.ServiceLibrary 4 | { 5 | [PlatformService] 6 | public class Service1 7 | { 8 | [PlatformOperation] 9 | public string Hello(string name) 10 | { 11 | return $"Hi, {name}! How are you?"; 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.iOS/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using Foundation; 2 | using UIKit; 3 | using Flutnet.Interop; 4 | 5 | namespace FlutnetApp 6 | { 7 | [Register("AppDelegate")] 8 | public class AppDelegate : FlutterAppDelegate 9 | { 10 | [Export("application:didFinishLaunchingWithOptions:")] 11 | public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) 12 | { 13 | return base.FinishedLaunching(application, launchOptions); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/LaunchImage.imageset/xamarin-logo-black-and-white-1x-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/LaunchImage.imageset/xamarin-logo-black-and-white-1x-240.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/LaunchImage.imageset/xamarin-logo-black-and-white-2x-480.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/LaunchImage.imageset/xamarin-logo-black-and-white-2x-480.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/LaunchImage.imageset/xamarin-logo-black-and-white-3x-720.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Assets.xcassets/LaunchImage.imageset/xamarin-logo-black-and-white-3x-720.png -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Main.cs: -------------------------------------------------------------------------------- 1 | using UIKit; 2 | 3 | namespace FlutnetApp 4 | { 5 | public class Application 6 | { 7 | // This is the main entry point of the application. 8 | static void Main(string[] args) 9 | { 10 | // if you want to use a different Application Delegate class from "AppDelegate" 11 | // you can specify it here. 12 | UIApplication.Main(args, null, "AppDelegate"); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Main.storyboard: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.iOS/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("FlutnetApp.iOS")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("FlutnetApp")] 13 | [assembly: AssemblyCopyright("Copyright © 2020")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | [assembly: ComVisible(false)] 17 | 18 | // Version information for an assembly consists of the following four values: 19 | // 20 | // Major Version 21 | // Minor Version 22 | // Build Number 23 | // Revision 24 | // 25 | // You can specify all the values or you can default the Build and Revision Numbers 26 | // by using the '*' as shown below: 27 | // [assembly: AssemblyVersion("1.0.*")] 28 | [assembly: AssemblyVersion("1.0.0.0")] 29 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /assets/templates/FlutnetSolutionName/FlutnetApp.iOS/ViewController.designer.cs: -------------------------------------------------------------------------------- 1 | // WARNING 2 | // 3 | // This file has been generated automatically by Visual Studio from the outlets and 4 | // actions declared in your storyboard file. 5 | // Manual changes to this file will not be maintained. 6 | // 7 | using Foundation; 8 | 9 | namespace FlutnetApp 10 | { 11 | [Register("ViewController")] 12 | partial class ViewController 13 | { 14 | } 15 | } -------------------------------------------------------------------------------- /github_assets/build_artifacts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/github_assets/build_artifacts.png -------------------------------------------------------------------------------- /github_assets/flutnet_console_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/github_assets/flutnet_console_1.png -------------------------------------------------------------------------------- /github_assets/flutnet_console_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/github_assets/flutnet_console_2.png -------------------------------------------------------------------------------- /github_assets/flutter_embedding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/github_assets/flutter_embedding.png -------------------------------------------------------------------------------- /github_assets/how_flutnet_works_r2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/github_assets/how_flutnet_works_r2.png -------------------------------------------------------------------------------- /github_assets/restore_nuget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/github_assets/restore_nuget.png -------------------------------------------------------------------------------- /scripts/build-cli.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | cls 3 | 4 | set ProjectName=Flutnet.Cli 5 | 6 | :: Define paths 7 | set ScriptDir=%~dp0 8 | set SolutionPath=%ScriptDir%\..\%ProjectName%.sln 9 | set ProjectPath=%ScriptDir%\..\src\%ProjectName%\%ProjectName%.csproj 10 | 11 | :: Restore Nuget Packages for Flutnet CLI projects 12 | dotnet restore "%SolutionPath%" 13 | 14 | :: Clean and build Flutnet CLI 15 | dotnet clean "%ProjectPath%" -c Debug --nologo 16 | dotnet clean "%ProjectPath%" -c Release --nologo 17 | 18 | dotnet build "%ProjectPath%" -c Debug --no-restore --nologo 19 | dotnet build "%ProjectPath%" -c Release --no-restore --nologo -------------------------------------------------------------------------------- /scripts/build-cli.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | PROJECT_NAME=Flutnet.Cli 4 | 5 | # Define paths 6 | SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) 7 | SOLUTION_PATH=$SCRIPT_DIR/../$PROJECT_NAME.sln 8 | PROJECT_PATH=$SCRIPT_DIR/../src/$PROJECT_NAME/$PROJECT_NAME.csproj 9 | 10 | # Restore Nuget Packages for Flutnet CLI projects 11 | dotnet restore "$SOLUTION_PATH" 12 | 13 | # Clean and build Flutnet CLI 14 | dotnet clean "$PROJECT_PATH" -c Debug --nologo 15 | dotnet clean "$PROJECT_PATH" -c Release --nologo 16 | 17 | dotnet build "$PROJECT_PATH" -c Debug --no-restore --nologo 18 | dotnet build "$PROJECT_PATH" -c Release --no-restore --nologo -------------------------------------------------------------------------------- /scripts/build-ui.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | cls 3 | 4 | set ProjectName=FlutnetUI 5 | 6 | :: Define paths 7 | set ScriptDir=%~dp0 8 | set SolutionPath=%ScriptDir%\..\%ProjectName%.sln 9 | set ProjectPath=%ScriptDir%\..\src\%ProjectName%\%ProjectName%.csproj 10 | 11 | :: Restore Nuget Packages for Flutnet Console projects 12 | dotnet restore "%SolutionPath%" 13 | 14 | :: Clean and build Flutnet Console 15 | dotnet clean "%ProjectPath%" -c Debug --nologo 16 | dotnet clean "%ProjectPath%" -c Release --nologo 17 | 18 | dotnet build "%ProjectPath%" -c Debug --no-restore --nologo 19 | dotnet build "%ProjectPath%" -c Release --no-restore --nologo -------------------------------------------------------------------------------- /scripts/build-ui.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | PROJECT_NAME=FlutnetUI 4 | 5 | # Define paths 6 | SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) 7 | SOLUTION_PATH=$SCRIPT_DIR/../$PROJECT_NAME.sln 8 | PROJECT_PATH=$SCRIPT_DIR/../src/$PROJECT_NAME/$PROJECT_NAME.csproj 9 | 10 | # Restore Nuget Packages for Flutnet Console projects 11 | dotnet restore "$SOLUTION_PATH" 12 | 13 | # Clean and build Flutnet Console 14 | dotnet clean "$PROJECT_PATH" -c Debug --nologo 15 | dotnet clean "$PROJECT_PATH" -c Release --nologo 16 | 17 | dotnet build "$PROJECT_PATH" -c Debug --no-restore --nologo 18 | dotnet build "$PROJECT_PATH" -c Release --no-restore --nologo -------------------------------------------------------------------------------- /scripts/publish-cli.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | cls 3 | 4 | set ProjectName=Flutnet.Cli 5 | 6 | :: Define paths 7 | set ScriptDir=%~dp0 8 | set ArtifactsDir=%ScriptDir%\..\artifacts 9 | set SolutionPath=%ScriptDir%\..\%ProjectName%.sln 10 | set ProjectPath=%ScriptDir%\..\src\%ProjectName%\%ProjectName%.csproj 11 | set PublishDirOsx=%ArtifactsDir%\osx-x64\%ProjectName% 12 | set PublishDirWin=%ArtifactsDir%\win-x64\%ProjectName% 13 | 14 | :: Clean the output of the previous builds 15 | :: (ignore any error, the clean will still complete successfully) 16 | dotnet clean "%ProjectPath%" -c Release -f netcoreapp3.1 -r osx-x64 -v quiet --nologo 17 | dotnet clean "%ProjectPath%" -c Release -f netcoreapp3.1 -r win-x64 -v quiet --nologo 18 | 19 | :: Clean the output of the previous publish operations 20 | if exist %PublishDirOsx% rmdir /s /q %PublishDirOsx% 21 | if exist %PublishDirWin% rmdir /s /q %PublishDirWin% 22 | 23 | :: Publish exeutable for macOS 24 | dotnet publish "%ProjectPath%" -c Release -f netcoreapp3.1 -o "%PublishDirOsx%" -r osx-x64 --no-self-contained -v minimal --nologo 25 | 26 | :: Publish exeutable for Windows 27 | dotnet publish "%ProjectPath%" -c Release -f netcoreapp3.1 -o "%PublishDirWin%" -r win-x64 --no-self-contained -v minimal --nologo -------------------------------------------------------------------------------- /scripts/publish-cli.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | PROJECT_NAME=Flutnet.Cli 4 | 5 | # Define paths 6 | SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) 7 | ARTIFACTS_DIR=$SCRIPT_DIR/../artifacts 8 | SOLUTION_PATH=$SCRIPT_DIR/../$PROJECT_NAME.sln 9 | PROJECT_PATH=$SCRIPT_DIR/../src/$PROJECT_NAME/$PROJECT_NAME.csproj 10 | PUBLISH_DIR_OSX=$ARTIFACTS_DIR/osx-x64/$PROJECT_NAME 11 | PUBLISH_DIR_WIN=$ARTIFACTS_DIR/win-x64/$PROJECT_NAME 12 | 13 | # Clean the output of the previous builds 14 | # (ignore any error, the clean will still complete successfully) 15 | dotnet clean "$PROJECT_PATH" -c Release -f netcoreapp3.1 -r osx-x64 -v quiet --nologo 16 | dotnet clean "$PROJECT_PATH" -c Release -f netcoreapp3.1 -r win-x64 -v quiet --nologo 17 | 18 | # Clean the output of the previous publish operations 19 | rm -rf "$PUBLISH_DIR_OSX" 20 | rm -rf "$PUBLISH_DIR_WIN" 21 | 22 | # Publish exeutable for macOS 23 | dotnet publish "$PROJECT_PATH" -c Release -f netcoreapp3.1 -o "$PUBLISH_DIR_OSX" -r osx-x64 --no-self-contained -v minimal --nologo 24 | 25 | # Publish exeutable for Windows 26 | dotnet publish "$PROJECT_PATH" -c Release -f netcoreapp3.1 -o "$PUBLISH_DIR_WIN" -r win-x64 --no-self-contained -v minimal --nologo -------------------------------------------------------------------------------- /scripts/publish-ui.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | cls 3 | 4 | set ProjectName=FlutnetUI 5 | 6 | :: Define paths 7 | set ScriptDir=%~dp0 8 | set ArtifactsDir=%ScriptDir%\..\artifacts 9 | set SolutionPath=%ScriptDir%\..\%ProjectName%.sln 10 | set ProjectPath=%ScriptDir%\..\src\%ProjectName%\%ProjectName%.csproj 11 | set PublishDirOsx=%ArtifactsDir%\osx-x64\%ProjectName% 12 | set PublishDirWin=%ArtifactsDir%\win-x64\%ProjectName% 13 | 14 | :: Clean the output of the previous builds 15 | :: (ignore any error, the clean will still complete successfully) 16 | dotnet clean "%ProjectPath%" -c Release -f netcoreapp3.1 -r osx-x64 -v quiet --nologo 17 | dotnet clean "%ProjectPath%" -c Release -f netcoreapp3.1 -r win-x64 -v quiet --nologo 18 | 19 | :: Clean the output of the previous publish operations 20 | if exist %PublishDirOsx% rmdir /s /q %PublishDirOsx% 21 | if exist %PublishDirWin% rmdir /s /q %PublishDirWin% 22 | 23 | :: Publish exeutable for macOS 24 | dotnet publish "%ProjectPath%" -c Release -f netcoreapp3.1 -o "%PublishDirOsx%" -r osx-x64 --no-self-contained -v minimal --nologo 25 | 26 | :: Publish exeutable for Windows 27 | dotnet publish "%ProjectPath%" -c Release -f netcoreapp3.1 -o "%PublishDirWin%" -r win-x64 --no-self-contained -v minimal --nologo -------------------------------------------------------------------------------- /scripts/publish-ui.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | PROJECT_NAME=FlutnetUI 4 | 5 | # Define paths 6 | SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) 7 | ARTIFACTS_DIR=$SCRIPT_DIR/../artifacts 8 | SOLUTION_PATH=$SCRIPT_DIR/../$PROJECT_NAME.sln 9 | PROJECT_PATH=$SCRIPT_DIR/../src/$PROJECT_NAME/$PROJECT_NAME.csproj 10 | PUBLISH_DIR_OSX=$ARTIFACTS_DIR/osx-x64/$PROJECT_NAME 11 | PUBLISH_DIR_WIN=$ARTIFACTS_DIR/win-x64/$PROJECT_NAME 12 | 13 | # Clean the output of the previous builds 14 | # (ignore any error, the clean will still complete successfully) 15 | dotnet clean "$PROJECT_PATH" -c Release -f netcoreapp3.1 -r osx-x64 -v quiet --nologo 16 | dotnet clean "$PROJECT_PATH" -c Release -f netcoreapp3.1 -r win-x64 -v quiet --nologo 17 | 18 | # Clean the output of the previous publish operations 19 | rm -rf "$PUBLISH_DIR_OSX" 20 | rm -rf "$PUBLISH_DIR_WIN" 21 | 22 | # Publish exeutable for macOS 23 | dotnet publish "$PROJECT_PATH" -c Release -f netcoreapp3.1 -o "$PUBLISH_DIR_OSX" -r osx-x64 --no-self-contained -v minimal --nologo 24 | 25 | # Publish exeutable for Windows 26 | dotnet publish "$PROJECT_PATH" -c Release -f netcoreapp3.1 -o "$PUBLISH_DIR_WIN" -r win-x64 --no-self-contained -v minimal --nologo -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/AssemblyVisibility.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System.Runtime.CompilerServices; 19 | 20 | [assembly: InternalsVisibleTo("flutnet")] 21 | [assembly: InternalsVisibleTo("Flutnet.Cli.Core.MSTest")] 22 | -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Dart/DartClassNameConverter.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using Flutnet.Cli.Core.Infrastructure; 19 | 20 | namespace Flutnet.Cli.Core.Dart 21 | { 22 | internal class DartClassNameConverter : INameConverter 23 | { 24 | public string Convert(string className) 25 | { 26 | return className; 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Dart/DartProjectDependency.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | namespace Flutnet.Cli.Core.Dart 19 | { 20 | internal enum DartProjectDependencyType 21 | { 22 | Version, 23 | Path, 24 | Sdk 25 | } 26 | 27 | internal class DartProjectDependency 28 | { 29 | public DartProjectDependencyType Type { get; } 30 | public string Name { get; } 31 | public string Value { get; } 32 | 33 | public DartProjectDependency(string name, DartProjectDependencyType type, string value) 34 | { 35 | Type = type; 36 | Value = value; 37 | Name = name; 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Dart/DartProjectException.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | 20 | namespace Flutnet.Cli.Core.Dart 21 | { 22 | internal enum DartProjectError 23 | { 24 | PrjFolderNotExists, 25 | LibFolderNotExists, 26 | PubspecNotExists, 27 | PubspecInvalidFormat, 28 | MetadataFileNotExists, 29 | MetadataInvalidFormat, 30 | } 31 | 32 | internal class DartProjectException : Exception 33 | { 34 | public DartProjectError Error { get; } 35 | 36 | public DartProjectException(string message, DartProjectError error) : base(message) 37 | { 38 | Error = error; 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Dart/DartProjectType.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | namespace Flutnet.Cli.Core.Dart 19 | { 20 | internal enum DartProjectType 21 | { 22 | Unknown, 23 | App, 24 | Package, 25 | Module 26 | } 27 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Dart/DartProperty.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System.Reflection; 19 | using Flutnet.Cli.Core.Utilities; 20 | 21 | namespace Flutnet.Cli.Core.Dart 22 | { 23 | internal class DartProperty 24 | { 25 | // The typer for this dart property 26 | public readonly DartType Type; 27 | 28 | // The name for this property in .NET 29 | public readonly string Name; 30 | 31 | // The name for this property in Dart 32 | public readonly string DartName; 33 | 34 | public readonly bool IsDeclared; 35 | 36 | public DartProperty(string name, DartType type, PropertyInfo propertyInfo) 37 | { 38 | Name = name; 39 | DartName = DartSupport.GetDartPropertyName(name); 40 | Type = type; 41 | IsDeclared = propertyInfo.IsDeclared(); 42 | } 43 | 44 | public DartProperty(string name, DartType type, FieldInfo fieldInfo) 45 | { 46 | Name = name; 47 | DartName = DartSupport.GetDartPropertyName(name); 48 | Type = type; 49 | IsDeclared = fieldInfo.IsDeclared(); 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Dart/DartPropertyNameConverter.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using Flutnet.Cli.Core.Infrastructure; 19 | 20 | namespace Flutnet.Cli.Core.Dart 21 | { 22 | internal class DartPropertyNameConverter : INameConverter 23 | { 24 | private static string _null = "null"; 25 | private static string _nnull = "nnull"; 26 | 27 | private static string _true = "true"; 28 | private static string _ttrue = "ttrue"; 29 | 30 | private static string _false = "false"; 31 | private static string _ffalse = "ffalse"; 32 | 33 | public string Convert(string propertyName) 34 | { 35 | string prop = propertyName.ToLower(); 36 | 37 | if (prop == _null) 38 | { 39 | return _nnull; 40 | } 41 | 42 | if (prop == _true) 43 | { 44 | return _ttrue; 45 | } 46 | 47 | if (prop == _false) 48 | { 49 | return _ffalse; 50 | } 51 | 52 | return char.ToLower(propertyName[0]) + propertyName.Substring(1); 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Dart/DartReturnType.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Linq; 21 | using Flutnet.Utilities; 22 | 23 | namespace Flutnet.Cli.Core.Dart 24 | { 25 | internal class DartReturnType 26 | { 27 | public readonly bool IsVoid; 28 | 29 | public readonly DartType Type; 30 | 31 | public DartReturnType(ICollection customTypes, Type type, string package) 32 | { 33 | 34 | Type t = GetNestedType(type); 35 | 36 | IsVoid = (t == typeof(void)); 37 | Type = IsVoid ? null : new DartType(customTypes, t, package); 38 | 39 | } 40 | 41 | public static Type GetNestedType(Type type) 42 | { 43 | if (type.IsTaskVoid()) 44 | { 45 | return typeof(void); 46 | } 47 | 48 | if (type.IsTaskT()) 49 | { 50 | Type t = type.GetGenericArguments().First(); 51 | return t; 52 | } 53 | 54 | return type; 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Dart/DartTypeCategory.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | namespace Flutnet.Cli.Core.Dart 19 | { 20 | internal enum DartTypeCategory 21 | { 22 | List, 23 | Map, 24 | Set, 25 | Custom, 26 | Primitive, 27 | None 28 | } 29 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Exceptions/FlutterDataException.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Text; 21 | using Flutnet.Cli.Core.Dart; 22 | 23 | namespace Flutnet.Cli.Core.Exceptions 24 | { 25 | internal class FlutterDataException : Exception 26 | { 27 | public readonly IEnumerable InvalidTypes; 28 | 29 | public FlutterDataException(params Type[] invalidType) 30 | : base(_getErrorMessages(invalidType)) 31 | { 32 | InvalidTypes = invalidType; 33 | } 34 | 35 | static string _getErrorMessages(IEnumerable types) 36 | { 37 | StringBuilder builder = new StringBuilder(); 38 | 39 | foreach (Type type in types) 40 | { 41 | builder.AppendLine(DartSupport.GetUnsupportedDartTypeErrorMessage(type)); 42 | } 43 | 44 | return builder.ToString(); 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Exceptions/FlutterUnsupportedDartTypeException.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Text; 21 | using Flutnet.Cli.Core.Dart; 22 | 23 | namespace Flutnet.Cli.Core.Exceptions 24 | { 25 | internal class FlutterUnsupportedDartTypeException : Exception 26 | { 27 | public readonly IEnumerable InvalidTypes; 28 | 29 | public FlutterUnsupportedDartTypeException(params Type[] invalidType) 30 | : base(_getErrorMessages(invalidType)) 31 | { 32 | InvalidTypes = invalidType; 33 | } 34 | 35 | static string _getErrorMessages(IEnumerable types) 36 | { 37 | StringBuilder builder = new StringBuilder(); 38 | 39 | foreach (Type type in types) 40 | { 41 | builder.AppendLine(DartSupport.GetUnsupportedDartTypeErrorMessage(type)); 42 | } 43 | 44 | return builder.ToString(); 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Exceptions/MultipleExceptions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Text; 21 | 22 | namespace Flutnet.Cli.Core.Exceptions 23 | { 24 | internal class MultipleException : Exception 25 | { 26 | private readonly List _operationExceptions; 27 | 28 | public MultipleException(List operationExceptions) : base(_getErrorMessages(operationExceptions)) 29 | { 30 | _operationExceptions = operationExceptions; 31 | } 32 | 33 | static string _getErrorMessages(List exceptions) 34 | { 35 | StringBuilder builder = new StringBuilder(); 36 | 37 | for (var i = 0; i < exceptions.Count; i++) 38 | { 39 | Exception ex = exceptions[i]; 40 | builder.AppendLine($"{i}. {ex.Message}"); 41 | } 42 | 43 | return builder.ToString(); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Infrastructure/CommandLineException.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | 20 | namespace Flutnet.Cli.Core.Infrastructure 21 | { 22 | internal class CommandLineException : Exception 23 | { 24 | public CommandLineException(CommandLineErrorCode errorCode) : base(errorCode.GetDefaultMessage()) 25 | { 26 | Code = errorCode; 27 | } 28 | 29 | public CommandLineException(CommandLineErrorCode errorCode, string message) : base(message) 30 | { 31 | Code = errorCode; 32 | } 33 | 34 | public CommandLineException(CommandLineErrorCode errorCode, string message, Exception innerException) : base(message, innerException) 35 | { 36 | Code = errorCode; 37 | } 38 | 39 | public CommandLineException(CommandLineErrorCode errorCode, Exception innerException) : base(errorCode.GetDefaultMessage(), innerException) 40 | { 41 | Code = errorCode; 42 | } 43 | 44 | public CommandLineErrorCode Code { get; } 45 | } 46 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Infrastructure/CommandTools.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | using Medallion.Shell; 20 | 21 | namespace Flutnet.Cli.Core.Infrastructure 22 | { 23 | internal static class CommandTools 24 | { 25 | /// 26 | /// A convenience method that wraps command.Wait() in order to re-throw a fancy 27 | /// when the underlying task fails or is canceled. 28 | /// 29 | public static void WaitWithFancyError(this Command command, CommandLineErrorCode errorCode) 30 | { 31 | try 32 | { 33 | command.Wait(); 34 | } 35 | catch (Exception e) 36 | { 37 | Log.Ex(e); 38 | throw new CommandLineException(errorCode, e); 39 | } 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Infrastructure/FlutterModuleBuildConfig.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | 20 | namespace Flutnet.Cli.Core.Infrastructure 21 | { 22 | [Flags] 23 | internal enum FlutterModuleBuildConfig 24 | { 25 | Default = 0x00, 26 | Debug = 0x01, 27 | Profile = 0x02, 28 | Release = 0x04 29 | } 30 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Infrastructure/FlutterVersion.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | namespace Flutnet.Cli.Core.Infrastructure 19 | { 20 | internal class FlutterVersion 21 | { 22 | public string Version { get; set; } 23 | public string FrameworkRev { get; set; } 24 | public string EngineRev { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Infrastructure/INameConverter.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | namespace Flutnet.Cli.Core.Infrastructure 19 | { 20 | internal interface INameConverter 21 | { 22 | string Convert(string name); 23 | } 24 | 25 | internal class IdentityNameConverter : INameConverter 26 | { 27 | public string Convert(string name) => name; 28 | } 29 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Infrastructure/Log.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | 20 | namespace Flutnet.Cli.Core.Infrastructure 21 | { 22 | internal class Log 23 | { 24 | public static void Debug(string text) 25 | { 26 | // TODO 27 | //Console.WriteLine(text); 28 | } 29 | 30 | public static void Debug(string format, params object[] args) 31 | { 32 | // TODO 33 | //Console.WriteLine(text); 34 | } 35 | 36 | public static void Ex(Exception e) 37 | { 38 | // TODO 39 | //Console.Error.WriteLine(e); 40 | } 41 | 42 | public static void Error(string text) 43 | { 44 | // TODO 45 | //Console.Error.WriteLine(text); 46 | } 47 | 48 | public static void Error(string format, params object[] args) 49 | { 50 | // TODO 51 | //Console.Error.WriteLine(format, args); 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Infrastructure/NamingConventions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System.Text.RegularExpressions; 19 | 20 | namespace Flutnet.Cli.Core.Infrastructure 21 | { 22 | internal static class NamingConventions 23 | { 24 | /// 25 | /// An expression to check if a string is a valid Dart package name (lower_case_with_underscores). 26 | /// 27 | static readonly Regex DartPackageNameRegex = new Regex("^[a-z][a-z0-9_]*$"); 28 | 29 | public static bool IsValidDartPackageName(string input) 30 | { 31 | return DartPackageNameRegex.IsMatch(input); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Infrastructure/SdkFlutterVersionComparer.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System.Collections.Generic; 19 | using Flutnet.Cli.Core.Utilities; 20 | 21 | namespace Flutnet.Cli.Core.Infrastructure 22 | { 23 | internal class SdkFlutterVersionComparer : Comparer 24 | { 25 | public override int Compare(SdkFlutterVersion x, SdkFlutterVersion y) 26 | { 27 | if (x == null && y == null) 28 | return 0; 29 | 30 | if (x == null) 31 | return -1; 32 | 33 | if (y == null) 34 | return 1; 35 | 36 | return VersionUtils.Compare(x.Version, y.Version); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Infrastructure/SyncInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | 21 | namespace Flutnet.Cli.Core.Infrastructure 22 | { 23 | internal class SyncInfo 24 | { 25 | public string RootFolder { get; } 26 | public List Folders { get; } 27 | public Dictionary TypeToFolder { get; } 28 | public Dictionary> FolderToTypes { get; } 29 | 30 | public SyncInfo(string rootFolder, List folders, Dictionary> folderToTypes, Dictionary typeToFolder) 31 | { 32 | FolderToTypes = folderToTypes; 33 | TypeToFolder = typeToFolder; 34 | RootFolder = rootFolder; 35 | Folders = folders; 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Infrastructure/WebApiInterop.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | namespace FlutnetSite.WebApi.DTO 19 | { 20 | /// 21 | /// The object that is sent back by the REST API when errors occur 22 | /// while processing a request. 23 | /// 24 | public class ApiError 25 | { 26 | /// 27 | /// Any code that identifies the type of error. 28 | /// 29 | public int Code { get; set; } 30 | /// 31 | /// A more complete detail of the error and the associated code. 32 | /// 33 | public string Message { get; set; } 34 | } 35 | 36 | public class CheckForUpdatesRequest 37 | { 38 | public string CurrentVersion { get; set; } 39 | public int OS { get; set; } 40 | public bool Is64BitOS { get; set; } 41 | public string SdkTableRevision { get; set; } 42 | } 43 | 44 | public class CheckForUpdatesResponse 45 | { 46 | public bool UpToDate { get; set; } 47 | public string NewVersion { get; set; } 48 | public string DownloadUrl { get; set; } 49 | public string NewSdkTable { get; set; } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/NewProjectSettings.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System.IO; 19 | 20 | namespace Flutnet.Cli.Core 21 | { 22 | internal class NewProjectSettings 23 | { 24 | public string AppName { get; set; } 25 | public string OrganizationId { get; set; } 26 | public string AndroidAppId { get; set; } 27 | public string IosAppId { get; set; } 28 | public bool TargetAndroid { get; set; } 29 | public bool TargetIos { get; set; } 30 | public string ProjectName { get; set; } 31 | public string SolutionName { get; set; } 32 | public string Location { get; set; } 33 | public bool CreateFlutterSubfolder { get; set; } 34 | public string FlutterSubfolderName { get; set; } = "Flutter"; 35 | public string FlutterModuleName { get; set; } 36 | public string FlutterPackageName { get; set; } 37 | public string FlutterVersion { get; set; } 38 | 39 | public string SolutionPath => Path.Combine(Path.GetFullPath(Location), SolutionName); 40 | public string FlutterSubfolderPath => CreateFlutterSubfolder ? Path.Combine(SolutionPath, FlutterSubfolderName) : SolutionPath; 41 | public string FlutterModulePath => Path.Combine(FlutterSubfolderPath, FlutterModuleName); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Resources/EventExample.txt: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | final Stream _events; 7 | Stream get events => _events; 8 | 9 | IBluetoothService({ 10 | @required this.instanceId, 11 | }) : _events = Bridge() 12 | .events(instanceId: instanceId, event: 'event') 13 | .map((_) => BluetoothDeviceInfo.fromJson(_)); -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Resources/converters.dart: -------------------------------------------------------------------------------- 1 | // ************************************* 2 | // ** DO NOT EDIT THIS FILE ** 3 | // ************************************* 4 | import 'dart:typed_data'; 5 | 6 | import 'package:json_annotation/json_annotation.dart'; 7 | import 'dart:convert'; 8 | 9 | class Uint8Converter implements JsonConverter { 10 | const Uint8Converter(); 11 | 12 | @override 13 | Uint8List fromJson(Object json) { 14 | if (json == null) { 15 | return null; 16 | } 17 | 18 | if (json is String) { 19 | List list = base64.decode(json); 20 | Uint8List bytes = Uint8List.fromList(list); 21 | return bytes; 22 | } 23 | 24 | throw new Exception("Invalid Uint8List conversion!!"); 25 | } 26 | 27 | @override 28 | Object toJson(Uint8List object) { 29 | return object ?? base64.encode(object); 30 | } 31 | } 32 | 33 | class DateTimeConverter implements JsonConverter { 34 | const DateTimeConverter(); 35 | 36 | @override 37 | DateTime fromJson(Object json) { 38 | if (json == null) { 39 | return null; 40 | } 41 | 42 | if (json is String) { 43 | return DateTime.parse(json); 44 | } 45 | 46 | throw new Exception("Invalid DateTime conversion!!"); 47 | } 48 | 49 | @override 50 | Object toJson(DateTime object) { 51 | return object?.toIso8601String() ?? object; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Resources/convertersV2.dart: -------------------------------------------------------------------------------- 1 | // ************************************* 2 | // ** DO NOT EDIT THIS FILE ** 3 | // ************************************* 4 | import 'dart:typed_data'; 5 | import 'package:json_annotation/json_annotation.dart'; 6 | import 'dart:convert'; 7 | 8 | class Uint8Converter implements JsonConverter { 9 | const Uint8Converter(); 10 | 11 | @override 12 | Uint8List fromJson(Object json) { 13 | if (json == null) { 14 | return null; 15 | } 16 | 17 | if (json is Map) { 18 | List list = base64.decode(json['\$value']); 19 | Uint8List bytes = Uint8List.fromList(list); 20 | return bytes; 21 | } 22 | 23 | if (json is String) { 24 | List list = base64.decode(json); 25 | Uint8List bytes = Uint8List.fromList(list); 26 | return bytes; 27 | } 28 | 29 | throw new Exception("Invalid Uint8List conversion!!"); 30 | } 31 | 32 | Uint8List fromJsonDynamic(Object json) { 33 | return fromJson(json); 34 | } 35 | 36 | @override 37 | Object toJson(Uint8List object) { 38 | return object ?? base64.encode(object); 39 | } 40 | 41 | Object toJsonDynamic(Uint8List object) { 42 | return toJson(object); 43 | } 44 | } 45 | 46 | class DateTimeConverter implements JsonConverter { 47 | const DateTimeConverter(); 48 | 49 | @override 50 | DateTime fromJson(Object json) { 51 | if (json == null) { 52 | return null; 53 | } 54 | 55 | if (json is String) { 56 | return DateTime.parse(json); 57 | } 58 | 59 | throw new Exception("Invalid DateTime conversion!!"); 60 | } 61 | 62 | DateTime fromJsonDynamic(Object json) { 63 | return fromJson(json); 64 | } 65 | 66 | @override 67 | Object toJson(DateTime object) { 68 | return object?.toIso8601String() ?? object; 69 | } 70 | 71 | Object toJsonDynamic(DateTime object) { 72 | return toJson(object); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Resources/converters_test.dart: -------------------------------------------------------------------------------- 1 | // ************************************* 2 | // NOT EDIT THIS FILE * 3 | // ************************************* 4 | import 'dart:typed_data'; 5 | 6 | import 'package:json_annotation/json_annotation.dart'; 7 | import 'dart:convert'; 8 | 9 | class Uint8Converter implements JsonConverter { 10 | const Uint8Converter(); 11 | 12 | @override 13 | Uint8List fromJson(Object json) { 14 | if (json == null) { 15 | return null; 16 | } 17 | 18 | if (json is String) { 19 | List list = base64.decode(json); 20 | Uint8List bytes = Uint8List.fromList(list); 21 | return bytes; 22 | } 23 | 24 | throw new Exception("Invalid Uint8List conversion!!"); 25 | } 26 | 27 | @override 28 | Object toJson(Uint8List object) { 29 | return object ?? base64.encode(object); 30 | } 31 | } 32 | 33 | class DateTimeConverter implements JsonConverter { 34 | const DateTimeConverter(); 35 | 36 | @override 37 | DateTime fromJson(Object json) { 38 | if (json == null) { 39 | return null; 40 | } 41 | 42 | if (json is String) { 43 | //String jsonValue = json; 44 | // The problem is Dart supports second fraction only 6 digits. 45 | // But datatime that came from api is 7 digits. 46 | //if (jsonValue.contains(".")) { 47 | // jsonValue = jsonValue.substring(0, jsonValue.length - 1); 48 | //} 49 | return DateTime.parse(json); 50 | } 51 | 52 | throw new Exception("Invalid DateTime conversion!!"); 53 | } 54 | 55 | @override 56 | Object toJson(DateTime object) { 57 | return object?.toIso8601String() ?? object; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Resources/dynamic_deserialization_example.txt: -------------------------------------------------------------------------------- 1 |  static final Map)> 2 | _codeToMediaException = { 3 | "MediaException": (Map json) => 4 | MediaException.fromJson(json), 5 | "MediaException2": (Map json) => 6 | MediaException2.fromJson(json), 7 | }; 8 | 9 | /// Dynamic deserialization 10 | factory MediaException.fromJsonDynamic(Map json) { 11 | // Nothing to do 12 | if (json == null || json.isEmpty) return null; 13 | 14 | try { 15 | String typeKey = json.keys.first; 16 | 17 | var fromJson = _codeToMediaException.containsKey(typeKey) 18 | ? _codeToMediaException[typeKey] 19 | : null; 20 | 21 | Map payload = json[typeKey]; 22 | 23 | ///! ******************************* 24 | ///! REAL DESERIALIZATION PROCESS 25 | ///! ******************************* 26 | return fromJson(payload); 27 | } catch (e) { 28 | throw new Exception("Error during lib deserialize process: $json"); 29 | } 30 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Resources/exceptions.dart: -------------------------------------------------------------------------------- 1 | class SerializationException implements Exception { 2 | String cause; 3 | SerializationException(this.cause); 4 | } 5 | 6 | class DeserializationException implements Exception { 7 | String cause; 8 | DeserializationException(this.cause); 9 | } 10 | 11 | -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Resources/fnet_message_debug.dart: -------------------------------------------------------------------------------- 1 | class _FNetMessageDebug { 2 | final int requestId; 3 | final String id; 4 | final String type; 5 | final String methodId; 6 | final Map params; 7 | final Map res; 8 | 9 | _FNetMessageDebug({ 10 | this.requestId, 11 | this.id, 12 | this.type, 13 | this.methodId, 14 | this.params, 15 | this.res, 16 | }); 17 | 18 | Map toJson() { 19 | return { 20 | 'requestId': requestId, 21 | 'id': id, 22 | 'type': type, 23 | 'methodId': methodId, 24 | 'params': params, 25 | 'res': res, 26 | }; 27 | } 28 | 29 | static _FNetMessageDebug fromJson(Map json) { 30 | if (json == null) return null; 31 | 32 | return _FNetMessageDebug( 33 | requestId: json['requestId'], 34 | id: json['id'], 35 | type: json['type'], 36 | methodId: json['methodId'], 37 | params: json['params'], 38 | res: json['res'], 39 | ); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Resources/index.dart: -------------------------------------------------------------------------------- 1 | library flutter_xamarin_protocol; 2 | 3 | export 'base/index.dart'; 4 | export 'messages/index.dart'; 5 | export 'models/index.dart'; 6 | export 'message_serializer.dart'; 7 | export 'message_deserializer.dart'; -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Resources/lib_message.dart: -------------------------------------------------------------------------------- 1 | import 'index.dart'; 2 | 3 | class LibMessage { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Resources/methodDartExample.txt: -------------------------------------------------------------------------------- 1 | static const _k_sendContent = 'sendContent'; 2 | Future sendContent({ 3 | String message, 4 | }) async { 5 | // Errors occurring on the platform side cause invokeMethod to throw 6 | // PlatformExceptions. 7 | try { 8 | // Here the real code.... 9 | CmdLoginServiceSendContent _param = CmdLoginServiceSendContent( 10 | message: message, 11 | ); 12 | 13 | bool debugFlutterEnable = true; 14 | Map _data; 15 | if (debugFlutterEnable) { 16 | _data = await FlutterXamarinDebug().invokeMethod( 17 | id: serviceId, 18 | methodId: _k_sendContent, 19 | type: _kClass, 20 | params: _param.toJson(), 21 | ); 22 | } else { 23 | _data = await _channel.invokeMethod(_k_sendContent, _param.toJson()); 24 | } 25 | 26 | ResLoginServiceSendContent _res = 27 | ResLoginServiceSendContent.fromJson(_data); 28 | } on PlatformException catch (e) { 29 | throw Exception("Unable to execute method 'sendContent': ${e.message}"); 30 | } 31 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Utilities/DirectoryInfoExtensions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System.IO; 19 | 20 | namespace Flutnet.Cli.Core.Utilities 21 | { 22 | internal static class DirectoryInfoExtensions 23 | { 24 | /// 25 | /// Deletes all files and folders in this directory. 26 | /// 27 | public static void Clear(this DirectoryInfo directory) 28 | { 29 | // Delete all files 30 | foreach (FileInfo file in directory.GetFiles()) 31 | { 32 | file.Delete(); 33 | } 34 | 35 | // Delete all subdirectories 36 | foreach (DirectoryInfo dir in directory.GetDirectories()) 37 | { 38 | dir.Delete(true); 39 | } 40 | } 41 | 42 | public static bool IsSymbolic(this DirectoryInfo directory) 43 | { 44 | return directory.Attributes.HasFlag(FileAttributes.ReparsePoint); 45 | } 46 | 47 | } 48 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Utilities/OperatingSystem.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | using System.IO; 20 | using System.Runtime.InteropServices; 21 | 22 | namespace Flutnet.Cli.Core.Utilities 23 | { 24 | internal static class OperatingSystem 25 | { 26 | public static bool IsWindows() => 27 | RuntimeInformation.IsOSPlatform(OSPlatform.Windows); 28 | 29 | public static bool IsMacOS() => 30 | RuntimeInformation.IsOSPlatform(OSPlatform.OSX); 31 | 32 | public static bool IsLinux() => 33 | RuntimeInformation.IsOSPlatform(OSPlatform.Linux); 34 | 35 | public static bool Is64Bit => Environment.Is64BitOperatingSystem; 36 | 37 | public static string DefaultProjectsLocation() 38 | { 39 | return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Source", "Repos"); 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Utilities/StreamExtensions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System.IO; 19 | 20 | namespace Flutnet.Cli.Core.Utilities 21 | { 22 | internal static class StreamExtensions 23 | { 24 | public static void WriteTo(this Stream input, string filepath) 25 | { 26 | //your fav write method: 27 | /* 28 | using (var stream = File.Create(file)) 29 | { 30 | input.CopyTo(stream); 31 | } 32 | */ 33 | //or 34 | 35 | using (var stream = new MemoryStream()) 36 | { 37 | input.CopyTo(stream); 38 | File.WriteAllBytes(filepath, stream.ToArray()); 39 | } 40 | 41 | //whatever that fits. 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.Core/Utilities/StringExtensions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | 20 | namespace Flutnet.Cli.Core.Utilities 21 | { 22 | public static class StringExtensions 23 | { 24 | public static string ToNetStringVersion(this string pubVersion) 25 | { 26 | if (string.IsNullOrEmpty(pubVersion)) 27 | return pubVersion; 28 | 29 | // From ^2.2.0+2 --> 2.2.0.2 30 | return pubVersion.Replace("^", string.Empty).Replace("+", "."); 31 | } 32 | 33 | public static Version ToNetVersion(this string pubVersion) 34 | { 35 | string netVersion = pubVersion.ToNetStringVersion(); 36 | try 37 | { 38 | var version = Version.Parse(netVersion); 39 | return version; 40 | } 41 | catch 42 | { 43 | return new Version(0, 0); 44 | } 45 | } 46 | 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Flutnet.Cli.DTO/BaseArgs.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | using JsonKnownTypes; 20 | using Newtonsoft.Json; 21 | 22 | namespace Flutnet.Cli.DTO 23 | { 24 | /// 25 | /// Base class that holds all the input arguments of a CLI 'exec' command. 26 | /// 27 | [JsonConverter(typeof(JsonKnownTypesConverter))] 28 | public abstract class InArg 29 | { 30 | } 31 | 32 | /// 33 | /// Base class that holds the result details of a CLI 'exec' command. 34 | /// 35 | [JsonConverter(typeof(JsonKnownTypesConverter))] 36 | public abstract class OutArg 37 | { 38 | public bool Success { get; set; } = true; 39 | public int ErrorCode { get; set; } 40 | public string ErrorMessage { get; set; } 41 | public string SourceError { get; set; } 42 | } 43 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.DTO/Flutnet.Cli.DTO.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Flutnet.Cli.DTO/FlutnetSetupArgs.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | namespace Flutnet.Cli.DTO 19 | { 20 | /// 21 | /// Class that holds all the input arguments of the CLI 'exec' command 22 | /// for properly configuring Flutter and all the required environment variables. 23 | /// 24 | public class FlutnetSetupInArg : InArg 25 | { 26 | public string FlutterSdkLocation { get; set; } 27 | public string AndroidSdkLocation { get; set; } 28 | public string JavaSdkLocation { get; set; } 29 | } 30 | 31 | /// 32 | /// Class that holds the result details of the CLI 'exec' command 33 | /// for properly configuring Flutter and all the required environment variables. 34 | /// 35 | public class FlutnetSetupOutArg : OutArg 36 | { 37 | } 38 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.DTO/FlutterCompatibility.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | namespace Flutnet.Cli.DTO 19 | { 20 | public enum FlutterCompatibility 21 | { 22 | Supported, 23 | SupportNotGuaranteed, 24 | NotSupported 25 | } 26 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.DTO/FlutterInfoArgs.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | namespace Flutnet.Cli.DTO 19 | { 20 | /// 21 | /// Class that holds all the input arguments of the CLI 'exec' command 22 | /// for retrieving information about the installed version of Flutter 23 | /// and its compatibility with the current version of Flutnet SDK. 24 | /// 25 | public class FlutterInfoInArg : InArg 26 | { 27 | } 28 | 29 | /// 30 | /// Class that holds the result details of the CLI 'exec' command 31 | /// for retrieving information about the installed version of Flutter 32 | /// and its compatibility with the current version of Flutnet SDK. 33 | /// 34 | public class FlutterInfoOutArg : OutArg 35 | { 36 | public string InstalledVersion { get; set; } 37 | public FlutterCompatibility Compatibility { get; set; } 38 | public string NextSupportedVersion { get; set; } 39 | public string LatestSupportedVersion { get; set; } 40 | } 41 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli.DTO/FlutterIssues.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | 20 | namespace Flutnet.Cli.DTO 21 | { 22 | [Flags] 23 | public enum FlutterIssues 24 | { 25 | None = 0, 26 | SdkNotFound = 1, 27 | CompatibilityIssues = 2, 28 | ReportingErrors = 4 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Flutnet.Cli.DTO/NewProjectArgs.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | namespace Flutnet.Cli.DTO 19 | { 20 | /// 21 | /// Class that holds all the input arguments of the CLI 'exec' command 22 | /// for creating a new Flutnet project. 23 | /// 24 | public class NewProjectInArg : InArg 25 | { 26 | public string AppName { get; set; } 27 | public string OrganizationId { get; set; } 28 | public string AndroidAppId { get; set; } 29 | public string IosAppId { get; set; } 30 | public bool TargetAndroid { get; set; } 31 | public bool TargetIos { get; set; } 32 | public string ProjectName { get; set; } 33 | public string SolutionName { get; set; } 34 | public string Location { get; set; } 35 | public bool CreateFlutterSubfolder { get; set; } 36 | public string FlutterModuleName { get; set; } 37 | public string FlutterPackageName { get; set; } 38 | public string FlutterVersion { get; set; } 39 | } 40 | 41 | /// 42 | /// Class that holds the result details of the CLI 'exec' command 43 | /// for creating a new Flutnet project. 44 | /// 45 | public class NewProjectOutArg : OutArg 46 | { 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Flutnet.Cli.DTO/UpdateCheckArgs.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | namespace Flutnet.Cli.DTO 19 | { 20 | /// 21 | /// Class that holds all the input arguments of the CLI 'exec' command 22 | /// for checking for software updates. 23 | /// 24 | public class UpdateCheckInArg : InArg 25 | { 26 | } 27 | 28 | /// 29 | /// Class that holds the result details of the CLI 'exec' command 30 | /// for checking for software updates. 31 | /// 32 | public class UpdateCheckOutArg : OutArg 33 | { 34 | public bool UpToDate { get; set; } 35 | public string NewVersion { get; set; } 36 | public string DownloadUrl { get; set; } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Flutnet.Cli/CommandBase.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | namespace Flutnet.Cli 19 | { 20 | internal abstract class CommandBase 21 | { 22 | public abstract int Execute(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Flutnet.Cli/ExceptionSerializer.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Reflection; 21 | using Newtonsoft.Json; 22 | 23 | namespace Flutnet.Cli 24 | { 25 | internal static class ExceptionSerializer 26 | { 27 | public static string Serialize(Exception exc) 28 | { 29 | if (exc == null) 30 | return null; 31 | 32 | Dictionary dict = new Dictionary(); 33 | 34 | Type type = exc.GetType(); 35 | dict["ClassName"] = type.FullName; 36 | dict["Message"] = exc.Message; 37 | dict["Data"] = exc.Data; 38 | //dict["InnerException"] = Serialize(exc.InnerException); 39 | dict["HResult"] = exc.HResult; 40 | dict["Source"] = exc.Source; 41 | 42 | //foreach (PropertyInfo p in type.GetProperties(BindingFlags.Public | BindingFlags.Instance)) 43 | //{ 44 | // if (!dict.ContainsKey(p.Name)) 45 | // dict[p.Name] = p.GetValue(exc); 46 | //} 47 | 48 | return JsonConvert.SerializeObject(dict); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/Flutnet.Cli/Flutnet.Cli.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | flutnet 7 | Novagem Solutions 8 | Novagem Solutions 9 | Flutnet 10 | © 2020-2021 Novagem Solutions S.r.l. 11 | false 12 | false 13 | false 14 | flutnet-logo.ico 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | PreserveNewest 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/Flutnet.Cli/OptionsBase.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using CommandLine; 19 | 20 | namespace Flutnet.Cli 21 | { 22 | public class OptionsBase 23 | { 24 | [Option('v', "verbose", Required = false, HelpText = "Prints all messages to standard output.")] 25 | public bool Verbose { get; set; } 26 | 27 | public virtual void Validate() 28 | { 29 | // Add support for validation and custom types 30 | // https://github.com/commandlineparser/commandline/issues/146 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Flutnet.Cli/OptionsValidationException.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | using System.ComponentModel.DataAnnotations; 20 | using System.Reflection; 21 | using CommandLine; 22 | 23 | namespace Flutnet.Cli 24 | { 25 | internal class OptionsValidationException : ValidationException 26 | { 27 | public OptionsValidationException(Type verbType, string message) : base(message) 28 | { 29 | Verb = (VerbAttribute) verbType.GetCustomAttribute(typeof(VerbAttribute)); 30 | } 31 | 32 | public OptionsValidationException(Type verbType, string message, Exception innerException) : base(message, innerException) 33 | { 34 | Verb = (VerbAttribute) verbType.GetCustomAttribute(typeof(VerbAttribute)); 35 | } 36 | 37 | public VerbAttribute Verb { get; } 38 | } 39 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | [assembly: System.Reflection.AssemblyTitle("Flutnet command-line interface")] -------------------------------------------------------------------------------- /src/Flutnet.Cli/Properties/GlobalAssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | [assembly: System.Reflection.AssemblyProduct("Flutnet")] 19 | [assembly: System.Reflection.AssemblyInformationalVersion("2.0.0")] 20 | -------------------------------------------------------------------------------- /src/Flutnet.Cli/ReturnCodes.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | namespace Flutnet.Cli 19 | { 20 | internal class ReturnCodes 21 | { 22 | public const int Success = 0; 23 | public const int CommandExecutionError = 1; 24 | public const int OptionsParsingError = 2; 25 | public const int OptionsValidationError = 3; 26 | } 27 | } -------------------------------------------------------------------------------- /src/Flutnet.Cli/flutnet-logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/src/Flutnet.Cli/flutnet-logo.ico -------------------------------------------------------------------------------- /src/Flutnet.Cli/flutnet.appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } -------------------------------------------------------------------------------- /src/Flutnet.Shared/Flutnet.Shared.projitems: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | true 6 | e9955800-f9e3-4c64-be6e-368b60dedb1f 7 | 8 | 9 | Flutnet.Shared 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/Flutnet.Shared/Flutnet.Shared.shproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | e9955800-f9e3-4c64-be6e-368b60dedb1f 5 | 14.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/Flutnet.Shared/FlutnetAppInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | using System.Reflection; 20 | 21 | namespace Flutnet.Data 22 | { 23 | internal class FlutnetAppInfo 24 | { 25 | [Obfuscation(Exclude = true)] 26 | public string ApplicationId { get; set; } 27 | [Obfuscation(Exclude = true)] 28 | public string ProductKey { get; set; } 29 | [Obfuscation(Exclude = true)] 30 | public DateTime LicenseExpirationDate { get; set; } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Flutnet.Shared/FlutnetErrorCode.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System.Reflection; 19 | using Flutnet.ServiceModel; 20 | 21 | namespace Flutnet.Data 22 | { 23 | [Obfuscation(Exclude = true)] 24 | [PlatformData] 25 | internal enum FlutnetErrorCode 26 | { 27 | OperationNotImplemented, 28 | OperationArgumentCountMismatch, 29 | InvalidOperationArguments, 30 | OperationArgumentParsingError, 31 | OperationFailed, 32 | OperationCanceled, 33 | EnvironmentNotInitialized, 34 | AppKeyErrorBadFormat, 35 | AppKeyErrorApplicationIdMismatch, 36 | AppKeyErrorUnsupportedLibraryVersion, 37 | TrialCallsExceeded 38 | } 39 | } -------------------------------------------------------------------------------- /src/Flutnet.Shared/FlutnetException.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | using System.Reflection; 20 | using Flutnet.ServiceModel; 21 | 22 | namespace Flutnet.Data 23 | { 24 | [Obfuscation(Exclude = true)] 25 | internal class FlutnetException : PlatformOperationException 26 | { 27 | public FlutnetException(FlutnetErrorCode errorCode) 28 | { 29 | Code = errorCode; 30 | } 31 | public FlutnetException(FlutnetErrorCode errorCode, string message) : base(message) 32 | { 33 | Code = errorCode; 34 | } 35 | public FlutnetException(FlutnetErrorCode errorCode, string message, Exception innerException) : base(message, innerException) 36 | { 37 | Code = errorCode; 38 | } 39 | 40 | public FlutnetErrorCode Code { get; } 41 | } 42 | } -------------------------------------------------------------------------------- /src/Flutnet.Shared/StringExtensions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | namespace Flutnet.Utilities 19 | { 20 | internal static class StringExtensions 21 | { 22 | public static string FirstCharUpper(this string value) 23 | { 24 | return string.IsNullOrWhiteSpace(value) 25 | ? value 26 | : value.Length > 1 27 | ? char.ToUpper(value[0]) + value.Substring(1) 28 | : value.ToUpper(); 29 | } 30 | 31 | public static string FirstCharLower(this string value) 32 | { 33 | return string.IsNullOrWhiteSpace(value) 34 | ? value 35 | : value.Length > 1 36 | ? char.ToLower(value[0]) + value.Substring(1) 37 | : value.ToLower(); 38 | } 39 | 40 | public static string Quoted(this string value) 41 | { 42 | return $"\"{value}\""; 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /src/FlutnetUI.Ext/Adapters/BrushAdapter.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using Avalonia.Media; 19 | using TheArtOfDev.HtmlRenderer.Adapters; 20 | 21 | namespace FlutnetUI.Ext.Adapters 22 | { 23 | /// 24 | /// Adapter for Avalonia brush objects. 25 | /// 26 | internal sealed class BrushAdapter : RBrush 27 | { 28 | /// 29 | /// The actual Avalonia brush instance. 30 | /// 31 | private readonly IBrush _brush; 32 | 33 | /// 34 | /// Init. 35 | /// 36 | public BrushAdapter(IBrush brush) 37 | { 38 | _brush = brush; 39 | } 40 | 41 | /// 42 | /// The actual Avalonia brush instance. 43 | /// 44 | public IBrush Brush 45 | { 46 | get { return _brush; } 47 | } 48 | 49 | public override void Dispose() 50 | { } 51 | } 52 | } -------------------------------------------------------------------------------- /src/FlutnetUI.Ext/Adapters/ContextMenuAdapter.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | using TheArtOfDev.HtmlRenderer.Adapters; 20 | using TheArtOfDev.HtmlRenderer.Adapters.Entities; 21 | 22 | namespace FlutnetUI.Ext.Adapters 23 | { 24 | /// 25 | /// Adapter for Avalonia context menu. 26 | /// 27 | internal sealed class NullContextMenuAdapter : RContextMenu 28 | { 29 | //TODO: actually implement context menu 30 | 31 | private int _itemCount; 32 | public override int ItemsCount => _itemCount; 33 | public override void AddDivider() 34 | { 35 | 36 | } 37 | 38 | public override void AddItem(string text, bool enabled, EventHandler onClick) 39 | { 40 | _itemCount++; 41 | } 42 | 43 | public override void RemoveLastDivider() 44 | { 45 | _itemCount++; 46 | } 47 | 48 | public override void Show(RControl parent, RPoint location) 49 | { 50 | } 51 | 52 | public override void Dispose() 53 | { 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /src/FlutnetUI.Ext/Adapters/FontFamilyAdapter.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using TheArtOfDev.HtmlRenderer.Adapters; 19 | 20 | namespace FlutnetUI.Ext.Adapters 21 | { 22 | /// 23 | /// Adapter for Avalonia Font family objects. 24 | /// 25 | internal sealed class FontFamilyAdapter : RFontFamily 26 | { 27 | public FontFamilyAdapter(string fontFamily) 28 | { 29 | Name = fontFamily; 30 | } 31 | 32 | public override string Name { get; } 33 | } 34 | } -------------------------------------------------------------------------------- /src/FlutnetUI.Ext/Adapters/ImageAdapter.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using Avalonia.Media.Imaging; 19 | using TheArtOfDev.HtmlRenderer.Adapters; 20 | 21 | namespace FlutnetUI.Ext.Adapters 22 | { 23 | /// 24 | /// Adapter for Avalonia image objects. 25 | /// 26 | internal sealed class ImageAdapter : RImage 27 | { 28 | public ImageAdapter(Bitmap image) 29 | { 30 | Image = image; 31 | } 32 | 33 | /// 34 | /// The underlying Avalonia image. 35 | /// 36 | public Bitmap Image { get; } 37 | 38 | public override double Width => Image.PixelSize.Width; 39 | 40 | public override double Height => Image.PixelSize.Height; 41 | 42 | public override void Dispose() 43 | { 44 | Image.Dispose(); 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /src/FlutnetUI.Ext/FlutnetUI.Ext.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | %(Filename) 10 | 11 | 12 | Designer 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/FlutnetUI.Ext/HtmlRendererRoutedEventArgs.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using Avalonia.Interactivity; 19 | 20 | namespace FlutnetUI.Ext 21 | { 22 | public class HtmlRendererRoutedEventArgs : RoutedEventArgs 23 | { 24 | public T Event { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/FlutnetUI.Ext/MessageBoxAccentButtons.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | 20 | namespace FlutnetUI.Ext 21 | { 22 | /// 23 | /// Flags for defining the accent (colored) buttons on a MessageBox. 24 | /// 25 | [Flags] 26 | public enum MessageBoxAccentButtons 27 | { 28 | /// 29 | /// No button on the message box has accent. 30 | /// 31 | None = 0, 32 | 33 | /// 34 | /// The first button on the message box has accent. 35 | /// 36 | Button1 = 1, 37 | 38 | /// 39 | /// The second button on the message box has accent. 40 | /// 41 | Button2 = 2, 42 | 43 | /// 44 | /// The third button on the message box has accent. 45 | /// 46 | Button3 = 4 47 | } 48 | } -------------------------------------------------------------------------------- /src/FlutnetUI.Ext/MessageBoxDefaultButton.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | namespace FlutnetUI.Ext 19 | { 20 | /// 21 | /// Specifies constants defining the default button on a MessageBox. 22 | /// 23 | public enum MessageBoxDefaultButton 24 | { 25 | /// 26 | /// The first button on the message box is the default button. 27 | /// 28 | Button1 = 0x0000, 29 | 30 | /// 31 | /// The second button on the message box is the default button. 32 | /// 33 | Button2 = 0x0100, 34 | 35 | /// 36 | /// The third button on the message box is the default button. 37 | /// 38 | Button3 = 0x0200 39 | } 40 | } -------------------------------------------------------------------------------- /src/FlutnetUI.Ext/Models/MessageBoxButton.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | 20 | namespace FlutnetUI.Ext.Models 21 | { 22 | public class MessageBoxButton 23 | { 24 | public MessageBoxButton(DialogResult result) : this(null, result) 25 | { 26 | } 27 | 28 | public MessageBoxButton(string text, DialogResult result) 29 | { 30 | Name = Enum.GetName(typeof(DialogResult), result); 31 | Result = result; 32 | Text = !string.IsNullOrEmpty(text) ? text : Name; 33 | } 34 | 35 | public string Name { get; } 36 | public DialogResult Result { get; set; } 37 | public string Text { get; set; } 38 | public bool IsDefault { get; set; } 39 | public bool HasAccent { get; set; } 40 | public string Tag => HasAccent ? "Accent" : null; 41 | } 42 | } -------------------------------------------------------------------------------- /src/FlutnetUI.Ext/Utilities/PropertyHelper.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | using Avalonia; 20 | 21 | namespace FlutnetUI.Ext.Utilities 22 | { 23 | internal static class PropertyHelper 24 | { 25 | public static AvaloniaProperty Register(string name, T def, Action changed) where TOwner : AvaloniaObject 26 | { 27 | var pp = AvaloniaProperty.Register(name, def); 28 | Action cb = args => 29 | { 30 | changed(args.Sender, args); 31 | }; 32 | 33 | pp.Changed.Subscribe(cb); 34 | return pp; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/FlutnetUI/App.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/FlutnetUI/App.xaml.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/src/FlutnetUI/App.xaml.cs -------------------------------------------------------------------------------- /src/FlutnetUI/Assets/Fonts/Roboto-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/src/FlutnetUI/Assets/Fonts/Roboto-Black.ttf -------------------------------------------------------------------------------- /src/FlutnetUI/Assets/Fonts/Roboto-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/src/FlutnetUI/Assets/Fonts/Roboto-BlackItalic.ttf -------------------------------------------------------------------------------- /src/FlutnetUI/Assets/Fonts/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/src/FlutnetUI/Assets/Fonts/Roboto-Bold.ttf -------------------------------------------------------------------------------- /src/FlutnetUI/Assets/Fonts/Roboto-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/src/FlutnetUI/Assets/Fonts/Roboto-BoldItalic.ttf -------------------------------------------------------------------------------- /src/FlutnetUI/Assets/Fonts/Roboto-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/src/FlutnetUI/Assets/Fonts/Roboto-Italic.ttf -------------------------------------------------------------------------------- /src/FlutnetUI/Assets/Fonts/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/src/FlutnetUI/Assets/Fonts/Roboto-Light.ttf -------------------------------------------------------------------------------- /src/FlutnetUI/Assets/Fonts/Roboto-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/src/FlutnetUI/Assets/Fonts/Roboto-LightItalic.ttf -------------------------------------------------------------------------------- /src/FlutnetUI/Assets/Fonts/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/src/FlutnetUI/Assets/Fonts/Roboto-Medium.ttf -------------------------------------------------------------------------------- /src/FlutnetUI/Assets/Fonts/Roboto-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/src/FlutnetUI/Assets/Fonts/Roboto-MediumItalic.ttf -------------------------------------------------------------------------------- /src/FlutnetUI/Assets/Fonts/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/src/FlutnetUI/Assets/Fonts/Roboto-Regular.ttf -------------------------------------------------------------------------------- /src/FlutnetUI/Assets/Fonts/Roboto-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/src/FlutnetUI/Assets/Fonts/Roboto-Thin.ttf -------------------------------------------------------------------------------- /src/FlutnetUI/Assets/Fonts/Roboto-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/src/FlutnetUI/Assets/Fonts/Roboto-ThinItalic.ttf -------------------------------------------------------------------------------- /src/FlutnetUI/Assets/Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/src/FlutnetUI/Assets/Logo.png -------------------------------------------------------------------------------- /src/FlutnetUI/Assets/Logo_txt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/src/FlutnetUI/Assets/Logo_txt.png -------------------------------------------------------------------------------- /src/FlutnetUI/Assets/avalonia-logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/src/FlutnetUI/Assets/avalonia-logo.ico -------------------------------------------------------------------------------- /src/FlutnetUI/Assets/flutnet-logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/src/FlutnetUI/Assets/flutnet-logo.ico -------------------------------------------------------------------------------- /src/FlutnetUI/Converters/IntToBoolConverter.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | using System.Globalization; 20 | using Avalonia.Data.Converters; 21 | 22 | namespace FlutnetUI.Converters 23 | { 24 | public class IntToBoolConverter : IValueConverter 25 | { 26 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 27 | { 28 | return (int)value != 0; 29 | } 30 | 31 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 32 | { 33 | return (bool)value ? 1 : 0; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/FlutnetUI/Converters/InverseBooleanConverter.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | using System.Globalization; 20 | using Avalonia.Data.Converters; 21 | 22 | namespace FlutnetUI.Converters 23 | { 24 | 25 | public class InverseBooleanConverter : IValueConverter 26 | { 27 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 28 | { 29 | return !(bool)value; 30 | } 31 | 32 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 33 | { 34 | return !(bool)value; 35 | } 36 | 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/FlutnetUI/FlutnetUI.appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } -------------------------------------------------------------------------------- /src/FlutnetUI/Models/FlutnetAppSettings.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | namespace FlutnetUI.Models 19 | { 20 | public class FlutnetAppSettings 21 | { 22 | public string AppName { get; set; } 23 | public string OrganizationId { get; set; } 24 | /// 25 | /// A proper Android application ID (https://developer.android.com/studio/build/application-id) 26 | /// built upon the app name and organization identifier provided by the user. 27 | /// 28 | public string AndroidAppId { get; set; } 29 | /// 30 | /// A proper iOS bundle ID (https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleidentifier) 31 | /// built upon the app name and organization identifier provided by the user. 32 | /// 33 | public string IosAppId { get; set; } 34 | /// 35 | /// Indicates whether a Xamarin.Android application should be created. 36 | /// 37 | public bool TargetAndroid { get; set; } 38 | /// 39 | /// Indicates whether a Xamarin.iOS application should be created. 40 | /// 41 | public bool TargetIos { get; set; } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/FlutnetUI/Models/FlutnetProjectSettings.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | namespace FlutnetUI.Models 19 | { 20 | public class FlutnetProjectSettings 21 | { 22 | public string ProjectName { get; set; } 23 | public string SolutionName { get; set; } 24 | public string Location { get; set; } 25 | public bool CreateFlutterSubfolder { get; set; } 26 | public string FlutterModuleName { get; set; } 27 | public string FlutterPackageName { get; set; } 28 | public string FlutterVersion { get; set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/FlutnetUI/Models/SetupResult.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | namespace FlutnetUI.Models 19 | { 20 | public class SetupResult 21 | { 22 | public bool OperationCanceled { get; set; } 23 | public bool OperationFailed { get; set; } 24 | public object OperationResult { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/FlutnetUI/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | [assembly: System.Reflection.AssemblyTitle("Flutnet Console")] -------------------------------------------------------------------------------- /src/FlutnetUI/Resources/Setup_Styles.css: -------------------------------------------------------------------------------- 1 | div.h2ava { 2 | font-size: 22px; 3 | text-align: justify; 4 | text-justify: inter-word; 5 | } 6 | -------------------------------------------------------------------------------- /src/FlutnetUI/Utilities/ApplicationExtensions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using Avalonia; 19 | using Avalonia.Controls; 20 | using Avalonia.Controls.ApplicationLifetimes; 21 | 22 | namespace FlutnetUI.Utilities 23 | { 24 | internal static class ApplicationExtensions 25 | { 26 | public static Window GetMainWindow(this Application application) 27 | { 28 | return (application.ApplicationLifetime as IClassicDesktopStyleApplicationLifetime)?.MainWindow; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/FlutnetUI/Utilities/AssemblyExtensions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System.Diagnostics; 19 | using System.Reflection; 20 | 21 | namespace FlutnetUI.Utilities 22 | { 23 | internal static class AssemblyExtensions 24 | { 25 | public static string GetProductVersion(this Assembly assembly) 26 | { 27 | FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location); 28 | return fvi.ProductVersion; 29 | } 30 | 31 | public static string GetFileVersion(this Assembly assembly) 32 | { 33 | FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location); 34 | return fvi.FileVersion; 35 | } 36 | 37 | public static string GetVersion(this Assembly assembly) 38 | { 39 | AssemblyName name = assembly.GetName(); 40 | return name.Version.ToString(); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /src/FlutnetUI/Utilities/Log.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | 20 | namespace FlutnetUI.Utilities 21 | { 22 | internal class Log 23 | { 24 | public static void Debug(string text) 25 | { 26 | // TODO 27 | //Console.WriteLine(text); 28 | } 29 | 30 | public static void Debug(string format, params object[] args) 31 | { 32 | // TODO 33 | //Console.WriteLine(text); 34 | } 35 | 36 | public static void Ex(Exception e) 37 | { 38 | // TODO 39 | //Console.Error.WriteLine(e); 40 | } 41 | 42 | public static void Error(string text) 43 | { 44 | // TODO 45 | //Console.Error.WriteLine(text); 46 | } 47 | 48 | public static void Error(string format, params object[] args) 49 | { 50 | // TODO 51 | //Console.Error.WriteLine(format, args); 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /src/FlutnetUI/Utilities/OperatingSystem.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | using System.IO; 20 | using System.Runtime.InteropServices; 21 | 22 | namespace FlutnetUI.Utilities 23 | { 24 | internal static class OperatingSystem 25 | { 26 | public static bool IsWindows() => 27 | RuntimeInformation.IsOSPlatform(OSPlatform.Windows); 28 | 29 | public static bool IsMacOS() => 30 | RuntimeInformation.IsOSPlatform(OSPlatform.OSX); 31 | 32 | public static bool IsLinux() => 33 | RuntimeInformation.IsOSPlatform(OSPlatform.Linux); 34 | 35 | public static string DefaultProjectsLocation() 36 | { 37 | return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Source", "Repos"); 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /src/FlutnetUI/ViewModels/MainWindowViewModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using ReactiveUI; 19 | 20 | namespace FlutnetUI.ViewModels 21 | { 22 | public class MainWindowViewModel : ReactiveObject, IScreen 23 | { 24 | public MainWindowViewModel() 25 | { 26 | Router.Navigate.Execute(new MainPageViewModel(this)); 27 | } 28 | 29 | #region IScreen implementation 30 | 31 | // The Router associated with this Screen. 32 | public RoutingState Router { get; } = new RoutingState(); 33 | 34 | #endregion 35 | } 36 | } -------------------------------------------------------------------------------- /src/FlutnetUI/Views/AboutView.xaml.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using Avalonia.Markup.Xaml; 19 | using Avalonia.ReactiveUI; 20 | using FlutnetUI.ViewModels; 21 | using ReactiveUI; 22 | 23 | namespace FlutnetUI.Views 24 | { 25 | public class AboutView : ReactiveUserControl 26 | { 27 | public AboutView() 28 | { 29 | InitializeComponent(); 30 | } 31 | 32 | private void InitializeComponent() 33 | { 34 | this.WhenActivated(disposables => { }); 35 | AvaloniaXamlLoader.Load(this); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /src/FlutnetUI/Views/ConfigureAppView.xaml.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using Avalonia.Markup.Xaml; 19 | using Avalonia.ReactiveUI; 20 | using FlutnetUI.ViewModels; 21 | using ReactiveUI; 22 | 23 | namespace FlutnetUI.Views 24 | { 25 | public class ConfigureAppView : ReactiveUserControl 26 | { 27 | public ConfigureAppView() 28 | { 29 | InitializeComponent(); 30 | } 31 | 32 | private void InitializeComponent() 33 | { 34 | this.WhenActivated(disposables => { }); 35 | AvaloniaXamlLoader.Load(this); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /src/FlutnetUI/Views/ConfigureProjectView.xaml.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | using System.Reactive; 20 | using System.Reactive.Disposables; 21 | using Avalonia.Controls; 22 | using Avalonia.Markup.Xaml; 23 | using Avalonia.ReactiveUI; 24 | using FlutnetUI.ViewModels; 25 | using ReactiveUI; 26 | 27 | namespace FlutnetUI.Views 28 | { 29 | public class ConfigureProjectView : ReactiveUserControl 30 | { 31 | public ConfigureProjectView() 32 | { 33 | InitializeComponent(); 34 | TreeView projectTree = this.Find("ProjectTree"); 35 | 36 | } 37 | 38 | private void InitializeComponent() 39 | { 40 | this.WhenActivated(disposables => 41 | { 42 | if (ViewModel == null) 43 | return; 44 | 45 | // Execute the command when the View is activated 46 | ViewModel.CheckFlutterVersion.Execute(Unit.Default).Subscribe().DisposeWith(disposables); 47 | }); 48 | AvaloniaXamlLoader.Load(this); 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /src/FlutnetUI/Views/CreateProjectProgressView.xaml.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using Avalonia.Markup.Xaml; 19 | using Avalonia.ReactiveUI; 20 | using FlutnetUI.ViewModels; 21 | using ReactiveUI; 22 | 23 | namespace FlutnetUI.Views 24 | { 25 | public class CreateProjectProgressView : ReactiveUserControl 26 | { 27 | public CreateProjectProgressView() 28 | { 29 | InitializeComponent(); 30 | } 31 | 32 | private void InitializeComponent() 33 | { 34 | this.WhenActivated(disposables => {}); 35 | AvaloniaXamlLoader.Load(this); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /src/FlutnetUI/Views/MainWindow.xaml: -------------------------------------------------------------------------------- 1 |  12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/FlutnetUI/Views/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using Avalonia; 19 | using Avalonia.Markup.Xaml; 20 | using Avalonia.ReactiveUI; 21 | using FlutnetUI.ViewModels; 22 | 23 | namespace FlutnetUI.Views 24 | { 25 | public class MainWindow : ReactiveWindow 26 | { 27 | public MainWindow() 28 | { 29 | InitializeComponent(); 30 | #if DEBUG 31 | this.AttachDevTools(); 32 | #endif 33 | } 34 | 35 | private void InitializeComponent() 36 | { 37 | AvaloniaXamlLoader.Load(this); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/FlutnetUI/Views/SetupAssistedProgressView.xaml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 13 | 16 | 17 | 18 | Please wait while the system is being set up... 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/FlutnetUI/Views/SetupAssistedProgressView.xaml.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using Avalonia.Markup.Xaml; 19 | using Avalonia.ReactiveUI; 20 | using FlutnetUI.ViewModels; 21 | using ReactiveUI; 22 | 23 | namespace FlutnetUI.Views 24 | { 25 | public class SetupAssistedProgressView : ReactiveUserControl 26 | { 27 | public SetupAssistedProgressView() 28 | { 29 | InitializeComponent(); 30 | } 31 | 32 | private void InitializeComponent() 33 | { 34 | this.WhenActivated(disposables => { }); 35 | AvaloniaXamlLoader.Load(this); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /src/FlutnetUI/Views/SetupAssistedView.xaml.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using Avalonia.Markup.Xaml; 19 | using Avalonia.ReactiveUI; 20 | using FlutnetUI.ViewModels; 21 | using ReactiveUI; 22 | 23 | namespace FlutnetUI.Views 24 | { 25 | public class SetupAssistedView : ReactiveUserControl 26 | { 27 | public SetupAssistedView() 28 | { 29 | InitializeComponent(); 30 | } 31 | 32 | private void InitializeComponent() 33 | { 34 | this.WhenActivated(disposables => { }); 35 | AvaloniaXamlLoader.Load(this); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /src/FlutnetUI/Views/SetupCheckFlutterErrorView.xaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | Flutter diagnostic reported the following errors: 24 | Errors returned by flutter doctor 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/FlutnetUI/Views/SetupCheckFlutterErrorView.xaml.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using Avalonia.Markup.Xaml; 19 | using Avalonia.ReactiveUI; 20 | using FlutnetUI.ViewModels; 21 | 22 | namespace FlutnetUI.Views 23 | { 24 | public class SetupCheckFlutterErrorView : ReactiveUserControl 25 | { 26 | public SetupCheckFlutterErrorView() 27 | { 28 | InitializeComponent(); 29 | } 30 | 31 | private void InitializeComponent() 32 | { 33 | AvaloniaXamlLoader.Load(this); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /src/FlutnetUI/Views/SetupCheckFlutterView.xaml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 13 | 16 | 17 | 18 | Checking if Flutter is installed and properly configured... 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/FlutnetUI/Views/SetupCheckFlutterView.xaml.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using Avalonia.Markup.Xaml; 19 | using Avalonia.ReactiveUI; 20 | using FlutnetUI.ViewModels; 21 | using ReactiveUI; 22 | 23 | namespace FlutnetUI.Views 24 | { 25 | public class SetupCheckFlutterView : ReactiveUserControl 26 | { 27 | public SetupCheckFlutterView() 28 | { 29 | InitializeComponent(); 30 | } 31 | 32 | private void InitializeComponent() 33 | { 34 | this.WhenActivated(disposables => { }); 35 | AvaloniaXamlLoader.Load(this); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /src/FlutnetUI/Views/SetupFinishView.xaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 14 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/FlutnetUI/Views/SetupFinishView.xaml.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using Avalonia.Markup.Xaml; 19 | using Avalonia.ReactiveUI; 20 | using FlutnetUI.ViewModels; 21 | 22 | namespace FlutnetUI.Views 23 | { 24 | public class SetupFinishView : ReactiveUserControl 25 | { 26 | public SetupFinishView() 27 | { 28 | InitializeComponent(); 29 | } 30 | 31 | private void InitializeComponent() 32 | { 33 | AvaloniaXamlLoader.Load(this); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /src/FlutnetUI/Views/SetupWelcomeView.xaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/FlutnetUI/Views/SetupWelcomeView.xaml.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using Avalonia.Markup.Xaml; 19 | using Avalonia.ReactiveUI; 20 | using FlutnetUI.ViewModels; 21 | using ReactiveUI; 22 | 23 | namespace FlutnetUI.Views 24 | { 25 | public class SetupWelcomeView : ReactiveUserControl 26 | { 27 | public SetupWelcomeView() 28 | { 29 | InitializeComponent(); 30 | } 31 | 32 | private void InitializeComponent() 33 | { 34 | this.WhenActivated(disposables => { }); 35 | AvaloniaXamlLoader.Load(this); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /src/FlutnetUI/nuget.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/HtmlRenderer.Core/Adapters/Entities/RDashStyle.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | namespace TheArtOfDev.HtmlRenderer.Adapters.Entities 19 | { 20 | /// 21 | /// Specifies the style of dashed lines drawn with a object. 22 | /// 23 | public enum RDashStyle 24 | { 25 | Solid, 26 | Dash, 27 | Dot, 28 | DashDot, 29 | DashDotDot, 30 | Custom, 31 | } 32 | } -------------------------------------------------------------------------------- /src/HtmlRenderer.Core/Adapters/Entities/RFontStyle.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | 20 | namespace TheArtOfDev.HtmlRenderer.Adapters.Entities 21 | { 22 | /// 23 | /// Specifies style information applied to text. 24 | /// 25 | [Flags] 26 | public enum RFontStyle 27 | { 28 | Regular = 0, 29 | Bold = 1, 30 | Italic = 2, 31 | Underline = 4, 32 | Strikeout = 8, 33 | } 34 | } -------------------------------------------------------------------------------- /src/HtmlRenderer.Core/Adapters/Entities/RMouseEvent.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using TheArtOfDev.HtmlRenderer.Core; 19 | 20 | namespace TheArtOfDev.HtmlRenderer.Adapters.Entities 21 | { 22 | /// 23 | /// Even class for handling keyboard events in . 24 | /// 25 | public sealed class RMouseEvent 26 | { 27 | /// 28 | /// Is the left mouse button participated in the event 29 | /// 30 | private readonly bool _leftButton; 31 | 32 | /// 33 | /// Init. 34 | /// 35 | public RMouseEvent(bool leftButton) 36 | { 37 | _leftButton = leftButton; 38 | } 39 | 40 | /// 41 | /// Is the left mouse button participated in the event 42 | /// 43 | public bool LeftButton 44 | { 45 | get { return _leftButton; } 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /src/HtmlRenderer.Core/Adapters/RBrush.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | 20 | namespace TheArtOfDev.HtmlRenderer.Adapters 21 | { 22 | /// 23 | /// Adapter for platform specific brush objects - used to fill graphics (rectangles, polygons and paths).
24 | /// The brush can be solid color, gradient or image. 25 | ///
26 | public abstract class RBrush : IDisposable 27 | { 28 | public abstract void Dispose(); 29 | } 30 | } -------------------------------------------------------------------------------- /src/HtmlRenderer.Core/Adapters/RFont.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | namespace TheArtOfDev.HtmlRenderer.Adapters 19 | { 20 | /// 21 | /// Adapter for platform specific font object - used to render text using specific font. 22 | /// 23 | public abstract class RFont 24 | { 25 | /// 26 | /// Gets the em-size of this Font measured in the units specified by the Unit property. 27 | /// 28 | public abstract double Size { get; } 29 | 30 | /// 31 | /// The line spacing, in pixels, of this font. 32 | /// 33 | public abstract double Height { get; } 34 | 35 | /// 36 | /// Get the vertical offset of the font underline location from the top of the font. 37 | /// 38 | public abstract double UnderlineOffset { get; } 39 | 40 | /// 41 | /// Get the left padding, in pixels, of the font. 42 | /// 43 | public abstract double LeftPadding { get; } 44 | 45 | public abstract double GetWhitespaceWidth(RGraphics graphics); 46 | } 47 | } -------------------------------------------------------------------------------- /src/HtmlRenderer.Core/Adapters/RFontFamily.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | namespace TheArtOfDev.HtmlRenderer.Adapters 19 | { 20 | /// 21 | /// Adapter for platform specific font family object - define the available font families to use.
22 | /// Required for custom fonts handling: fonts that are not installed on the system. 23 | ///
24 | public abstract class RFontFamily 25 | { 26 | /// 27 | /// Gets the name of this Font Family. 28 | /// 29 | public abstract string Name { get; } 30 | } 31 | } -------------------------------------------------------------------------------- /src/HtmlRenderer.Core/Adapters/RImage.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | 20 | namespace TheArtOfDev.HtmlRenderer.Adapters 21 | { 22 | /// 23 | /// Adapter for platform specific image object - used to render images. 24 | /// 25 | public abstract class RImage : IDisposable 26 | { 27 | /// 28 | /// Get the width, in pixels, of the image. 29 | /// 30 | public abstract double Width { get; } 31 | 32 | /// 33 | /// Get the height, in pixels, of the image. 34 | /// 35 | public abstract double Height { get; } 36 | 37 | public abstract void Dispose(); 38 | } 39 | } -------------------------------------------------------------------------------- /src/HtmlRenderer.Core/Adapters/RPen.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using TheArtOfDev.HtmlRenderer.Adapters.Entities; 19 | 20 | namespace TheArtOfDev.HtmlRenderer.Adapters 21 | { 22 | /// 23 | /// Adapter for platform specific pen objects - used to draw graphics (lines, rectangles and paths) 24 | /// 25 | public abstract class RPen 26 | { 27 | /// 28 | /// Gets or sets the width of this Pen, in units of the Graphics object used for drawing. 29 | /// 30 | public abstract double Width { get; set; } 31 | 32 | /// 33 | /// Gets or sets the style used for dashed lines drawn with this Pen. 34 | /// 35 | public abstract RDashStyle DashStyle { set; } 36 | } 37 | } -------------------------------------------------------------------------------- /src/HtmlRenderer.Core/Core/Dom/Border.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | namespace TheArtOfDev.HtmlRenderer.Core.Dom 19 | { 20 | /// 21 | /// Border types 22 | /// 23 | internal enum Border 24 | { 25 | Top, 26 | Right, 27 | Bottom, 28 | Left 29 | } 30 | } -------------------------------------------------------------------------------- /src/HtmlRenderer.Core/Core/Dom/CssUnit.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | namespace TheArtOfDev.HtmlRenderer.Core.Dom 19 | { 20 | /// 21 | /// Represents the possible units of the CSS lengths 22 | /// 23 | /// 24 | /// http://www.w3.org/TR/CSS21/syndata.html#length-units 25 | /// 26 | internal enum CssUnit 27 | { 28 | None, 29 | Ems, 30 | Pixels, 31 | Ex, 32 | Inches, 33 | Centimeters, 34 | Milimeters, 35 | Points, 36 | Picas 37 | } 38 | } -------------------------------------------------------------------------------- /src/HtmlRenderer.Core/Core/Dom/HoverBoxBlock.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using TheArtOfDev.HtmlRenderer.Core.Entities; 19 | 20 | namespace TheArtOfDev.HtmlRenderer.Core.Dom 21 | { 22 | /// 23 | /// CSS boxes that have ":hover" selector on them. 24 | /// 25 | internal sealed class HoverBoxBlock 26 | { 27 | /// 28 | /// the box that has :hover css on 29 | /// 30 | private readonly CssBox _cssBox; 31 | 32 | /// 33 | /// the :hover style block data 34 | /// 35 | private readonly CssBlock _cssBlock; 36 | 37 | /// 38 | /// Init. 39 | /// 40 | public HoverBoxBlock(CssBox cssBox, CssBlock cssBlock) 41 | { 42 | _cssBox = cssBox; 43 | _cssBlock = cssBlock; 44 | } 45 | 46 | /// 47 | /// the box that has :hover css on 48 | /// 49 | public CssBox CssBox 50 | { 51 | get { return _cssBox; } 52 | } 53 | 54 | /// 55 | /// the :hover style block data 56 | /// 57 | public CssBlock CssBlock 58 | { 59 | get { return _cssBlock; } 60 | } 61 | } 62 | } -------------------------------------------------------------------------------- /src/HtmlRenderer.Core/Core/Entities/HtmlGenerationStyle.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | namespace TheArtOfDev.HtmlRenderer.Core.Entities 19 | { 20 | /// 21 | /// Controls the way styles are generated when html is generated. 22 | /// 23 | public enum HtmlGenerationStyle 24 | { 25 | /// 26 | /// styles are not generated at all 27 | /// 28 | None = 0, 29 | 30 | /// 31 | /// style are inserted in style attribute for each html tag 32 | /// 33 | Inline = 1, 34 | 35 | /// 36 | /// style section is generated in the head of the html 37 | /// 38 | InHeader = 2 39 | } 40 | } -------------------------------------------------------------------------------- /src/HtmlRenderer.Core/Core/Entities/HtmlRefreshEventArgs.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | using System; 19 | 20 | namespace TheArtOfDev.HtmlRenderer.Core.Entities 21 | { 22 | /// 23 | /// Raised when html renderer requires refresh of the control hosting (invalidation and re-layout).
24 | /// It can happen if some async event has occurred that requires re-paint and re-layout of the html.
25 | /// Example: async download of image is complete. 26 | ///
27 | public sealed class HtmlRefreshEventArgs : EventArgs 28 | { 29 | /// 30 | /// is re-layout is required for the refresh 31 | /// 32 | private readonly bool _layout; 33 | 34 | /// 35 | /// Init. 36 | /// 37 | /// is re-layout is required for the refresh 38 | public HtmlRefreshEventArgs(bool layout) 39 | { 40 | _layout = layout; 41 | } 42 | 43 | /// 44 | /// is re-layout is required for the refresh 45 | /// 46 | public bool Layout 47 | { 48 | get { return _layout; } 49 | } 50 | 51 | public override string ToString() 52 | { 53 | return string.Format("Layout: {0}", _layout); 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /src/HtmlRenderer.Core/Core/Entities/HtmlRenderErrorType.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2021 Novagem Solutions S.r.l. 2 | // 3 | // This file is part of Flutnet. 4 | // 5 | // Flutnet is a free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // Flutnet is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY, without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Lesser General Public License 16 | // along with Flutnet. If not, see . 17 | 18 | namespace TheArtOfDev.HtmlRenderer.Core.Entities 19 | { 20 | /// 21 | /// Enum of possible error types that can be reported. 22 | /// 23 | public enum HtmlRenderErrorType 24 | { 25 | General = 0, 26 | CssParsing = 1, 27 | HtmlParsing = 2, 28 | Image = 3, 29 | Paint = 4, 30 | Layout = 5, 31 | KeyboardMouse = 6, 32 | Iframe = 7, 33 | ContextMenu = 8, 34 | } 35 | } -------------------------------------------------------------------------------- /src/HtmlRenderer.Core/Core/Utils/ImageError.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/src/HtmlRenderer.Core/Core/Utils/ImageError.png -------------------------------------------------------------------------------- /src/HtmlRenderer.Core/Core/Utils/ImageLoad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutnet/flutnet-sdk/7925d4f10b5271728d146eea77dcfc16beb1e8ff/src/HtmlRenderer.Core/Core/Utils/ImageLoad.png -------------------------------------------------------------------------------- /src/HtmlRenderer.Core/HtmlRenderer.Core.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net20;netstandard2.0 5 | TheArtOfDev.HtmlRenderer 6 | 1.5.1-beta2 7 | HTML Renderer Core 8 | Arthur Teplitzki 9 | 10 | HtmlRenderer 11 | Arthur Teplitzki 12 | https://htmlrenderer.codeplex.com/ 13 | https://htmlrenderer.codeplex.com/ 14 | html render renderer draw core 15 | See http://htmlrenderer.codeplex.com/releases.< 16 | HtmlRenderer.Core 17 | 18 | 19 | --------------------------------------------------------------------------------