Showing preview only (1,420K chars total). Download the full file or copy to clipboard to get everything.
Repository: adamped/xamarin.flutter
Branch: master
Commit: e8f297a20368
Files: 190
Total size: 1.3 MB
Directory structure:
gitextract_iyvtmmqi/
├── .gitattributes
├── .gitignore
├── AST/
│ ├── analyzer.dart
│ ├── comments.dart
│ ├── config.dart
│ ├── implementation/
│ │ ├── conditionals.dart
│ │ ├── exceptions.dart
│ │ ├── implementation.dart
│ │ ├── literals.dart
│ │ └── loops.dart
│ ├── naming.dart
│ ├── packageResolver.dart
│ ├── pubspec.yaml
│ ├── readme.md
│ ├── run.bat
│ ├── serialization.dart
│ ├── signature/
│ │ ├── classes.dart
│ │ ├── constructors.dart
│ │ ├── delegates.dart
│ │ ├── fields.dart
│ │ ├── frame.dart
│ │ ├── functions.dart
│ │ └── methods.dart
│ └── types.dart
├── CODE_OF_CONDUCT.md
├── Flutter.Sample.App/
│ ├── Flutter.Sample.App.csproj
│ └── MainPage.cs
├── Flutter.Sample.Droid/
│ ├── Assets/
│ │ └── AboutAssets.txt
│ ├── Flutter.Sample.Droid.csproj
│ ├── MainActivity.cs
│ ├── Properties/
│ │ ├── AndroidManifest.xml
│ │ └── AssemblyInfo.cs
│ └── Resources/
│ ├── layout/
│ │ └── activity_main.axml
│ ├── mipmap-anydpi-v26/
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ └── values/
│ ├── Strings.xml
│ ├── colors.xml
│ ├── ic_launcher_background.xml
│ └── styles.xml
├── Flutter.Sample.UWP/
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── Flutter.Sample.UWP.csproj
│ ├── Flutter.Sample.UWP_TemporaryKey.pfx
│ ├── MainPage.xaml
│ ├── MainPage.xaml.cs
│ ├── Package.appxmanifest
│ └── Properties/
│ ├── AssemblyInfo.cs
│ └── Default.rd.xml
├── Flutter.Shell.Droid/
│ ├── Flutter.Shell.Droid.csproj
│ ├── FlutterCanvas.cs
│ ├── Properties/
│ │ └── AssemblyInfo.cs
│ └── Resources/
│ ├── layout/
│ │ └── FlutterPage.axml
│ └── values/
│ └── Strings.xml
├── Flutter.Shell.UWP/
│ ├── Flutter.Shell.UWP.csproj
│ ├── FlutterCanvas.cs
│ ├── FlutterPage.xaml
│ ├── FlutterPage.xaml.cs
│ ├── Properties/
│ │ ├── AssemblyInfo.cs
│ │ └── Flutter.Shell.UWP.rd.xml
│ ├── Themes/
│ │ └── Generic.xaml
│ └── VisualStudioToolsManifest.xml
├── FlutterBinding/
│ ├── Engine/
│ │ ├── Compositing/
│ │ │ ├── NativeScene.cs
│ │ │ └── NativeSceneBuilder.cs
│ │ ├── Engine.cs
│ │ ├── Painting/
│ │ │ ├── Matrix.cs
│ │ │ ├── NativeCanvas.cs
│ │ │ ├── NativeCodec.cs
│ │ │ ├── NativeEngineLayer.cs
│ │ │ ├── NativePath.cs
│ │ │ ├── NativePathMetric.cs
│ │ │ ├── NativePicture.cs
│ │ │ └── NativePictureRecorder.cs
│ │ ├── Text/
│ │ │ ├── NativeParagraph.cs
│ │ │ ├── NativeParagraphBuilder.cs
│ │ │ └── NativeParagraphStyle.cs
│ │ └── Window/
│ │ └── NativeWindow.cs
│ ├── Flow/
│ │ ├── CompositorContext.cs
│ │ ├── EmbeddedViews.cs
│ │ ├── GlobalMembers.cs
│ │ ├── Helper.cs
│ │ ├── Layers/
│ │ │ ├── BackdropFilterLayer.cs
│ │ │ ├── ChildSceneLayer.cs
│ │ │ ├── ClipPathLayer.cs
│ │ │ ├── ClipRRectLayer.cs
│ │ │ ├── ClipRectLayer.cs
│ │ │ ├── ColorFilterLayer.cs
│ │ │ ├── ContainerLayer.cs
│ │ │ ├── LayerTree.cs
│ │ │ ├── OpacityLayer.cs
│ │ │ ├── PhysicalShapeLayer.cs
│ │ │ ├── PictureLayer.cs
│ │ │ ├── PlatformViewLayer.cs
│ │ │ ├── ShaderMaskLayer.cs
│ │ │ ├── TextureLayer.cs
│ │ │ └── TransformLayer.cs
│ │ ├── MatrixDecomposition.cs
│ │ ├── PaintUtils.cs
│ │ ├── RasterCache.cs
│ │ ├── RasterCacheKey.cs
│ │ ├── layers/
│ │ │ └── layer.cs
│ │ └── texture.cs
│ ├── FlutterBinding.csproj
│ ├── Mapping/
│ │ ├── Future.cs
│ │ ├── Helper.cs
│ │ └── Types.cs
│ ├── Minikin/
│ │ ├── Arrays.cs
│ │ ├── CmapCoverage.cs
│ │ ├── CmapCoverage.h.cs
│ │ ├── DefineConstants.cs
│ │ ├── Emoji.cs
│ │ ├── Emoji.h.cs
│ │ ├── FontCollection.cs
│ │ ├── FontCollection.h.cs
│ │ ├── FontFamily.cs
│ │ ├── FontFamily.h.cs
│ │ ├── FontLanguage.cs
│ │ ├── FontLanguageListCache.cs
│ │ ├── FontUtils.cs
│ │ ├── GlobalMembers.cs
│ │ ├── GraphemeBreak.cs
│ │ ├── GraphemeBreak.h.cs
│ │ ├── HbFontCache.cs
│ │ ├── Hyphenator.cs
│ │ ├── Layout.cs
│ │ ├── Layout.h.cs
│ │ ├── LayoutUtils.cs
│ │ ├── LineBreaker.cs
│ │ ├── LineBreaker.h.cs
│ │ ├── Measurement.cs
│ │ ├── Measurement.h.cs
│ │ ├── MinikinFont.cs
│ │ ├── MinikinFont.h.cs
│ │ ├── MinikinInternal.cs
│ │ ├── SparseBitSet.cs
│ │ ├── SparseBitSet.h.cs
│ │ ├── StringFunctions.cs
│ │ ├── WordBreaker.cs
│ │ ├── WordBreaker.h.cs
│ │ ├── minikin.Hyphenator.cs
│ │ ├── minikin.SparseBitSet.cs
│ │ └── minikin.android.cs
│ ├── Txt/
│ │ ├── DefineConstants.cs
│ │ ├── GlobalMembers.cs
│ │ ├── SkTextBlob.cs
│ │ ├── asset_font_manager.cs
│ │ ├── font_asset_provider.cs
│ │ ├── font_collection.cs
│ │ ├── font_skia.cs
│ │ ├── font_style.cs
│ │ ├── font_weight.cs
│ │ ├── paint_record.cs
│ │ ├── paragraph.cs
│ │ ├── paragraph_builder.cs
│ │ ├── paragraph_style.cs
│ │ ├── platform.cs
│ │ ├── platform_android.cs
│ │ ├── styled_runs.cs
│ │ ├── text_baseline.cs
│ │ ├── text_decoration.cs
│ │ ├── text_shadow.cs
│ │ ├── text_style.cs
│ │ └── typeface_font_asset_provider.cs
│ └── UI/
│ ├── Compositing.cs
│ ├── FlutterSurface.cs
│ ├── Geometry.cs
│ ├── Hooks.cs
│ ├── ICanvas.cs
│ ├── Lerp.cs
│ ├── NativeFieldWrapperClass2.cs
│ ├── Painting.cs
│ ├── Pointer.cs
│ ├── Semantics.cs
│ ├── Text.cs
│ └── Window.cs
├── FlutterBindingSample/
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── FlutterBindingSample.csproj
│ ├── FlutterBindingSample_TemporaryKey.pfx
│ ├── MainPage.xaml
│ ├── MainPage.xaml.cs
│ ├── Package.appxmanifest
│ └── Properties/
│ ├── AssemblyInfo.cs
│ └── Default.rd.xml
├── FlutterSDK/
│ ├── FlutterSDK.csproj
│ └── Mappings/
│ └── Global.cs
├── LICENSE
├── README.md
├── TRANSPILER_README.md
├── Xamarin.Flutter.sln
└── testbed/
└── test.dart
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
================================================
FILE: .gitignore
================================================
bin/
obj/
.vs
.vscode
**/*.Android/**/[Rr]esource.[Dd]esigner.cs
**/*.Droid/**/[Rr]esource.[Dd]esigner.cs
**/Android/**/[Rr]esource.[Dd]esigner.cs
**/Droid/**/[Rr]esource.[Dd]esigner.cs
model.json
src/
flutter/*
!flutter/download-flutter.ps1
*.htm
*.lock
*.packages
flutter/**
*.csproj.user
================================================
FILE: AST/analyzer.dart
================================================
import 'package:analyzer/analyzer.dart';
import 'package:analyzer/file_system/physical_file_system.dart';
import 'dart:io';
import 'dart:async';
import 'package:analyzer/dart/ast/ast.dart';
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/src/dart/sdk/sdk.dart';
import 'package:analyzer/src/file_system/file_system.dart';
import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/sdk.dart' show DartSdk;
import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer/src/generated/source_io.dart';
import 'package:analyzer/src/source/source_resource.dart';
import 'config.dart';
import 'signature/frame.dart';
import 'naming.dart';
import 'packageResolver.dart';
main() async {
// 1) Get all directories and all files
var outputPath = Directory('..\\FlutterSDK\\src');
print("Directory: " + Config.sourcePath);
var contents = await dirContents(Directory(Config.sourcePath));
PhysicalResourceProvider resourceProvider = PhysicalResourceProvider.INSTANCE;
if (!Config.IsDartSdkPathAvailable) {
print("Missing $Config.dartSdkEnvVariableName environment variable");
exit(1);
}
DartSdk sdk = new FolderBasedDartSdk(
resourceProvider, resourceProvider.getFolder(Config.DartSdkPath));
var flutterSdk = Config.sourcePath
.substring(0, Config.sourcePath.lastIndexOf('\\'));
var resolvers = [
new DartUriResolver(sdk),
Config.isTestbed ? null : new DartUriResolver(embeddedResolver(resourceProvider, flutterSdk)),
new ResourceUriResolver(resourceProvider),
Config.isTestbed ? null :packageResolver(
resourceProvider, 'flutter', resourceProvider.getFolder(flutterSdk)),
];
AnalysisContext context = AnalysisEngine.instance.createAnalysisContext()
..sourceFactory = new SourceFactory(resolvers);
// Clear old output directory
if (await outputPath.exists()) await outputPath.delete(recursive: true);
await outputPath.create();
// Iterate trough all files
// Each file is transpiled and written as one file with its own namespace
// the file contains all classes, interfaces, enums and delegates of the source file
for (var item in contents) {
FileSystemEntityType type = await FileSystemEntity.type(item.path);
if (type == FileSystemEntityType.file && item.path.endsWith('dart')) {
print(item.path);
Source source = new FileSource(resourceProvider.getFile(item.path));
ChangeSet changeSet = new ChangeSet()..addedSource(source);
context.applyChanges(changeSet);
LibraryElement libElement = context.computeLibraryElement(source);
CompilationUnit resolvedUnit =
context.resolveCompilationUnit(source, libElement);
var element = resolvedUnit.declaredElement;
var namespaceParts =
Naming.namespacePartsFromIdentifier(element.library.identifier);
var namespaceDartName =
Naming.namespaceFromIdentifier(element.library.identifier);
var code = Frame.printNamespace(element, namespaceDartName);
var file = new File(
"${outputPath.absolute.path}\\${namespaceParts.join("\\")}.cs");
if (!await file.exists()) await file.create(recursive: true);
await file.writeAsString(code);
print("Wrote ${file.path} to file.");
}
}
}
Future<List<FileSystemEntity>> dirContents(Directory directory) async {
Completer<List<FileSystemEntity>> completer =
new Completer<List<FileSystemEntity>>();
var files = <FileSystemEntity>[];
print(directory);
var exists = await directory.exists();
if (exists) {
var stream = directory
.list(recursive: true, followLinks: false)
.listen((FileSystemEntity entity) {
files.add(entity);
});
stream.onDone(() => completer.complete(files));
}
else
{
completer.completeError("Directory doesn't exist");
}
return completer.future;
}
================================================
FILE: AST/comments.dart
================================================
import 'package:analyzer/dart/element/element.dart';
class Comments {
static void appendComment(StringBuffer buffer, Element element) {
return;
var dartComment = element.documentationComment;
if (dartComment == null || dartComment == "") return;
buffer.writeln("/// <Summary>");
buffer.writeln(dartComment);
buffer.writeln("/// </Summary>");
}
}
================================================
FILE: AST/config.dart
================================================
import 'dart:io';
class Config {
static const dartSdkEnvVariableName = "DART_SDK";
static bool includeMethodImplementations = false;
static bool includeConstructorImplementations = false;
static bool includeFieldImplementations = false;
static bool isTestbed = false;
static String sourcePath = Config.isTestbed ? _testbedFlutterSourcePath : _flutterSourcePath;
// Path to the flutter src directory
static String _flutterSourcePath = Directory('..\\flutter\\lib\\src')
.absolute
.path
.replaceAll('\\AST\\..', '');
// This is just a quick test bed, if you want to try out specific
// Dart related functionality without running it on the whole transpiler
static String _testbedFlutterSourcePath = Directory('..\\testbed')
.absolute
.path
.replaceAll('\\AST\\..', '');
static bool IsDartSdkPathAvailable = Platform.environment.containsKey(dartSdkEnvVariableName);
// Absolute path to the dart-sdk directory
static String DartSdkPath = Platform.environment[dartSdkEnvVariableName];
// Root namespace the transpiled namespaces will start with
static String rootNamespace = "FlutterSDK";
// Imports that are replaced with .net system or mapping libraries
static List<String> ignoredImports = new List<String>()
..add("package:typed_data/typed_buffers.dart")
..add("package:collection/collection.dart")
..add("dart:ui")
..add("dart:async")
..add("dart:math")
..add("dart:collection")
..add("dart:developer")
..add("dart:io")
..add("dart:core")
..add("dart:typed_data")
..add("dart:_http")
..add("package:meta/meta.dart")
..add("dart:convert")
..add("dart:isolate")
..add("package:vector_math/vector_math_64.dart")
..add("package:typed_data/typed_buffers.dart;");
// Imports that will get added to every class
static List<String> defaultImports = new List<String>()
..add("System")
..add("FlutterSDK")
..add("FlutterSDK.Widgets.Framework")
..add("System.Net.Http")
..add("FlutterBinding.UI")
..add("System.Collections.Generic")
..add("System.Linq")
..add("System.Diagnostics")
..add("SkiaSharp")
..add("FlutterBinding.Engine.Painting")
..add("static FlutterSDK.Global")
..add("FlutterBinding.Mapping");
}
================================================
FILE: AST/implementation/conditionals.dart
================================================
import 'package:analyzer/dart/ast/ast.dart';
import 'implementation.dart';
class Conditionals {
static String processConditionalExpression(ConditionalExpression expression) {
var csharp = "";
for (var entity in expression.childEntities) {
csharp += Implementation.processEntity(entity);
}
return csharp;
}
static String processSwitchStatement(SwitchStatement statement) {
var csharp = "";
for (var entity in statement.childEntities) {
csharp += Implementation.processEntity(entity);
}
return csharp;
}
static String processSwitchCase(SwitchCase switchCase) {
var csharp = "";
for (var entity in switchCase.childEntities) {
csharp += Implementation.processEntity(entity);
}
return csharp;
}
static String processSwitchDefault(SwitchDefault switchDefault) {
var csharp = "";
for (var entity in switchDefault.childEntities) {
csharp += Implementation.processEntity(entity);
}
return csharp;
}
static String processContinueStatement(ContinueStatement statement) {
var csharp = "";
for (var entity in statement.childEntities) {
csharp += Implementation.processEntity(entity);
}
return csharp;
}
static String processIfStatement(IfStatement statement) {
var csharp = "";
for (var entity in statement.childEntities) {
if (entity is Block) Implementation.startCastMapping = true;
csharp += Implementation.processEntity(entity);
// Clear cast mapping after BlockImpl - TODO: Could backfire if embedded if statements
if (entity is Block) {
Implementation.castMapping.clear();
Implementation.startCastMapping = false;
}
}
return csharp;
}
}
================================================
FILE: AST/implementation/exceptions.dart
================================================
import 'package:analyzer/dart/ast/ast.dart';
import 'implementation.dart';
class Exceptions {
static String processTryStatement(TryStatement statement) {
var csharp = "";
for (var entity in statement.childEntities) {
csharp += Implementation.processEntity(entity);
}
return csharp;
}
static String processThrowExpression(ThrowExpression expression) {
var csharp = "";
for (var entity in expression.childEntities) {
csharp += Implementation.processEntity(entity);
}
return csharp;
}
static String processCatchClause(CatchClause clause) {
var csharp = "";
for (var entity in clause.childEntities) {
csharp += Implementation.processEntity(entity);
}
return csharp;
}
}
================================================
FILE: AST/implementation/implementation.dart
================================================
import 'package:analyzer/analyzer.dart';
import 'package:analyzer/dart/ast/ast.dart';
import 'package:analyzer/dart/ast/syntactic_entity.dart';
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/src/dart/element/element.dart';
import 'package:front_end/src/scanner/token.dart';
import '../naming.dart';
import '../config.dart';
import 'loops.dart';
import 'exceptions.dart';
import 'literals.dart';
import 'conditionals.dart';
/// Provides methods to transpile the body of elements
class Implementation {
static String MethodBody(FunctionBody body) {
if (Config.includeMethodImplementations) {
if (body is EmptyFunctionBody) {
var parent = body.parent;
if (parent is MethodDeclaration &&
parent.returnType != null &&
parent.returnType.toString() != 'void')
return '{ \nreturn default(${processEntity(parent.returnType)}); \n}';
else
return '{ \n}'; // No code;
} else if (body is BlockFunctionBody) {
return processBlockFunction(body);
} else if (body is ExpressionFunctionBody) {
return processExpressionFunction(body);
} else {
// Nothing comes here, so I have implemented all for now.
// But this is here in case something in the future appears
// and needs to be accounted for.
throw new AssertionError('Function block is not defined');
}
} else
return '{ throw new NotImplementedException(); }';
}
static String processExpressionFunction(ExpressionFunctionBody body) {
var rawBody = "";
for (var child in body.childEntities) {
rawBody += processEntity(child);
}
return rawBody + '\n';
}
static String processBlockFunction(BlockFunctionBody body) {
var rawBody = "\n";
for (var child in body.childEntities) {
if (child is Block) {
for (var entity in child.childEntities) {
rawBody += processEntity(entity) + "\n";
}
} else if (child is KeywordToken) {
rawBody += child.toString() + "\n";
} else if (child is SimpleToken) {
rawBody += child.toString() + "\n";
} else
rawBody += "\n// Block Function type not dealt with $child";
}
return rawBody + "\n";
}
static String processCastMap(SyntacticEntity entity) {
var name = entity.toString();
if (castMapping.containsKey(name)) {
startCastMapping = false;
// Casting to correct type, as it is inside an IsStatement.
var result =
'((${Naming.upperCamelCase(castMapping[name])})${processEntity(entity)})';
startCastMapping = true;
return result;
}
return '';
}
static String processEntity(SyntacticEntity entity) {
if (startCastMapping) {
var castMap = processCastMap(entity);
if (castMap.isNotEmpty) return castMap;
}
if (entity is BeginToken) {
return entity.lexeme;
} else if (entity is KeywordToken) {
return processToken(entity);
} else if (entity is SimpleToken) {
return entity.lexeme;
} else if (entity is SimpleIdentifier) {
return processSimpleIdentifier(entity);
} else if (entity is ThisExpression) {
return processThisExpression(entity);
} else if (entity is NullLiteral) {
return Literals.processNullLiteral(entity);
} else if (entity is DoubleLiteral) {
return Literals.processDoubleLiteral(entity);
} else if (entity is BooleanLiteral) {
return Literals.processBooleanLiteral(entity);
} else if (entity is IntegerLiteral) {
return Literals.processIntegerLiteral(entity);
} else if (entity is SimpleStringLiteral) {
return Literals.processSimpleStringLiteral(entity);
} else if (entity is ArgumentList) {
return processArgumentList(entity);
} else if (entity is MapLiteral) {
return Literals.processMapLiteral(entity);
} else if (entity is PrefixedIdentifier) {
return processPrefixedIdentifier(entity);
} else if (entity is DeclaredIdentifier) {
return processDeclaredIdentifier(entity);
} else if (entity is PrefixExpression) {
return processPrefixExpression(entity);
} else if (entity is AdjacentStrings) {
return processAdjacentString(entity);
} else if (entity is Label) {
return processLabel(entity);
} else if (entity is MethodInvocation) {
return processMethodInvocation(entity);
} else if (entity is FunctionExpression) {
return processFunctionExpression(entity);
} else if (entity is ParenthesizedExpression) {
return processParenthesizedExpression(entity);
} else if (entity is IndexExpression) {
return processIndexExpression(entity);
} else if (entity is BinaryExpression) {
return processBinaryExpression(entity);
} else if (entity is AwaitExpression) {
return processAwaitExpression(entity);
} else if (entity is ConditionalExpression) {
return Conditionals.processConditionalExpression(entity);
} else if (entity is StringInterpolation) {
return processStringInterpolation(entity);
} else if (entity is InterpolationExpression) {
return processInterpolationExpression(entity);
} else if (entity is InstanceCreationExpression) {
return processInstanceCreationExpression(entity);
} else if (entity is ConstructorName) {
return processConstructorName(entity);
} else if (entity is PropertyAccess) {
return processPropertyAccess(entity);
} else if (entity is AssignmentExpression) {
return processAssignmentExpression(entity);
} else if (entity is AssertStatement) {
return ""; // I just ignore assert statements at the moment
} else if (entity is ReturnStatement) {
return processReturnStatement(entity);
} else if (entity is VariableDeclaration) {
return processVariableDeclaration(entity);
} else if (entity is VariableDeclarationStatement) {
return processVariableDeclarationStatement(entity);
} else if (entity is VariableDeclarationList) {
return processVariableDeclarationList(entity);
} else if (entity is SwitchStatement) {
return Conditionals.processSwitchStatement(entity);
} else if (entity is SwitchCase) {
return Conditionals.processSwitchCase(entity);
} else if (entity is BreakStatement) {
return entity.toString();
} else if (entity is SwitchDefault) {
return Conditionals.processSwitchDefault(entity);
} else if (entity is ContinueStatement) {
return Conditionals.processContinueStatement(entity);
} else if (entity is IfStatement) {
return Conditionals.processIfStatement(entity);
} else if (entity is IsExpression) {
return processIsExpression(entity);
} else if (entity is CascadeExpression) {
return processCascadeExpression(entity);
} else if (entity is ExpressionStatement) {
return processExpressionStatement(entity);
} else if (entity is SuperExpression) {
return processSuperExpression(entity);
} else if (entity is ThrowExpression) {
return Exceptions.processThrowExpression(entity);
} else if (entity is WhileStatement) {
return Loops.processWhileStatement(entity);
} else if (entity is ForEachStatement) {
return Loops.processForEachStatement(entity);
} else if (entity is ForStatement) {
return Loops.processForStatement(entity);
} else if (entity is ListLiteral) {
return Literals.processListLiteral(entity);
} else if (entity is FormalParameterList) {
return processFormalParameterList(entity);
} else if (entity is TypeArgumentList) {
return processTypeArgumentList(entity);
} else if (entity is SimpleFormalParameter) {
return processSimpleFormalParameter(entity);
} else if (entity is FunctionDeclarationStatement) {
return processFunctionDeclarationStatement(entity);
} else if (entity is TryStatement) {
return Exceptions.processTryStatement(entity);
} else if (entity is CatchClause) {
return Exceptions.processCatchClause(entity);
} else if (entity is DoStatement) {
return Loops.processDoStatement(entity);
} else if (entity is YieldStatement) {
return processYieldStatement(entity);
} else if (entity is PostfixExpression) {
return processPostfixExpression(entity);
} else if (entity is AsExpression) {
return processAsExpression(entity);
} else if (entity is NamedExpression) {
return processNamedExpression(entity);
} else if (entity is TypeName) {
return processTypeName(entity);
} else if (entity is Block) {
return processBlock(entity);
} else if (entity is BlockFunctionBody) {
return processBlockFunctionBody(entity);
} else if (entity is ExpressionFunctionBody) {
return processExpressionFunctionBody(entity);
} else if (entity is FunctionExpressionInvocation) {
return processFunctionExpressionInvocation(entity);
} else if (entity is FunctionDeclaration) {
return processFunctionDeclaration(entity);
} else if (entity is MapLiteralEntry) {
return Literals.processMapLiteralEntry(entity);
} else if (entity is Annotation) {
return ''; // Just ignoring these, because properties in the element determine these annotations, I don't need to parse them.
} else {
throw new AssertionError('Unknown entity');
}
}
static String processPropertyAccess(PropertyAccess access) {
var csharp = "";
for (var entity in access.childEntities) {
csharp += processEntity(entity);
}
return csharp;
}
static String processFunctionDeclaration(FunctionDeclaration declaration) {
var csharp = "";
for (var entity in declaration.childEntities) {
csharp += processEntity(entity) + ' ';
}
return csharp;
}
static String processFunctionExpressionInvocation(
FunctionExpressionInvocation invocation) {
var csharp = "";
for (var entity in invocation.childEntities) {
csharp += processEntity(entity);
}
return csharp;
}
static String processExpressionFunctionBody(ExpressionFunctionBody body) {
var csharp = "";
for (var entity in body.childEntities) {
csharp += processEntity(entity);
}
return csharp;
}
static String processTypeArgumentList(TypeArgumentList list) {
if (list.childEntities.length < 2)
throw new AssertionError(
'There should always be brackets around the arguments.');
var csharp = list.childEntities
.where((f) => f is TypeName)
.map((f) => processEntity(f))
.join(',');
var entities = list.childEntities.toList();
var first = entities[0];
var end = entities.last;
return '$first$csharp$end';
}
static String processBlockFunctionBody(BlockFunctionBody body) {
var csharp = "";
for (var entity in body.childEntities) {
csharp += processEntity(entity);
}
return csharp;
}
static String processSimpleFormalParameter(SimpleFormalParameter parameter) {
return parameter.childEntities.map((f) => processEntity(f)).join(' ');
}
static String processFormalParameterList(FormalParameterList list) {
var csharp = "";
var hasParameter = false;
for (var entity in list.childEntities) {
if (entity.toString() == ')' && hasParameter == true)
csharp = csharp.substring(0, csharp.length - 2);
csharp += processEntity(entity);
if (entity is SimpleFormalParameter) {
csharp += ', ';
hasParameter = true;
}
}
return csharp;
}
static String processAdjacentString(AdjacentStrings string) {
var csharp = "";
for (var entity in string.childEntities) {
csharp += processEntity(entity) + ' + ';
}
if (csharp.length > 3) csharp = csharp.substring(0, csharp.length - 3);
return csharp;
}
static String processDeclaredIdentifier(DeclaredIdentifier identifier) {
var csharp = "";
for (var entity in identifier.childEntities) {
csharp += processEntity(entity) + ' ';
}
return csharp;
}
static String processLabel(Label label) {
var csharp = "";
for (var entity in label.childEntities) {
if (entity is SimpleIdentifier)
csharp += Naming.escapeFixedWords(processEntity(entity));
else
csharp += processEntity(entity);
}
return csharp;
}
static String processPrefixExpression(PrefixExpression expression) {
var csharp = "";
for (var entity in expression.childEntities) {
csharp += processEntity(entity);
}
return csharp;
}
static String processFunctionExpression(FunctionExpression expression) {
var csharp = "";
for (var entity in expression.childEntities) {
csharp += processEntity(entity);
// TODO: need to find a way when it's only a function expression not an actual method
if (entity is FormalParameterList) csharp += ' => ';
}
return csharp;
}
static String processIndexExpression(IndexExpression expression) {
var csharp = "";
for (var entity in expression.childEntities) {
csharp += processEntity(entity);
}
return csharp;
}
static Map<String, String> castMapping = new Map<String, String>();
static bool startCastMapping = false;
static String processIsExpression(IsExpression expression) {
var count = expression.childEntities.length;
if (count < 3 || count > 4)
throw new AssertionError(
'Expecting IsExpression to always have 3 or 4 entities');
castMapping.putIfAbsent(expression.childEntities.elementAt(0).toString(),
() => expression.childEntities.elementAt(count - 1).toString());
var csharp = processEntity(expression.childEntities.elementAt(0));
csharp += ' is ';
csharp += processEntity(expression.childEntities.elementAt(count - 1));
if (count == 4 && expression.childEntities.elementAt(2).toString() == '!')
csharp = '!($csharp)';
else if (count == 4)
throw new AssertionError('Unknown 4 length IsExpression');
return csharp;
}
static String processCascadeExpression(CascadeExpression expression) {
var csharp = "";
for (var entity in expression.childEntities) {
// If SimpleIdentifier, then it isn't creating anything or a new assignment
// its just a variable, and we can ignore it, because the cascades will
// put it in front anyway.
if (!(entity is SimpleIdentifier)) csharp += processEntity(entity);
}
return csharp;
}
static String processFunctionDeclarationStatement(
FunctionDeclarationStatement statement) {
var csharp = "";
for (var entity in statement.childEntities) {
csharp += processEntity(entity);
}
return csharp;
}
static String processYieldStatement(YieldStatement statement) {
var csharp = "";
for (var entity in statement.childEntities) {
csharp += processEntity(entity);
}
return csharp;
}
static String processPostfixExpression(PostfixExpression expression) {
var csharp = "";
for (var entity in expression.childEntities) {
csharp += processEntity(entity);
}
return csharp;
}
static String processAsExpression(AsExpression expression) {
var csharp = "";
for (var entity in expression.childEntities) {
csharp += processEntity(entity);
}
return csharp;
}
static String processNamedExpression(NamedExpression expression) {
var csharp = "";
for (var entity in expression.childEntities) {
if (entity is SimpleIdentifier)
csharp += Naming.escapeFixedWords(processEntity(entity));
else
csharp += processEntity(entity);
}
return csharp;
}
static String processBlock(Block block) {
var csharp = "";
for (var item in block.childEntities) {
csharp += processEntity(item) + "\n";
}
return csharp;
}
static String processToken(KeywordToken keyword) {
var newKeyword = keyword.keyword.lexeme;
if (newKeyword == "super") return "base";
if (newKeyword == "final" || newKeyword == 'const')
return ""; // Rarely an equivalence of final or const inside a method, because flutter has compiled consts, whereas C# does not.
if (newKeyword == 'is') newKeyword = ' ' + newKeyword;
if (newKeyword == 'as') newKeyword = ' ' + newKeyword;
if (newKeyword == 'in') newKeyword = ' ' + newKeyword;
return newKeyword + " ";
}
static String processVariableDeclaration(VariableDeclaration declaration) {
var csharp = "";
for (var entity in declaration.childEntities) {
csharp += processEntity(entity);
}
return csharp;
}
static String processSuperExpression(SuperExpression expression) {
var csharp = "";
for (var entity in expression.childEntities) {
csharp += processEntity(entity);
}
return csharp;
}
static String processAwaitExpression(AwaitExpression expression) {
var csharp = "";
for (var entity in expression.childEntities) {
csharp += processEntity(entity);
}
return csharp;
}
static String processThisExpression(ThisExpression expression) {
var csharp = "";
for (var entity in expression.childEntities) {
csharp += processEntity(entity);
}
return csharp;
}
static String processArgumentList(ArgumentList list) {
var csharp = "";
for (var entity in list.childEntities) {
if (csharp.endsWith(', ') && entity.toString() == ')')
csharp = csharp.substring(0, csharp.length - 2);
csharp += processEntity(entity);
if (entity.toString() != '(' && entity.toString() != ')') csharp += ', ';
}
return csharp;
}
static String processParenthesizedExpression(
ParenthesizedExpression expression) {
var csharp = "";
for (var entity in expression.childEntities) {
csharp += processEntity(entity);
}
return csharp;
}
static String processInstanceCreationExpression(
InstanceCreationExpression expression) {
var csharp = "";
var isNamedConstructor = expression.staticElement.name != "";
for (var entity in expression.childEntities) {
csharp += processEntity(entity);
}
// TODO: No such thing as named constructors in C#
// Will need to look at Static Method calls without the new.
if (!csharp.startsWith('new ') && !isNamedConstructor)
csharp = 'new ' + csharp;
return csharp;
}
static String processConstructorName(ConstructorName name) {
var csharp = "";
for (var entity in name.childEntities) {
csharp += processEntity(entity);
}
return csharp;
}
static String processBinaryExpression(BinaryExpression expression) {
var csharp = "";
if (expression.childEntities.length == 3 &&
expression.childEntities.elementAt(1).toString() == '??') {
var first = expression.childEntities.elementAt(0);
var second = expression.childEntities.elementAt(2);
if (first is SimpleIdentifier && first.staticType != null &&
first.staticType.displayName ==
'double') //TODO: Should cover all non-nullable value types
return '$first == default(${first.staticType.displayName}) ? $second : $first';
}
for (var entity in expression.childEntities) {
csharp += processEntity(entity);
}
return csharp;
}
static String processReturnStatement(ReturnStatement statement) {
var csharp = "";
for (var entity in statement.childEntities) {
csharp += processEntity(entity);
}
return csharp;
}
static String processMethodInvocation(MethodInvocation invocation) {
var csharp = "";
if (invocation.isCascaded) {
var parentEntity = invocation.parent;
while (parentEntity != null &&
(parentEntity is! VariableDeclaration &&
parentEntity is! AssignmentExpression
&& parentEntity is! CascadeExpression))
parentEntity = parentEntity.parent;
if (parentEntity == null)
parentEntity.toString();
String processedEntity =
processEntity(parentEntity.childEntities.toList()[0]);
csharp += ';\n' + processedEntity + '.';
for (var entity in invocation.childEntities) {
if (entity.toString() != '..') csharp += processEntity(entity);
}
} else {
for (var entity in invocation.childEntities) {
csharp += processEntity(entity);
}
// Change all Split's to return a List instead of array
if (invocation.methodName.name == 'split') csharp += '.ToList()';
}
return csharp;
}
static String processSimpleIdentifier(SimpleIdentifier identifier) {
var csharp = '';
// Check if this is directly inside the namespace and was mapped inside the namespace default class
if(identifier.staticElement != null && identifier.staticElement.enclosingElement is CompilationUnitElement && !(identifier.staticElement is EnumElementImpl)) {
// add the default class to the call
var defaultClass = Naming.DefaultClassName(identifier.staticElement.enclosingElement);
csharp += defaultClass + ".";
}
// If the identifier is actually a type.
if (identifier.parent is TypeName)
return Naming.getFormattedTypeName(identifier.name);
// Map reserved keywords
if (identifier.name == 'event') return '@event';
if (identifier.name == 'byte') return '@byte';
if (identifier.staticElement is ParameterElement) // e.g. child
{
csharp += identifier.name;
} else if (identifier.staticElement
is MethodElement) // e.g animate // Can't seem to get MethodMember
{
csharp += processMethodElement(identifier.staticElement);
} else if (identifier.staticElement is EnumElementImpl) {
var name = identifier.name;
csharp += name;
} else if (identifier.staticElement is FunctionElement) {
csharp += processFunctionElement(identifier.staticElement);
} else if (identifier.staticElement is LocalVariableElement) {
csharp += identifier.name;
} else if (identifier.staticElement is PropertyAccessorElement) {
csharp += processPropertyAccessorElement(identifier.staticElement);
} else {
var name = identifier.name;
if (name == 'runtimeType')
csharp += 'GetType()';
else
csharp += Naming.upperCamelCase(name);
}
return csharp;
}
static String processPrefixedIdentifier(PrefixedIdentifier identifier) {
var csharp = "";
for (var entity in identifier.childEntities) {
csharp += processEntity(entity);
}
return csharp;
}
static String processMethodElement(MethodElement element) {
var name = element.displayName;
if (name == "toUpperCase") return "ToUpper";
if (name == "toLowerCase") return "ToLower";
if (name == "trimRight") return "TrimEnd";
if (name == "trimLeft") return "TrimStart";
return Naming.upperCamelCase(name);
}
static String processFunctionElement(FunctionElement element) {
return Naming.upperCamelCase(element.displayName);
}
static String processPropertyAccessorElement(
PropertyAccessorElement element) {
var name = element.displayName;
if (name == "inMicroseconds") return "InMicroseconds()";
if (name == "isFinite") return "IsFinite()";
if (name == 'runtimeType') return 'GetType()';
if (name == 'single') return 'Single()';
if (name == 'last') return 'Last()';
if (name == 'isEmpty') return 'IsEmpty()';
if (name == 'length' && element.enclosingElement.displayName == 'List')
return 'Count';
if (name == 'length' && element.enclosingElement.displayName == 'List')
return 'Count';
return Naming.upperCamelCase(name);
}
static String processStringInterpolation(StringInterpolation interpolation) {
var csharp = '\$"';
for (var entity in interpolation.childEntities) {
if (entity is StringLiteral)
csharp += entity.stringValue;
else if (entity is InterpolationString)
csharp += entity.toString();
else if (entity is InterpolationExpression) {
var stringValue = '{';
for (var item in entity.childEntities) {
if (!(item is BeginToken) &&
item.toString() != '}' &&
item.toString() != '\$') stringValue += processEntity(item);
}
csharp += stringValue + '}';
} else
csharp += '{' + processEntity(entity) + '}';
}
return csharp + '"';
}
static String processInterpolationExpression(
InterpolationExpression expression) {
var csharp = "";
for (var entity in expression.childEntities) {
csharp += processEntity(entity);
}
return csharp;
}
static String processExpressionStatement(ExpressionStatement statement) {
var csharp = "";
for (var entity in statement.childEntities) {
csharp += processEntity(entity);
}
return csharp;
}
static String processAssignmentExpression(AssignmentExpression expression) {
var csharp = "";
var list = expression.childEntities.toList();
if (list.length != 3)
throw new AssertionError('Should always have 3 parts');
var nullCheckAssignment = false;
var token = list[1] as SimpleToken;
if (token != null && token.lexeme == '??=') nullCheckAssignment = true;
if (nullCheckAssignment) {
var variable = processEntity(list[0]);
csharp += variable + ' = (' + variable + ' == null ';
csharp += '? ' + processEntity(list[2]) + ' ';
csharp += ': ' + variable + ' )';
} else {
for (var entity in expression.childEntities) {
csharp += processEntity(entity);
}
}
return csharp;
}
static String processVariableDeclarationStatement(
VariableDeclarationStatement statement) {
var csharp = "";
for (var entity in statement.childEntities) {
csharp += processEntity(entity);
}
return csharp;
}
static String processVariableDeclarationList(VariableDeclarationList list) {
var csharp = "";
var type = "";
for (var entity in list.childEntities) {
if (entity is TypeName)
type = processEntity(entity);
else {
csharp += ' ' + processEntity(entity);
}
}
if (csharp.contains('='))
return "$type $csharp";
else
return "$type $csharp = default($type)";
}
static String processTypeName(TypeName name) {
var csharp = '';
if (name.toString().toLowerCase().contains('valuechanged'))
name = name;
for (var entity in name.childEntities) csharp += processEntity(entity);
return csharp;
}
static String fieldBody(PropertyAccessorElement element) {
if (Config.includeFieldImplementations && element != null) {
// TODO: this is all messed up anyway
var body = element.computeNode();
var bodyLines = Naming.tokenToText(body.beginToken, false).split("\n");
var rawBody = bodyLines.map((l) => "${l}\n").join();
// Transpile logic comes here
var transpiledBody = "throw new NotImplementedException();";
return transpiledBody;
} else
return 'throw new NotImplementedException();';
}
static String functionBody(FunctionElement element) {
// TODO
return "throw new NotImplementedException();";
}
}
================================================
FILE: AST/implementation/literals.dart
================================================
import 'package:analyzer/dart/ast/ast.dart';
import 'implementation.dart';
class Literals {
static String processNullLiteral(NullLiteral literal) {
var csharp = "";
for (var entity in literal.childEntities) {
csharp += Implementation.processEntity(entity);
}
return csharp;
}
static String processDoubleLiteral(DoubleLiteral literal) {
var csharp = "";
for (var entity in literal.childEntities) {
csharp += Implementation.processEntity(entity);
}
return csharp;
}
static String processBooleanLiteral(BooleanLiteral literal) {
var csharp = "";
for (var entity in literal.childEntities) {
csharp += Implementation.processEntity(entity);
}
return csharp;
}
static String processIntegerLiteral(IntegerLiteral literal) {
var csharp = "";
for (var entity in literal.childEntities) {
csharp += Implementation.processEntity(entity);
}
return csharp;
}
static String processMapLiteral(MapLiteral literal) {
var csharp = "new Dictionary";
for (var entity in literal.childEntities) {
csharp += Implementation.processEntity(entity);
}
return csharp;
}
static String processMapLiteralEntry(MapLiteralEntry entry) {
var csharp = "";
for (var entity in entry.childEntities) {
if (entity.toString() == ':')
csharp += ', ';
else
csharp += Implementation.processEntity(entity);
}
return '{' + csharp + '}';
}
static String processSimpleStringLiteral(SimpleStringLiteral literal) {
var stringValue = literal.toString();
stringValue = stringValue.substring(1, stringValue.length - 1);
if (stringValue.length == 1 ||
(stringValue.startsWith('\\') && stringValue.length == 2))
return "'$stringValue'";
else
return '"$stringValue"';
}
static String processListLiteral(ListLiteral literal) {
var csharp = 'new List';
var args = false;
for (var entity in literal.childEntities) {
if (entity.toString() == '[')
csharp += '{';
else if (entity.toString() == ']') {
var length = args == true ? 2 : 0;
csharp = csharp.substring(0, csharp.length - length) + '}';
}
else if (entity is TypeArgumentList)
{
csharp += Implementation.processEntity(entity) + '()';
} else {
csharp += Implementation.processEntity(entity) + ', ';
args = true;
}
}
return csharp;
}
}
================================================
FILE: AST/implementation/loops.dart
================================================
import 'package:analyzer/dart/ast/ast.dart';
import 'implementation.dart';
class Loops {
static String processForStatement(ForStatement statement) {
var csharp = "";
for (var entity in statement.childEntities) {
csharp += Implementation.processEntity(entity);
}
return csharp;
}
static String processWhileStatement(WhileStatement statement) {
var csharp = "";
for (var entity in statement.childEntities) {
csharp += Implementation.processEntity(entity);
}
return csharp;
}
static String processDoStatement(DoStatement statement) {
var csharp = "";
for (var entity in statement.childEntities) {
csharp += Implementation.processEntity(entity);
}
return csharp;
}
static String processForEachStatement(ForEachStatement statement) {
var csharp = "";
for (var entity in statement.childEntities) {
if (entity.toString() == 'for')
csharp += 'foreach';
else
csharp += Implementation.processEntity(entity);
}
return csharp;
}
}
================================================
FILE: AST/naming.dart
================================================
import 'package:analyzer/analyzer.dart';
import 'package:analyzer/dart/ast/token.dart';
import 'package:analyzer/dart/element/type.dart';
import 'package:analyzer/dart/element/element.dart';
import 'config.dart';
import 'types.dart';
class Naming {
static List<String> namespacePartsFromIdentifier(String identifier) {
var namespacePath = identifier
.replaceAll(
"file:///" + Config.sourcePath.replaceAll("\\", "/") + "/", "")
.replaceAll(".dart", "")
.replaceAll("package:flutter/src/", "");
var splittedPath = namespacePath
.split('/')
.map<String>((part) => getFormattedName(part, NameStyle.UpperCamelCase))
.toList();
return splittedPath;
}
static String namespaceFromIdentifier(String identifier) {
var parts = namespacePartsFromIdentifier(identifier);
return Config.rootNamespace + "." + parts.join(".");
}
static String nameWithTypeArguments(
ParameterizedType type, bool isInterface) {
var name = type.name;
name = getFormattedName(name, NameStyle.UpperCamelCase);
if (isInterface) name = "I" + name;
// TODO: Need to sort this out, so it does it for all, not just this particular one.
if (name == 'IObstructingPreferredSizeWidget')
{
var namespace = namespaceFromIdentifier(type.element.library.identifier);
name = namespace + "." + name;
}
var typeArguments = new List<String>();
for (var argument in type.typeArguments) {
typeArguments.add(Types.getDartTypeName(argument));
}
if (typeArguments.length > 0) {
name += "<${typeArguments.join(",")}>";
}
return name;
}
static String interfaceTypeName(InterfaceType type) {
var name = type.name;
name = getFormattedName(name, NameStyle.UpperCamelCase);
var typeArguments = new List<String>();
for (var argument in type.typeArguments) {
typeArguments.add(Types.getDartTypeName(argument));
}
if (typeArguments.length > 0) {
name += "<${typeArguments.join(",")}>";
}
return name;
}
static String nameWithTypeParameters(
TypeParameterizedElement element, bool isInterface) {
var name = element.name;
name = getFormattedName(name, NameStyle.UpperCamelCase);
if (isInterface) name = "I" + name;
var typeArguments = new List<String>();
for (var argument in element.typeParameters) {
typeArguments.add(getTypeParameterName(argument));
}
if (typeArguments.length > 0) {
name += "<${typeArguments.join(",")}>";
}
return name;
}
static String parameterTypeWithTypeParameters(
ParameterElement element, bool isInterface) {
var name = element.type.name;
name = getFormattedName(name, NameStyle.UpperCamelCase);
if (isInterface) name = "I" + name;
var typeArguments = new List<String>();
for (var argument in element.typeParameters) {
typeArguments.add(getTypeParameterName(argument));
}
if (typeArguments.length > 0) {
name += "<${typeArguments.join(",")}>";
}
return name;
}
static String getReturnType(FunctionTypedElement element) {
var returnType = element.returnType;
var returnName = returnType.displayName;
var test = element.computeNode();
if (returnType is InterfaceType) {
returnName = interfaceTypeName(returnType);
} else if (test is MethodDeclaration) {
if (test.returnType is TypeName) {
var t = test.returnType as TypeName;
returnName = t.name.name;
}
} else if (test is FunctionDeclaration) {
if (test.returnType is TypeName) {
var t = test.returnType as TypeName;
returnName = t.name.name;
}
}
var formattedName = getFormattedTypeName(returnName);
if (!(returnType is TypeParameterType) && returnType.element != null) {
var library = returnType.element.library;
if (library != null &&
!Config.ignoredImports.contains(library.identifier) &&
!["bool", "double", "object", "void", "string", "T"]
.contains(formattedName)) {
var namespace = namespaceFromIdentifier(library.identifier);
formattedName = namespace + "." + formattedName;
}
}
return formattedName;
}
static String className(InterfaceType type) {
var baseClass = nameWithTypeArguments(type, false);
if (type.element.library != null &&
type.element.library.identifier != null &&
!Config.ignoredImports.contains(type.element.library.identifier)) {
var namespace = namespaceFromIdentifier(type.element.library.identifier);
baseClass = "${namespace}.${baseClass}";
}
return baseClass;
}
static String tokenToText(Token token, bool backwards) {
if (token.isEof == true ||
token.keyword != null ||
(token.isKeywordOrIdentifier == false && backwards)) return "";
var text = token.lexeme;
if (backwards) {
if (token.previous != null)
text += " " + tokenToText(token.previous, backwards);
} else {
if (token.next != null) text += " " + tokenToText(token.next, backwards);
}
return text;
}
static String getTypeParameterName(TypeParameterElement element) {
String typeName = "object";
if (element.type is InterfaceType) {
typeName = interfaceTypeName(element.type as InterfaceType);
}
typeName = element.type.displayName;
return getFormattedTypeName(typeName);
}
// TODO: I think this should be rebuilt and accept DartType
// Then work from there.
static String getFormattedTypeName(String typeName) {
var formattedName = typeName;
if (formattedName.toLowerCase().startsWith("ui."))
formattedName = formattedName.substring(3, formattedName.length - 3);
if (formattedName == "Set" || formattedName.startsWith('Set<'))
formattedName = 'HashSet' + formattedName.substring(3);
if (formattedName.startsWith("Map"))
formattedName = formattedName.replaceAll("Map", "Dictionary");
switch (formattedName.toLowerCase()) {
case "float8list":
case "float16list":
case "float32list":
return "List<double>";
case "float64list":
return "List<float>";
case "int32list":
return "List<uint>";
case "httpclientresponse":
return "HttpResponseMessage";
case "shader":
return "SKShader";
// case "image": // This doesn't work properly because there is an Image class in the FlutterSDK. But we do need something here for inside method bodies.
// return "SKImage";
case "enginelayer":
return "NativeEngineLayer";
case "frameinfo":
return "SKCodecFrameInfo";
case "codec":
return "SKCodec";
case "void":
case "bool":
case "int":
case "object":
case "double":
case "string":
return formattedName.toLowerCase();
case "dynamic": //TODO: we need to fix this. Dynamic is normally hiding a proper type. (AP - Might have fixed, will have to check later)
return "object";
case "duration":
return "TimeSpan";
case "future<void>":
case "future<null>":
return "Future";
// case "iterable":
// return "List";
case "clip":
return "FlutterBinding.UI.Clip";
case "paragraph":
return "FlutterBinding.UI.Paragraph";
default:
formattedName =
getFormattedName(formattedName, NameStyle.UpperCamelCase);
if (formattedName == "")
return "object";
else
return formattedName;
}
}
static String getFormattedName(String originalName, NameStyle style) {
var formattedName = originalName;
if (formattedName == null || formattedName.length == 0) {
return "";
} else if (formattedName == "-") {
formattedName = "subtractOperator";
} else {
// We can't do this for names with namespaces already, since it doesn't quite work.
if (!formattedName.contains('.')) {
var reAddUnderscore = formattedName.startsWith("_");
formattedName = formattedName.replaceAll("_", "").replaceAll("-", "");
if (reAddUnderscore) {
formattedName = "_" + formattedName;
}
}
}
if (style != NameStyle.LeadingUnderscoreLowerCamelCase) {
formattedName = escapeFixedWords(formattedName);
}
// rename operators
if (formattedName == "==") formattedName = "equals";
if (formattedName == "~/") formattedName = "divideIntegerResultOperator";
if (formattedName == "*") formattedName = "multiplyOperator";
if (formattedName == "/") formattedName = "divideOperator";
if (formattedName == "%") formattedName = "moduloOperator";
if (formattedName == "+") formattedName = "addOperator";
if (formattedName == "[]") formattedName = "indexOfOperator";
if (formattedName == "[]=") formattedName = "insertAtOperator";
switch (style) {
case NameStyle.LowerCamelCase:
formattedName = lowerCamelCase(formattedName);
break;
case NameStyle.UpperCamelCase:
formattedName = upperCamelCase(formattedName);
break;
case NameStyle.LeadingUnderscoreLowerCamelCase:
if (!formattedName.startsWith("_"))
formattedName = "_" + lowerCamelCase(formattedName);
break;
}
return formattedName;
}
static String lowerCamelCase(String name) {
if (name.length == 1) return name;
var underscore = name.startsWith('_');
if (underscore) name = name.substring(1);
var newName = name[0].toLowerCase() + name.replaceRange(0, 1, "");
if (underscore) newName = '_' + newName;
return newName;
}
static String upperCamelCase(String name) {
if (name.length <= 1) return name;
var underscore = name.startsWith('_');
if (underscore) name = name.substring(1);
var newName = name[0].toUpperCase() + name.replaceRange(0, 1, "");
if (underscore) newName = '_' + newName;
return newName;
}
static String escapeFixedWords(String word) {
var lowerName = word.toLowerCase();
if ([
"event",
"object",
"delegate",
"byte",
"fixed",
"checked",
"base",
"decimal",
"byte"
].any((x) => lowerName == x))
return "@" + word;
else
return word;
}
static String DefaultClassName(CompilationUnitElement element) {
var name = element.library.identifier
.replaceAll(".dart", "")
.replaceAll(".g", "")
.split("/")
.last +
"DefaultClass";
return getFormattedName(name, NameStyle.UpperCamelCase);
}
static String getTopLevelVariableName(TopLevelVariableElement element){
var name = element.name;
name = name.replaceAll("\$", "");
return name;
}
}
enum NameStyle {
LowerCamelCase,
UpperCamelCase,
LeadingUnderscoreLowerCamelCase
}
enum NameType { Name, Type }
enum VariableType { Field, Parameter }
================================================
FILE: AST/packageResolver.dart
================================================
import 'package:analyzer/file_system/file_system.dart' as file_system;
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer/source/embedder.dart';
import 'package:analyzer/source/package_map_resolver.dart';
import 'package:yaml/yaml.dart';
import 'package:package_config/packages.dart' show Packages;
import 'package:package_config/packages_file.dart' as pkgfile show parse;
import 'package:package_config/src/packages_impl.dart' show MapPackages;
import 'dart:io' as io;
import 'package:analyzer/src/context/builder.dart';
import 'package:analyzer/src/source/package_map_resolver.dart';
import 'package:analyzer/src/util/uri.dart';
PackageMapUriResolver packageResolver(
ResourceProvider provider, String packageName, Folder folder) {
Map<String, List<Folder>> packageMap = new Map<String, List<Folder>>();
packageMap.putIfAbsent(packageName, () => [folder]);
var resolver = new PackageMapUriResolver(provider, packageMap);
return resolver;
}
EmbedderSdk embeddedResolver(ResourceProvider provider, String projectFolder) {
// Find package info.
_PackageInfo packageInfo = _findPackages(provider, projectFolder);
// Process embedders.
Map<file_system.Folder, YamlMap> embedderMap =
new EmbedderYamlLocator(packageInfo.packageMap).embedderYamls;
var embedder = new EmbedderSdk(embedderMap);
return embedder;
}
_PackageInfo _findPackages(ResourceProvider provider, String projectFolder) {
Packages packages;
Map<String, List<Folder>> packageMap;
String packageConfigPath = '$projectFolder\\..\\.packages';
Uri fileUri = new Uri.file(packageConfigPath);
try {
io.File configFile = new io.File.fromUri(fileUri).absolute;
List<int> bytes = configFile.readAsBytesSync();
Map<String, Uri> map = pkgfile.parse(bytes, configFile.uri);
packages = new MapPackages(map);
packageMap = _getPackageMap(packages, provider);
} catch (e) {
throw new AssertionError(
'Unable to read package config data from $packageConfigPath: $e');
}
return new _PackageInfo(packages, packageMap);
}
Map<String, List<file_system.Folder>> _getPackageMap(
Packages packages, ResourceProvider provider) {
if (packages == null) {
return null;
}
Map<String, List<file_system.Folder>> folderMap =
new Map<String, List<file_system.Folder>>();
var pathContext = provider.pathContext;
packages.asMap().forEach((String packagePath, Uri uri) {
String path = fileUriToNormalizedPath(pathContext, uri);
folderMap[packagePath] = [provider.getFolder(path)];
});
return folderMap;
}
class _PackageInfo {
Packages packages;
Map<String, List<Folder>> packageMap;
_PackageInfo(this.packages, this.packageMap);
}
================================================
FILE: AST/pubspec.yaml
================================================
name: analyzer_export
dependencies:
analyzer: ^0.33.3
================================================
FILE: AST/readme.md
================================================
# Dart to C# transpiler
TODO Intra
## dev prerequisites
TODO what is needed to build this
-> Config path must be okay
## Procedure
TODO Writ the steps involved
## Signatures
TODO Details about the signature creation
## Naming
TODO Details about the renaming logic
## Body
TODO Details about the body transpiling
================================================
FILE: AST/run.bat
================================================
dart analyzer.dart
pause
================================================
FILE: AST/serialization.dart
================================================
// MIT License
// Copyright (c) 2016 Tobe O
// https://github.com/thosakwe/json_god
// Modified 2018 Adam Pedley
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
import 'dart:mirrors';
import 'dart:convert';
import 'dart:collection';
const Symbol hashCodeSymbol = #hashCode;
const Symbol runtimeTypeSymbol = #runtimeType;
typedef Serializer(value, {bool primitiveOnly});
List<Symbol> _findGetters(ClassMirror classMirror) {
List<Symbol> result = [];
classMirror.instanceMembers
.forEach((Symbol symbol, MethodMirror methodMirror) {
if (methodMirror.isGetter &&
!methodMirror.isPrivate &&
symbol != hashCodeSymbol &&
symbol != runtimeTypeSymbol) {
result.add(symbol);
}
});
return result;
}
serialize(value, Serializer serializer, {bool primitiveOnly = false}) {
Map result = {};
InstanceMirror instanceMirror = reflect(value);
ClassMirror classMirror = instanceMirror.type;
for (Symbol symbol in _findGetters(classMirror)) {
String name = MirrorSystem.getName(symbol);
var field = instanceMirror.getField(symbol);
var valueForSymbol = field.reflectee;
try {
result[name] = serializer(valueForSymbol, primitiveOnly: primitiveOnly);
} catch (e) {
print('$name caused error ${e.toString}');
}
}
return result;
}
bool _isPrimitive(value) {
return value is num || value is bool || value is String || value == null;
}
/// Serializes any arbitrary Dart datum to JSON. Supports schema validation.
String serializeModel(value) {
var serialized = serializeObject(value);
return json.encode(serialized);
}
/// Transforms any Dart datum into a value acceptable to json.encode.
serializeObject(value, {bool primitiveOnly = false}) {
if (_isPrimitive(value)) {
return value;
} else if (value is DateTime) {
return value.toIso8601String();
} else if (value is Iterable) {
return value.map(serializeObject).toList();
} else if (value is LinkedHashMap) {
return serializeMap(value);
} else if (value is Map) {
return serializeMap(value);
} else if (!primitiveOnly) {
return serializeNonPrimitiveObject(value);
} else {
return null; // Last resort
}
}
serializeNonPrimitiveObject(value) {
return serializeObject(serialize(value, serializeObject));
}
/// Recursively transforms a Map and its children into JSON-serializable data.
Map serializeMap(Map value) {
Map outputMap = {};
value.forEach((key, value) {
if (key is String) outputMap[key] = serializeObject(value);
});
return outputMap;
}
================================================
FILE: AST/signature/classes.dart
================================================
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/dart/element/type.dart';
import '../comments.dart';
import '../naming.dart';
import 'constructors.dart';
import 'fields.dart';
import 'methods.dart';
class Classes {
static String printClass(ClassElement element) {
var implementWithInterface = element.isMixin || element.isAbstract;
var name = Naming.nameWithTypeParameters(element, false);
// Workaround for classes that are not correctly picked up as interfaces
if( ["PageMetrics","FixedExtentMetrics","GestureArenaEntry"].contains(name))
implementWithInterface = true;
var code = new StringBuffer();
code.writeln("");
Comments.appendComment(code, element);
code.write("public ");
if (element.isAbstract == true && !implementWithInterface)
code.write("abstract ");
if (element.hasSealed == true) code.write("sealed ");
code.write("class ${name}");
var generics = '';
if (name.contains('<'))
generics = name.substring(name.indexOf('<'), name.lastIndexOf('>') + 1);
// Add base class, interfaces, mixin interfaces
var hasBaseClass =
element.supertype != null && element.supertype.name != "Object";
var inheritions = new List<String>();
if (hasBaseClass) {
inheritions.add(Naming.className(element.supertype));
}
// Add interfaces
List<InterfaceType> interfacesToImplement = new List<InterfaceType>();
for (var interface in element.interfaces) {
inheritions.add(Naming.nameWithTypeArguments(interface, true));
if (interface.element.isValidMixin == false)
interfacesToImplement.add(interface);
}
// Add mixin interfaces
for (var mxin in element.mixins) {
inheritions.add(Naming.nameWithTypeArguments(mxin, true));
}
if (inheritions.length > 0) code.write(" : " + inheritions.join(","));
code.writeln("\n{");
code.writeln("#region constructors");
// Add constructors
for (var constructor in element.constructors) {
Constructors.printConstructor(code, constructor, generics);
}
code.writeln("#endregion\n");
// Add fields and methods
printFieldsAndMethods(code, element, implementWithInterface);
//Add Implemented Fields and Methods
for (var interface in interfacesToImplement)
code.write(interfaceFieldAndMethods(interface, element));
code.writeln("}");
return code.toString();
}
// There are some interfaces that are not valid Mixin's but are used as Mixin's?
// Maybe I am missing something?? If I am, this should be removed.
static String interfaceFieldAndMethods(InterfaceType interface, ClassElement element)
{
var code = new StringBuffer();
var instanceName = interface.displayName;
var fieldsToImplement = interface.element.fields.where((x) => !x.isPrivate &&
element.fields.where((y) => y.displayName == x.displayName).length == 0 );
var methodsToImplement = interface.methods.where((x) => !x.isPrivate && element.methods.where((y) => y.displayName == x.displayName).length == 0 );
var anyToImplement = methodsToImplement.length > 0
|| fieldsToImplement.length > 0;
if (!anyToImplement)
return '';
code.writeln('$instanceName _${instanceName}Instance = new $instanceName();');
for (var method in methodsToImplement)
{
var methodName = Methods.getMethodName(method);
var signature = Methods.methodSignature(method, null, false, '', null, '', '');
var parameterCalls = Methods.printParameterNames(method);
code.writeln('public $signature => _${instanceName}Instance.$methodName($parameterCalls);');
}
for (var field in fieldsToImplement)
{
var typeAndName = Fields.printTypeAndName(field);
var fieldName = Fields.getFieldName(field);
code.writeln('public $typeAndName => _${instanceName}Instance.$fieldName;');
}
return code.toString();
}
static void printFieldsAndMethods(StringBuffer code, ClassElement element,
bool implementWithInterface) {
code.writeln("#region fields");
// Add fields that are not already handled as implementation overrides
for (var field
in element.fields) {
code.writeln(Fields.printField(field));
}
code.writeln("#endregion\n");
code.writeln("#region methods");
// Add methods that are not already handled as implementation overrides
for (var method in element.methods) {
code.writeln(Methods.printMethod(method,
Methods.overridesParentBaseMethod(method, element)));
}
code.writeln("#endregion");
}
static String printMixin(ClassElement element)
{
var name = Naming.nameWithTypeParameters(element, true);
var code = new StringBuffer();
code.writeln("");
var rawName = name.substring(1); // Name without `I` at front
var generics = '';
if (rawName.contains('<'))
{
generics = rawName.substring(rawName.indexOf('<'));
rawName = rawName.substring(0, rawName.indexOf('<'));
}
// Start Mixin Interface
code.write("public interface $name");
// Inherits
var mixinInheritance = element.mixins
.where((x) { return x.displayName != 'Object'; })
.map((f) { return Naming.nameWithTypeParameters(f.element, true); })
.join(',');
if (mixinInheritance.isNotEmpty)
code.write(': $mixinInheritance');
code.writeln('{}\n');
// End Mixin Interface
// Start Instance class
var interfaces = element.interfaces
.where((x) { return x.displayName != 'Object' && x is InterfaceType; })
.map((f) { return Naming.nameWithTypeParameters(f.element, true); })
.join(',');
code.write('public class ${rawName}$generics');
if (mixinInheritance.isNotEmpty)
{
code.write(': $mixinInheritance');
if (interfaces.isNotEmpty)
code.write(',$interfaces');
}
else if (interfaces.isNotEmpty)
code.write(':$interfaces');
code.writeln('{');
// Fields and Methods
// Add fields
for (var field
in element.fields) {
code.writeln(Fields.printField(field));
}
// Add methods
for (var method in element.methods) {
code.writeln(Methods.printMethod(method,
Methods.overridesParentBaseMethod(method, element)));
}
// Implement interface based fields and methods (e.g. Dart using an `implements`)
for (var interface in element.interfaces
.where((x) { return x.displayName != 'Object' && x is InterfaceType; }))
{
for (var field in interface.element.fields.where((x) => element.fields.where((y) => y.displayName == x.displayName).length == 0))
code.writeln(Fields.printField(field));
for (var method in interface.element.methods.where((x) => element.methods.where((y) => y.displayName == x.displayName).length == 0))
code.writeln(Methods.printMethod(method, false));
}
code.writeln('}'); // End Instance Class
// Mixin static extensions class
code.writeln('public static class ${rawName}Mixin {');
// Instance holding for mixins
if (generics.isEmpty) // No Generics
code.writeln('static System.Runtime.CompilerServices.ConditionalWeakTable<$name, $rawName> _table = new System.Runtime.CompilerServices.ConditionalWeakTable<$name, $rawName>();');
else // With generics we can't have an unbounded generic as type definition, so we revert to object's and cast later.
code.writeln('static System.Runtime.CompilerServices.ConditionalWeakTable<object, object> _table = new System.Runtime.CompilerServices.ConditionalWeakTable<object, object>();');
// Get Or Create Value
code.writeln('static $rawName$generics GetOrCreate$generics($name instance)');
code.writeln('{');
code.writeln('if (!_table.TryGetValue(instance, out var value))');
code.writeln('{');
code.writeln('value = new $rawName$generics();');
code.writeln('_table.Add(instance, value);');
code.writeln('}');
code.writeln('return ($rawName$generics)value;');
code.writeln('}');
// Extension Methods
// Add Fields
for (var field
in element.fields.where((x) { return x.isPublic; })) {
var typeAndName = Fields.printTypeAndName(field);
var fieldName = Fields.getFieldName(field);
code.writeln('public static ${typeAndName}Property$generics(this $name instance) => GetOrCreate(instance).$fieldName;');
}
// Add Methods
for (var method
in element.methods.where((x) { return x.isPublic; })) {
var methodName = Methods.getMethodName(method);
var signature = Methods.methodSignature(method, null, false, '', null, 'this $name instance', generics);
var parameterCalls = Methods.printParameterNames(method);
code.writeln('public static ${signature} => GetOrCreate(instance).$methodName($parameterCalls);');
}
code.writeln('}'); // End Mixin Class
return code.toString();
}
static String printInterface(ClassElement element) {
var name = Naming.nameWithTypeParameters(element, true);
var code = new StringBuffer();
code.writeln("");
Comments.appendComment(code, element);
if (element.hasProtected == true || element.isPrivate == true)
code.write("internal ");
if (element.isPublic == true) code.write("public ");
code.write("interface ${name}{\n");
for (var method in element.methods
.where((method) => method.isPublic || method.hasProtected)) {
var baseMethod = Methods.getBaseMethodInClass(method);
code.writeln(
Methods.methodSignature(baseMethod, method, false) + ";");
}
for (var field in element.fields
.where((field) => field.isPublic || field.hasProtected)) {
var baseField = Fields.getBaseFieldInClass(field);
code.writeln(Fields.getFieldSignature(baseField));
}
code.writeln("}");
return code.toString();
}
}
================================================
FILE: AST/signature/constructors.dart
================================================
import 'package:analyzer/analyzer.dart';
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/src/dart/element/element.dart';
import 'package:analyzer/dart/ast/ast.dart';
import '../implementation/implementation.dart';
import '../naming.dart';
import 'methods.dart';
import '../config.dart';
import 'package:front_end/src/scanner/token.dart';
class Constructors {
static void printConstructor(
StringBuffer code, ConstructorElementImpl constructor, String generics) {
if (constructor.enclosingElement is ClassElement) {
var isFactory = false;
var className = constructor.enclosingElement.name;
var constructorName = constructor.name;
var callsBaseCtor = constructor.redirectedConstructor != null || (constructor.constantInitializers != null && constructor.constantInitializers.length > 0);
var parameters = Methods.printParameter(constructor, null, null);
// normal constructors do not have any special key chars
if (constructorName == '')
code.writeln('public ${className}($parameters)');
// internal classes start with an underscore in dart
else if (constructorName == '_')
code.writeln('internal ${className}($parameters)');
else // I'm named, hence we are turing into static methods that return an instance
{
var accessibility = constructorName.startsWith('_') ? 'internal' : 'public';
isFactory = true;
code.writeln(
'$accessibility static ${className}$generics ${Naming.upperCamelCase(constructorName)}($parameters)');
}
// Base class call
if (callsBaseCtor && !isFactory) {
code.writeln(': base(${getBaseParameters(constructor)})');
}
var instanceName = isFactory ? "instance" : "this";
// Fill out Constructor body
var node = constructor.computeNode();
if (node != null) {
var body = '{\n';
if (isFactory) {
// Insert initialization if this is a factory method
body += 'var instance =';
if (callsBaseCtor) {
var parameters = getBaseParameters(constructor);
//TODO Get the correct constructor name in case this class does not call its own constructor!
body += 'new ${className}$generics(${parameters});';
}
else
body += 'new ${className}$generics();';
}
// Add auto assignments if any
var autoAssignment = Methods.printAutoParameters(constructor, className,
instanceName: instanceName);
if (autoAssignment.isNotEmpty) body += autoAssignment;
// add logic and closing curly brace
if (Config.includeConstructorImplementations)
body = Implementation.MethodBody(node.body).substring(2);
else
body += 'throw new NotImplementedException(); }';
// Normal constructor body
code.writeln(body);
} else
code.writeln('{ }');
} else
throw new AssertionError(
'A constructor is not inside a ClassElement, that should not happen.');
}
static String getBaseParameters(ConstructorElement constructor) {
// Get parameters
var parameters = "";
// TODO: I don't think we auto initialize anything when there are other constantIntializers other than a SuperConstructorInvocation
// Need to add the other code into the method body.
if (constructor is ConstructorElementImpl && constructor.constantInitializers != null &&
constructor.constantInitializers.where((x) => x is SuperConstructorInvocation).length > 0) {
// :)
var constantInitializer = constructor.constantInitializers.where((x) => x is SuperConstructorInvocation).first;
var argumentList = constantInitializer.childEntities
.where((x) => x is ArgumentList);
if (argumentList != null && argumentList.length > 0) {
ArgumentList list = argumentList.firstWhere((x) => x is ArgumentList);
int count = 0;
parameters = list.childEntities
.where((argument) =>
argument is! BeginToken && argument is! SimpleToken)
.map((argument) {
var parameter = Naming.escapeFixedWords(Implementation.processEntity(argument)).trim();
if (parameter == 'null'
&& constructor.redirectedConstructor != null
&& constructor.redirectedConstructor.parameters != null
&& constructor.redirectedConstructor.parameters[count].type.displayName == 'T')
{
// Can't pass null to generic type in C# (you can in Dart).
parameter = 'default(T)';
}
count += 1;
return parameter;
})
.join(",");
}
}
return parameters;
}
}
================================================
FILE: AST/signature/delegates.dart
================================================
import 'package:analyzer/dart/element/element.dart';
import '../naming.dart';
import 'methods.dart';
class Delegates {
static String printDelegate(FunctionTypeAliasElement element) {
var returnType = Naming.getReturnType(element);
var methodName = Naming.nameWithTypeParameters(element, false);
var parameter = Methods.printParameter(element, element, null);
return "public delegate ${returnType} ${methodName}(${parameter});";
}
}
================================================
FILE: AST/signature/fields.dart
================================================
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/src/dart/element/element.dart';
import 'package:analyzer/dart/element/type.dart';
import 'package:analyzer/src/dart/element/type.dart';
import 'package:analyzer/src/dart/element/member.dart';
import '../implementation/implementation.dart';
import '../naming.dart';
import '../types.dart';
class Fields {
static bool containsGenericPart(DartType type) {
var element = type.element;
if (element is TypeParameterElement) return true;
if (type is InterfaceType) {
var hasTypedTypeArguments =
type.typeArguments.any((argument) => argument is TypeParameterType);
if (hasTypedTypeArguments) {
return true;
}
}
return false;
}
static FieldElement getBaseFieldInClass(FieldElement element) {
if (element.enclosingElement == null ||
element.enclosingElement.allSupertypes.length == 0) return element;
FieldElement fieldInSupertype;
for (var supertype in (element.enclosingElement.allSupertypes
..addAll(element.enclosingElement.superclassConstraints))
.where((st) => st is ClassElement)
.cast<ClassElement>()
.where((st) => st.fields.length > 0)) {
fieldInSupertype = supertype.fields.firstWhere(
(field) => field.displayName == element.displayName,
orElse: () => null);
if (fieldInSupertype != null) {
// Found method this method extends from
break;
}
}
if (fieldInSupertype != null) {
return getBaseFieldInClass(fieldInSupertype);
} else if (element is FieldMember) {
return element.baseElement;
} else
return element;
}
static String printField(FieldElement element) {
var baseField = getBaseFieldInClass(element);
var code = new StringBuffer();
if (element.hasProtected == true) code.write("protected ");
if (element.isPublic == true) code.write("public ");
if (element.isPrivate == true) code.write("internal ");
if (element.hasOverride == true) code.write("new "); // Until we figure it out properly
if (element.hasOverride == false) code.write("virtual ");
// type + name
if (containsGenericPart(element.type)) {
code.write(printTypeAndName(element));
} else {
code.write(printTypeAndName(baseField));
}
var hasGetter = element.getter != null;
var hasSetter = element.setter != null;
if (hasGetter || hasSetter) {
code.write("{");
var implementedGetter = false;
// getter
if (hasGetter) {
var getterNode = element.getter.computeNode();
if (getterNode == null)
code.write("get;");
else {
code.write("get {${Implementation.fieldBody(element.getter)}}");
implementedGetter = true;
}
}
// setter
if (hasSetter) {
var setterNode = element.setter.computeNode();
if (setterNode == null)
code.write("set;");
else {
code.write("set {${Implementation.fieldBody(element.setter)}}");
}
} else {
if (implementedGetter)
code.write("set { ${Implementation.fieldBody(element.setter)} }");
else
code.write("set;"); // For static auto initialization of variables
}
code.write("}");
} else
code.write(";");
return code.toString();
}
static String printImplementedField(
FieldElement element,
FieldElement overridingElement,
InterfaceType implementedClass,
String implementedFieldName,
ClassElement implementingType,
InterfaceType originalMixin) {
var code = new StringBuffer();
var elementForSignature = element;
// HACK: For some reason, just in Animation and Tween, we want the overridingElement
// but everywhere else we want the element. Need to correct this.
if (overridingElement != null && overridingElement.type.displayName == 'Animation<double>')
elementForSignature = overridingElement;
// type + name
var name = getFieldName(elementForSignature);
if (name == Naming.nameWithTypeParameters(elementForSignature.enclosingElement, false))
name = name + "Value";
if (containsGenericPart(elementForSignature.type)) {
var typeParameter = implementedClass.typeParameters.firstWhere((tp) =>
elementForSignature.type.displayName.contains(tp.type.displayName));
var type = implementedClass.typeArguments[
implementedClass.typeParameters.indexOf(typeParameter)];
var typeName = type.name;
// TODO: Might want to put this through a formatter of some kind
if (typeName == 'T' && originalMixin != null)
typeName = originalMixin.typeArguments[0].name;
code.write("${typeName} I$implementedFieldName.$name");
} else {
code.write(printTypeAndName(elementForSignature, interfaceName: 'I$implementedFieldName.'));
}
var hasGetter = elementForSignature.getter != null;
var hasSetter = elementForSignature.setter != null;
if (hasGetter || hasSetter) {
code.write("{");
// getter
if (hasGetter) {
code.write("get => ${implementedFieldName}.${name};");
}
// setter
if (hasSetter) {
code.write("set => ${implementedFieldName}.${name} = value;");
}
code.write("}");
} else
code.write(";");
return code.toString();
}
static String getFieldSignature(FieldElement element) {
var code = new StringBuffer();
// type + name
code.write(printTypeAndName(element));
var hasGetter = element.getter != null;
var hasSetter = element.setter != null;
if (hasGetter || hasSetter) {
code.write("{");
// getter
if (hasGetter) {
code.write("get;");
}
// setter
if (hasSetter) {
code.write("set;");
}
code.write("}");
} else
code.write(";");
return code.toString();
}
static String printTypeAndName(FieldElement element, {String interfaceName = ''}) {
var name = getFieldName(element);
if (name == Naming.nameWithTypeParameters(element.enclosingElement, false))
name = name + "Value";
var type = Types.getVariableType(element, VariableType.Field);
return "${type} $interfaceName${name}";
}
static String printImplementedTypeAndName(
FieldElement element, ClassElement supertypeThatProvidesField) {
var type = Types.getVariableType(element, VariableType.Field);
var name = getFieldName(element);
if (name == Naming.nameWithTypeParameters(element.enclosingElement, false))
name = name + "Value";
return "${type} ${name}";
}
static String getFieldName(FieldElement element) {
return Naming.getFormattedName(
element.name, NameStyle.UpperCamelCase);
}
}
================================================
FILE: AST/signature/frame.dart
================================================
import 'package:analyzer/dart/element/element.dart';
import '../comments.dart';
import '../config.dart';
import '../types.dart';
import 'classes.dart';
import '../naming.dart';
import 'delegates.dart';
import 'functions.dart';
class Frame {
static String printNamespace(
CompilationUnitElement element, String namespace) {
var code = new StringBuffer();
code.writeln(printImports(element));
code.writeln("namespace ${namespace}{");
// Add delegates
for (var delegate in element.functionTypeAliases) {
code.writeln(Delegates.printDelegate(delegate));
}
// Add methods that are not inside a class in dart to a default class in c#
var defaultClassName = Naming.DefaultClassName(element);
code.writeln("internal static class ${defaultClassName}{");
for (var topLevelVariable in element.topLevelVariables) {
var type = Types.getDartTypeName(topLevelVariable.type);
var name = Naming.getTopLevelVariableName(topLevelVariable);
name = Naming.upperCamelCase(name);
code.writeln("public static $type $name = default(${type});");
}
for (var function in element.functions) {
code.writeln(Functions.printFunction(function));
}
code.writeln("}");
// Interfaces for abstract classes
for (var type in element.types.where((t) =>
t.isAbstract == true && t.isValidMixin == false
// Workaround for classes that are not correctly picked up as interfaces
||
["PageMetrics", "FixedExtentMetrics", "GestureArenaEntry"]
.contains(t.name))) {
code.writeln(Classes.printInterface(type));
}
// Add mixins and their interfaces
for (var mxin in element.mixins) {
code.writeln(Classes.printMixin(mxin));
}
// If its possibly a valid Mixin, we have to treat it as a Mixin.
for (var mxin in element.types.where((t) => t.isValidMixin == true)) {
code.writeln(Classes.printMixin(mxin));
}
// Classes
// Where not a valid Mixin, because I already created a class in the Mixin section
for (var type in element.types.where((t) => t.isValidMixin == false)) {
code.writeln(Classes.printClass(type));
}
// Enums
for (var type in element.enums) {
code.writeln(printEnum(type));
}
code.writeln("}");
return code.toString();
}
static String printImports(CompilationUnitElement element) {
var imports = Config.defaultImports;
for (var import in element.enclosingElement.imports
.where((i) => i.importedLibrary != null)) {
AddImport(import.importedLibrary, imports);
}
// This is a workaround since files in the material\animated_icons folder are utilizing the "part of" dart feature
// "part of" acts like all files are in the same library and imports are not used here
// Since we actually need the usings in c# and cant just put the files in one namespace (that would break other references)
// we add the missing usings manually
if (element.enclosingElement.identifier
.contains("material/animated_icons")) {
imports.add("FlutterSDK.Material.Animatedicons.Animatedicons");
imports.add("FlutterSDK.Material.Animatedicons.Animatediconsdata");
}
// HACK: Remove Cupertino, while in Alpha
return imports
.where((x) {
return !x.contains('Cupertino');
})
.map((import) => "using ${import};")
.join("\n");
}
static void AddImport(LibraryElement import, List<String> allImports) {
var name = import.identifier;
// Skip imports that should get ignored
if (Config.ignoredImports.contains(name)) return;
if (name.contains("package:flutter/")) {
if (import.exportedLibraries.length > 0) {
// We need to add all sub-libraries of this library
for (var subLibrary in import.exportedLibraries) {
AddImport(subLibrary, allImports);
}
}
// Skip container imports
if (!name.contains("package:flutter/src/")) return;
// Add the package itself
name = name.replaceAll("package:flutter/src/", "");
name = name.replaceAll(".dart", "");
name = Config.rootNamespace +
"." +
name
.split("/")
.map((part) =>
Naming.getFormattedName(part, NameStyle.UpperCamelCase))
.join(".");
}
// Check if import is within the FlutterSDK library and modify the import to use the correct namespace
if (import != null &&
import.identifier.replaceAll("/", "\\").contains(Config.sourcePath)) {
name = Naming.namespaceFromIdentifier(import.identifier);
}
// Add import if it does not already exist
if (!allImports.contains(name)) allImports.add(name);
}
static String printEnum(ClassElement element) {
var name = Naming.getFormattedTypeName(element.name);
var code = new StringBuffer();
code.writeln("");
Comments.appendComment(code, element);
// if (element.hasProtected == true || element.isPrivate == true)
// code.write("internal ");
// if (element.isPublic == true)
// HACK: Making all public for the moment
code.write("public ");
code.writeln("enum ${name}{");
code.writeln("");
for (var value in element.fields.where((e) => e.isEnumConstant)) {
Comments.appendComment(code, value);
var fieldValue = value.name;
fieldValue = Naming.upperCamelCase(fieldValue);
fieldValue = Naming.escapeFixedWords(fieldValue);
code.writeln(fieldValue + ",");
}
code.writeln("}");
return code.toString();
}
}
================================================
FILE: AST/signature/functions.dart
================================================
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/src/dart/element/type.dart';
import '../implementation/implementation.dart';
import '../naming.dart';
import 'methods.dart';
class Functions {
static String printFunction(FunctionElement element) {
var code = new StringBuffer();
code.write("internal static ");
code.write(methodSignature(element));
code.writeln("{");
code.writeln(Implementation.functionBody(element));
code.writeln("}");
return code.toString();
}
static String methodSignature(ExecutableElement element) {
var methodName = Naming.nameWithTypeParameters(element, false);
methodName = Naming.getFormattedName(
methodName,
element.isPrivate
? NameStyle.LeadingUnderscoreLowerCamelCase
: NameStyle.UpperCamelCase);
var parameter = Methods.printParameter(element, element, null);
var returnType = Naming.getReturnType(element);
if (returnType.contains("() → dynamic")) {
var type = element.returnType;
if (type is FunctionTypeImpl)
returnType = type.newPrune[0].name;
else
throw new AssertionError('Unaccounted for returnType, please fix.');
}
return "${returnType} ${methodName}(${parameter})";
}
}
================================================
FILE: AST/signature/methods.dart
================================================
import 'package:analyzer/src/dart/element/member.dart';
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/dart/element/type.dart';
import '../implementation/implementation.dart';
import '../comments.dart';
import '../naming.dart';
import '../types.dart';
class Methods {
static bool isSameSignature(MethodElement m1, MethodElement m2) {
return methodSignature(m1, m1, false) == methodSignature(m2, m2, false);
}
static bool overridesBaseMethod(MethodElement method, ClassElement element) {
if (element.methods.any((m) => isSameSignature(m, method)) ||
overridesParentBaseMethod(method, element)) return true;
return false;
}
static MethodElement getBaseMethodInClass(MethodElement element) {
if (element.enclosingElement == null ||
element.enclosingElement.allSupertypes.length == 0) return element;
MethodElement methodInSupertype;
for (var supertype in element.enclosingElement.allSupertypes
.where((st) => st.methods.length > 0)) {
methodInSupertype = supertype.methods.firstWhere(
(method) => method.displayName == element.displayName,
orElse: () => null);
if (methodInSupertype != null) {
// Found method this method extends from
break;
}
}
if (methodInSupertype != null) {
return getBaseMethodInClass(methodInSupertype);
} else if (element is MethodMember) {
return element.baseElement;
} else
return element;
}
static bool overridesParentBaseMethod(
MethodElement method, ClassElement element) {
for (var superType in element.allSupertypes.where(
(st) => st.displayName != "Object" && !element.mixins.contains(st))) {
if (overridesBaseMethod(method, superType.element)) return true;
}
return false;
}
static String printMethod(MethodElement element, bool isOverride,
[String inheritedType = '']) {
// HACK: ignoring all ToString() methods at the moment.
if (element.name == 'toString') return "";
var baseMethod = getBaseMethodInClass(element);
var code = new StringBuffer();
code.writeln("");
Comments.appendComment(code, element);
var isOverride = element.hasOverride == true && baseMethod != element;
if (element.isPublic == true)
code.write("public ");
else if (element.hasProtected == true || (element.isPrivate && isOverride))
code.write("protected ");
else if (element.isPrivate == true) code.write("private ");
if (isOverride) {
// HACK: normally use 'override' but use `new` in case return type mismatch
// Because C# doesn't support return type covariance (yet anyway, its a proposed feature).
code.write("new ");
}
if (element.hasSealed == true)
code.write("sealed ");
// Add virtual as default key if method is not already an override since all methods are virtual in dart
else if (element.hasOverride == false && element.isPrivate == false)
code.write("virtual ");
code.write(methodSignature(baseMethod, element, isOverride, inheritedType));
code.writeln(Implementation.MethodBody(element.computeNode().body));
// HACK: Covariant type used, hence need to implement the exact interface type
// In method bodies, we need to convert and redirect this to the actual method above.
var isCovariant = false;
for (var parameter in baseMethod.parameters) {
if (parameter.isCovariant) isCovariant = true;
}
if (isCovariant &&
typesDifferent(element.parameters, baseMethod.parameters)) {
code.write("public new ");
code.write(methodSignature(baseMethod, null, isOverride, inheritedType));
code.writeln(Implementation.MethodBody(element.computeNode().body));
}
return code.toString();
}
static bool typesDifferent(
List<ParameterElement> first, List<ParameterElement> other) {
if (first.length != other.length) return true;
var count = 0;
for (var item in first) {
if ((item.type.displayName != other[count].type.displayName) &&
other[count].type.displayName != 'T' &&
item.type.displayName != 'T' &&
!other[count].type.displayName.contains('<T>') &&
!item.type.displayName.contains('<T>')) return true;
count += 1;
}
return false;
}
static String printImplementedMethod(
MethodElement element,
String implementationInstanceName,
InterfaceType implementedClass,
MethodElement overrideMethod,
ClassElement classElement,
InterfaceType originalMixin) {
var baseMethod = implementedClass.element.isMixin
? element
: getBaseMethodInClass(element);
var name = Naming.nameWithTypeParameters(element, false);
var code = new StringBuffer();
code.writeln("");
Comments.appendComment(code, element);
if (element.isPublic == true) code.write("public ");
if (element.hasProtected == true) code.write("protected ");
if (element.hasSealed == true) code.write("sealed ");
code.write("virtual ");
code.write(methodSignature(baseMethod, element, false, '', originalMixin));
if (overrideMethod == null) {
code.write("{");
if (baseMethod.returnType.displayName != "void") code.write("return ");
code.writeln(
"${implementationInstanceName}.${name}(${baseMethod.parameters.map((p) => Naming.getFormattedName(p.name, NameStyle.LowerCamelCase)).join(",")});}");
} else {
code.writeln(
Implementation.MethodBody(overrideMethod.computeNode().body));
}
return code.toString();
}
static bool containsGenericPart(DartType type) {
var element = type.element;
if (element is TypeParameterElement) return true;
if (type is ParameterElement) {
print("t");
}
return false;
}
static String getMethodName(MethodElement element) {
var methodName = Naming.nameWithTypeParameters(element, false);
if (methodName ==
Naming.nameWithTypeParameters(element.enclosingElement, false))
methodName = "Self" + methodName;
methodName = Naming.getFormattedName(
methodName,
element.isPrivate
? NameStyle.LeadingUnderscoreLowerCamelCase
: NameStyle.UpperCamelCase);
return methodName;
}
static String methodSignature(
MethodElement element, MethodElement overridenElement, bool isOverride,
[String inheritedType = '',
InterfaceType originalMixin = null,
String additionalParameter = '',
String generics = '']) {
var highestMethod = overridenElement;
if (highestMethod == null) highestMethod = element;
var methodName = getMethodName(element);
var parameter = printParameter(element, overridenElement, originalMixin);
var returnTypeName = Naming.getReturnType(highestMethod);
var returnType = highestMethod.returnType;
var typeParameter = "";
// Check if the method has a generic return value
if (returnType is TypeParameterElement && overridenElement != null) {
returnTypeName = Types.getDartTypeName(overridenElement.returnType);
}
// Check if the method return type has type arguments with generic values
if (returnType is InterfaceType) {
var hasTypedTypeArguments = returnType.typeArguments
.any((argument) => argument is TypeParameterType);
if (hasTypedTypeArguments) {
returnTypeName = Naming.nameWithTypeArguments(returnType, false);
}
}
if (isOverride && returnTypeName == 'T' && inheritedType.isNotEmpty) {
returnTypeName = inheritedType;
}
if (additionalParameter.isNotEmpty && parameter.isNotEmpty)
additionalParameter += ',';
// HACK: A single once off hack because I'm messing something up here and don't know what
if (returnTypeName == 'Future<E>' && methodName == 'Then<R>')
methodName = 'Then<E>';
// Cheap Hack
if (returnTypeName == 'Future<Image>') returnTypeName = 'Future<SKImage>';
return "${returnTypeName} ${methodName}${typeParameter}$generics($additionalParameter${parameter})";
}
static String printAutoParameters(
FunctionTypedElement element, String className,
{String instanceName = "this"}) {
return element.parameters.where((x) {
return x.isInitializingFormal == true;
}).map((p) {
var variableName =
Naming.getFormattedName(p.name, NameStyle.UpperCamelCase);
// I don't really like renaming variables, but not sure what other choice we have atm.
if (variableName == className) variableName += 'Value';
return '$instanceName.$variableName = ' +
Naming.getFormattedName(p.name, NameStyle.LowerCamelCase) +
';';
}).join('\n');
}
/// This function returns a comma delimited list that
static String printParameterNames(FunctionTypedElement element) {
return element.parameters.map((p) {
var parameterName =
Naming.getFormattedName(p.name, NameStyle.LowerCamelCase);
if (parameterName == "")
parameterName = "p" + (element.parameters.indexOf(p) + 1).toString();
return parameterName;
}).join(', ');
}
static String printParameter(FunctionTypedElement method,
FunctionTypedElement overridenMethod, InterfaceType originalMixin) {
// Parameter
var highestMethod = overridenMethod;
if (highestMethod == null) {
highestMethod = method;
}
var parameters = highestMethod.parameters.map((p) {
// Name
var parameterName =
Naming.getFormattedName(p.name, NameStyle.LowerCamelCase);
if (parameterName == "")
parameterName = "p" + (method.parameters.indexOf(p) + 1).toString();
var parameterType = Types.getParameterType(p, method, overridenMethod);
if (parameterType == null) {
parameterType = "object";
}
if (parameterType == 'T' && originalMixin != null) {
if (originalMixin.typeArguments[0].name.isNotEmpty)
parameterType = originalMixin.typeArguments[0].name;
}
// This is a workaround, the namespace should be added automatically
if (parameterType == 'List<Offset>') parameterType = 'List<FlutterBinding.UI.Offset>';
var parameterSignature = parameterType + " " + parameterName;
// Add keys
// Required
if (p.hasRequired || p.toString().contains("@required")) {
parameterSignature = "[NotNull] " + parameterSignature;
}
// Optional
if (p.isOptional) {
var defaultValue = "default(${parameterType})";
var unmodifiedDefaultValue = p.defaultValueCode;
if (unmodifiedDefaultValue != null &&
unmodifiedDefaultValue != "" &&
(unmodifiedDefaultValue == "true" ||
unmodifiedDefaultValue == "false" // bool
||
double.tryParse(unmodifiedDefaultValue) != null)) {
// numeric
defaultValue = p.defaultValueCode;
}
parameterSignature += " = ${defaultValue}";
}
return parameterSignature;
});
return parameters == null ? "" : parameters.join(",");
}
}
================================================
FILE: AST/types.dart
================================================
import 'package:analyzer/dart/element/type.dart';
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/src/dart/element/type.dart';
import 'package:analyzer/analyzer.dart';
import 'package:analyzer/src/dart/element/element.dart';
import 'package:analyzer/dart/ast/ast.dart';
import 'package:front_end/src/base/syntactic_entity.dart';
import 'package:front_end/src/scanner/token.dart';
import 'config.dart';
import 'implementation/implementation.dart';
import 'naming.dart';
class Types {
static String getDartTypeName(DartType type) {
String typeName = "object";
if (type is InterfaceType) {
typeName = Naming.nameWithTypeArguments(type, false);
} else if (type is TypeParameterType) {
typeName = type.displayName;
}
var formattedName = Naming.getFormattedTypeName(typeName);
if (!(type is TypeParameterType) && type.element != null) {
var library = type.element.library;
if (library != null &&
!Config.ignoredImports.contains(library.identifier) &&
formattedName != "object") {
var namespace = Naming.namespaceFromIdentifier(library.identifier);
formattedName = namespace + "." + formattedName;
}
}
return formattedName;
}
static String getVariableType(VariableElement element, VariableType type) {
String typeName = "object";
var elementType = element.type;
// Function type
if (elementType is FunctionTypeImpl) {
return handleFunctionType(elementType);
// Interface type
} else if (elementType is InterfaceType) {
typeName = Naming.nameWithTypeArguments(element.type, false);
} else if (elementType is TypeParameterType) {
typeName = elementType.displayName;
} else if (element.computeNode() != null) {
switch (type) {
case VariableType.Field:
typeName = Naming.tokenToText(
element.computeNode().beginToken.previous, true)
.split(" ")
.first;
break;
case VariableType.Parameter:
typeName =
Naming.tokenToText(element.computeNode().endToken.previous, true)
.split(" ")
.last;
break;
}
}
return addNamespace(elementType, typeName);
}
static String addNamespace(DartType type, String typeName) {
var formattedName = Naming.getFormattedTypeName(typeName);
var library = type.element.library;
if (library != null && library.displayName == 'dart.ui'){
switch(typeName){
case "Image":
case "Paint":
case "Picture":
case "Vertices":
return "SK" + typeName;
case "TextStyle":
case "PointMode":
case "RRect":
case "Paragraph":
case "Offset":
case "BlendMode":
case "Rect":
case "Color":
return "FlutterBinding.UI." + typeName;
case "List<Offset>":
return "List<FlutterBinding.UI.Offset>";
}
}
if (library != null && library.displayName == 'dart.ui' && typeName == 'Image')
return 'SKImage';
if (library != null && library.displayName == 'dart.ui' && typeName == 'TextStyle')
return 'FlutterBinding.UI.TextStyle';
if (!(type is TypeParameterType) &&
library != null &&
!Config.ignoredImports.contains(library.identifier) &&
formattedName != "object") {
var namespace = Naming.namespaceFromIdentifier(library.identifier);
formattedName = namespace + "." + formattedName;
}
return formattedName;
}
static String handleFunctionType(FunctionTypeImpl elementType) {
if (elementType.newPrune != null) {
// We only expect one newPrune
if (elementType.newPrune.length != 1) {
throw new AssertionError(
'Never accounted for elementType to have more than 1 newPrune value.');
}
var typeName = elementType.newPrune[0].displayName;
var typeAndNamespace = addNamespace(elementType, typeName);
if (elementType.typeArguments.length > 0) {
var typeParameters = elementType.typeArguments.map((p) {
return Naming.getFormattedTypeName(p.displayName);
}).join(',');
typeAndNamespace = '$typeAndNamespace<${typeParameters}>';
}
return typeAndNamespace;
}
// Type did not have newPrune, resolve the func or action manually
var parameterTypes = '';
if (elementType.normalParameterTypes == null)
throw new AssertionError('Its null');
if (elementType.normalParameterTypes != null) {
parameterTypes = elementType.normalParameterTypes.map((p) {
if (p is InterfaceType) {
var type = Naming.getFormattedTypeName(p.name);
var typeArguments = p.typeArguments.map((t) {
return Naming.getFormattedTypeName(t.displayName);
}).join(',');
if (typeArguments.isEmpty)
return type;
else
return type + '<$typeArguments>';
} else
return Naming.getFormattedTypeName(p.displayName);
}).join(',');
}
// Remove all spaces
parameterTypes = parameterTypes.replaceAll(' ', '');
if (elementType.returnType is VoidType) {
// This is an Action
if (parameterTypes.isEmpty)
return 'Action';
else
return 'Action<$parameterTypes>';
} else {
// This is a Function
// TODO: really need a single function that can do this recursively for all
// return types and parameter types.
var returnType = elementType.returnType;
var returnTypeName = elementType.returnType.name;
if (returnType.toString() == 'Future<void>')
returnTypeName = 'Future';
else if (returnType is InterfaceType) {
if (returnType.typeArguments.length > 0) {
var types = returnType.typeArguments.map((p) {
return Naming.getFormattedTypeName(p.name);
}).join(',');
returnTypeName += '<$types>';
}
}
// if (returnType == 'FutureOr') returnType.toString();
if (parameterTypes.isNotEmpty && parameterTypes != 'void')
return 'Func<$returnTypeName,$parameterTypes>';
else
return 'Func<$returnTypeName>';
}
}
static String getParameterType(
ParameterElement parameter,
FunctionTypedElement method,
FunctionTypedElement overridenMethod) {
// Type
//if (parameterType == 'object' && !parameter.toString().contains('dynamic'))
// parameterType = '';
// if parameter is generic, we use the parameter signature of the method that got overriden
if (parameter.type.element is TypeParameterElement &&
overridenMethod != null) {
parameter = overridenMethod.parameters[
method.parameters.indexWhere((x) => x.name == parameter.name)];
}
var parameterType =
getVariableType(parameter, VariableType.Parameter).split(" ").last;
if (parameterType == "@") {
parameterType = "object";
}
if (parameterType == 'object' && !(parameter.type is DynamicTypeImpl)) {
var computedParameter = parameter.computeNode();
parameterType = getTypeFromComputedNodeEntities(
parameter, computedParameter.childEntities, false);
}
return parameterType;
}
static String getTypeFromComputedNodeEntities(ParameterElement parameter,
Iterable<SyntacticEntity> childEntities, bool isRequired) {
// Skip the '@required' key, the c# key will be added later
var firstEntityName = childEntities.first.toString();
if (["@required", "covariant"]
.any((ignored) => firstEntityName == ignored)) {
childEntities = childEntities.skip(1);
}
// this first element should be the element, that represents the type
var expectedTypeEntity = childEntities.elementAt(0);
// One child entity, parameter might be wrapped
if (childEntities.length == 1) {
if (expectedTypeEntity is SimpleFormalParameter) {
return getTypeFromComputedNodeEntities(
parameter, expectedTypeEntity.childEntities, isRequired);
} else {
throw new AssertionError("Parameter uses unexpected type.");
}
// Two child entities, type + name
} else if (childEntities.length == 2) {
if (expectedTypeEntity is TypeName) {
// Check if this is a prefixed identifier eg. 'ui.actualType'
if (expectedTypeEntity.childEntities.length == 1 &&
expectedTypeEntity.childEntities.first is PrefixedIdentifier) {
var prefixedIdentifier =
expectedTypeEntity.childEntities.first as PrefixedIdentifier;
return prefixedIdentifier.childEntities.last.toString();
} else
return Implementation.processTypeName(expectedTypeEntity);
} else {
throw new AssertionError("Parameter uses unexpected type.");
}
}
// More then two entities, this can have multiple reasons
// Check if this is an auto assigning parameter (eg. this._aPropertyName)
if (expectedTypeEntity is KeywordToken &&
expectedTypeEntity.lexeme == "this") {
// Get the field that is initialized by this parameter and use its type
var containingMethod = parameter.enclosingElement as FunctionTypedElement;
var containingClass = containingMethod.enclosingElement as ClassElement;
var field = containingClass.fields.firstWhere(
(f) => f.displayName == parameter.name,
orElse: () => null);
if (field != null && field is FieldElementImpl) {
var computed = field.computeNode();
var parent = computed.parent;
if (parent is VariableDeclarationList) {
var type = parent.type;
if (type is TypeName) return Implementation.processEntity(type);
}
return getDartTypeName(field.type);
} else {
throw new AssertionError(
"Could not find field for initialization parameter.");
}
// Check if the extra entities contain the default value
} else if (parameter.isOptional) {
if (expectedTypeEntity is TypeName) {
return Implementation.processTypeName(childEntities.first);
} else if (expectedTypeEntity is SimpleFormalParameter) {
return getTypeFromComputedNodeEntities(
parameter, expectedTypeEntity.childEntities, isRequired);
} else {
throw new AssertionError("Optional parameter uses unexpected type.");
}
}
throw new AssertionError(
"Could not resolve parameter type from computed node.");
}
}
================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at adam.pedley@gmail.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
================================================
FILE: Flutter.Sample.App/Flutter.Sample.App.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\FlutterSDK\FlutterSDK.csproj" />
</ItemGroup>
</Project>
================================================
FILE: Flutter.Sample.App/MainPage.cs
================================================
namespace Flutter.Sample.App
{
// Left here as a sample of what this may look like
//static void main() => runApp(new MyApp());
//public class MyApp : StatelessWidget
//{
// // This widget is the root of your application.
// public override Widget build(BuildContext context)
// {
// return new MaterialApp(
// title: "Flutter Demo",
// theme: new ThemeData(
// // This is the theme of your application.
// //
// // Try running your application with "flutter run". You'll see the
// // application has a blue toolbar. Then, without quitting the app, try
// // changing the primarySwatch below to Colors.green and then invoke
// // "hot reload" (press "r" in the console where you ran "flutter run",
// // or press Run > Flutter Hot Reload in IntelliJ). Notice that the
// // counter didn't reset back to zero; the application is not restarted.
// primarySwatch: Colors.blue
// ),
// home: new MyHomePage(title: "Flutter Demo Home Page")
// );
// }
//}
//public class MyHomePage : StatefulWidget
//{
// public MyHomePage(string title, Key key = null) : base(key: key)
// {
// this.title = title;
// }
// // This widget is the home page of your application. It is stateful, meaning
// // that it has a State object (defined below) that contains fields that affect
// // how it looks.
// // This class is the configuration for the state. It holds the values (in this
// // case the title) provided by the parent (in this case the App widget) and
// // used by the build method of the State. Fields in a Widget subclass are
// // always marked "final".
// public readonly string title;
// public override State createState() => new _MyHomePageState();
//}
//public class _MyHomePageState : State<MyHomePage>
//{
// int _counter = 0;
// void _incrementCounter()
// {
// setState(() =>
// {
// // This call to setState tells the Flutter framework that something has
// // changed in this State, which causes it to rerun the build method below
// // so that the display can reflect the updated values. If we changed
// // _counter without calling setState(), then the build method would not be
// // called again, and so nothing would appear to happen.
// _counter++;
// });
// }
// public override Widget build(BuildContext context)
// {
// // This method is rerun every time setState is called, for instance as done
// // by the _incrementCounter method above.
// //
// // The Flutter framework has been optimized to make rerunning build methods
// // fast, so that you can just rebuild anything that needs updating rather
// // than having to individually change instances of widgets.
// return new Scaffold(
// appBar: new AppBar(
// // Here we take the value from the MyHomePage object that was created by
// // the App.build method, and use it to set our appbar title.
// title: new Text(widget.title)
// ),
// body: new Center(
// // Center is a layout widget. It takes a single child and positions it
// // in the middle of the parent.
// child: new Text("Hello World!")
// )
// );
// }
//}
}
================================================
FILE: Flutter.Sample.Droid/Assets/AboutAssets.txt
================================================
Any raw assets you want to be deployed with your application can be placed in
this directory (and child directories) and given a Build Action of "AndroidAsset".
These files will be deployed with you package and will be accessible using Android's
AssetManager, like this:
public class ReadAsset : Activity
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
InputStream input = Assets.Open ("my_asset.txt");
}
}
Additionally, some Android functions will automatically load asset files:
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
================================================
FILE: Flutter.Sample.Droid/Flutter.Sample.Droid.csproj
================================================
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{48483C42-37B1-4258-BD46-8387A4FA71C1}</ProjectGuid>
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TemplateGuid>{122416d6-6b49-4ee2-a1e8-b825f31c79fe}</TemplateGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Flutter.Sample.Droid</RootNamespace>
<AssemblyName>Flutter.Sample.Droid</AssemblyName>
<FileAlignment>512</FileAlignment>
<AndroidApplication>True</AndroidApplication>
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
<AndroidResgenClass>Resource</AndroidResgenClass>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
<TargetFrameworkVersion>v8.1</TargetFrameworkVersion>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
<AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>portable</DebugType>
<Optimize>False</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidUseSharedRuntime>True</AndroidUseSharedRuntime>
<AndroidLinkMode>None</AndroidLinkMode>
<EmbedAssembliesIntoApk>False</EmbedAssembliesIntoApk>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>pdbonly</DebugType>
<Optimize>True</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidManagedSymbols>true</AndroidManagedSymbols>
<AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
<AndroidLinkMode>SdkOnly</AndroidLinkMode>
<EmbedAssembliesIntoApk>True</EmbedAssembliesIntoApk>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Mono.Android" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Resources\Resource.Designer.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Properties\AndroidManifest.xml" />
<None Include="Assets\AboutAssets.txt" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\layout\activity_main.axml">
<SubType>Designer</SubType>
</AndroidResource>
<AndroidResource Include="Resources\values\colors.xml" />
<AndroidResource Include="Resources\values\ic_launcher_background.xml" />
<AndroidResource Include="Resources\values\strings.xml" />
<AndroidResource Include="Resources\values\styles.xml" />
<AndroidResource Include="Resources\mipmap-anydpi-v26\ic_launcher.xml" />
<AndroidResource Include="Resources\mipmap-anydpi-v26\ic_launcher_round.xml" />
<AndroidResource Include="Resources\mipmap-hdpi\ic_launcher.png" />
<AndroidResource Include="Resources\mipmap-hdpi\ic_launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-hdpi\ic_launcher_round.png" />
<AndroidResource Include="Resources\mipmap-mdpi\ic_launcher.png" />
<AndroidResource Include="Resources\mipmap-mdpi\ic_launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-mdpi\ic_launcher_round.png" />
<AndroidResource Include="Resources\mipmap-xhdpi\ic_launcher.png" />
<AndroidResource Include="Resources\mipmap-xhdpi\ic_launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xhdpi\ic_launcher_round.png" />
<AndroidResource Include="Resources\mipmap-xxhdpi\ic_launcher.png" />
<AndroidResource Include="Resources\mipmap-xxhdpi\ic_launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xxhdpi\ic_launcher_round.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\ic_launcher.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\ic_launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\ic_launcher_round.png" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Android.Support.Design" Version="27.0.2.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Flutter.Sample.App\Flutter.Sample.App.csproj">
<Project>{e0fb1bf8-e32c-4a8a-9ae6-e501cc68f279}</Project>
<Name>Flutter.Sample.App</Name>
</ProjectReference>
<ProjectReference Include="..\Flutter.Shell.Droid\Flutter.Shell.Droid.csproj">
<Project>{c9e1caa4-53f3-4032-92a0-81f5322d446b}</Project>
<Name>Flutter.Shell.Droid</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
================================================
FILE: Flutter.Sample.Droid/MainActivity.cs
================================================
using Android.App;
using Android.OS;
using Android.Support.V7.App;
using Android.Runtime;
using Android.Widget;
namespace Flutter.Sample.Droid
{
[Activity(Label = "@string/app_name", Theme = "@style/AppTheme", MainLauncher = true)]
public class MainActivity : AppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.activity_main);
}
}
}
================================================
FILE: Flutter.Sample.Droid/Properties/AndroidManifest.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="1"
android:versionName="1.0"
package="Flutter.Sample.Droid.Flutter.Sample.Droid">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="27" />
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme">
</application>
</manifest>
================================================
FILE: Flutter.Sample.Droid/Properties/AssemblyInfo.cs
================================================
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Android.App;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Flutter.Sample.Droid")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Flutter.Sample.Droid")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
================================================
FILE: Flutter.Sample.Droid/Resources/layout/activity_main.axml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
</RelativeLayout>
================================================
FILE: Flutter.Sample.Droid/Resources/mipmap-anydpi-v26/ic_launcher.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
================================================
FILE: Flutter.Sample.Droid/Resources/mipmap-anydpi-v26/ic_launcher_round.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
================================================
FILE: Flutter.Sample.Droid/Resources/values/Strings.xml
================================================
<resources>
<string name="app_name">Flutter.Sample.Droid</string>
<string name="action_settings">Settings</string>
</resources>
================================================
FILE: Flutter.Sample.Droid/Resources/values/colors.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#2c3e50</color>
<color name="colorPrimaryDark">#1B3147</color>
<color name="colorAccent">#3498db</color>
</resources>
================================================
FILE: Flutter.Sample.Droid/Resources/values/ic_launcher_background.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#2C3E50</color>
</resources>
================================================
FILE: Flutter.Sample.Droid/Resources/values/styles.xml
================================================
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>
================================================
FILE: Flutter.Sample.UWP/App.xaml
================================================
<Application
x:Class="Flutter.Sample.UWP.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Flutter.Sample.UWP">
</Application>
================================================
FILE: Flutter.Sample.UWP/App.xaml.cs
================================================
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
namespace Flutter.Sample.UWP
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
sealed partial class App : Application
{
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
this.InitializeComponent();
this.Suspending += OnSuspending;
}
/// <summary>
/// Invoked when the application is launched normally by the end user. Other entry points
/// will be used such as when the application is launched to open a specific file.
/// </summary>
/// <param name="e">Details about the launch request and process.</param>
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
Frame rootFrame = Window.Current.Content as Frame;
// Do not repeat app initialization when the Window already has content,
// just ensure that the window is active
if (rootFrame == null)
{
// Create a Frame to act as the navigation context and navigate to the first page
rootFrame = new Frame();
rootFrame.NavigationFailed += OnNavigationFailed;
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
{
//TODO: Load state from previously suspended application
}
// Place the frame in the current Window
Window.Current.Content = rootFrame;
}
if (e.PrelaunchActivated == false)
{
if (rootFrame.Content == null)
{
// When the navigation stack isn't restored navigate to the first page,
// configuring the new page by passing required information as a navigation
// parameter
rootFrame.Navigate(typeof(MainPage), e.Arguments);
}
// Ensure the current window is active
Window.Current.Activate();
}
}
/// <summary>
/// Invoked when Navigation to a certain page fails
/// </summary>
/// <param name="sender">The Frame which failed navigation</param>
/// <param name="e">Details about the navigation failure</param>
void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
{
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
}
/// <summary>
/// Invoked when application execution is being suspended. Application state is saved
/// without knowing whether the application will be terminated or resumed with the contents
/// of memory still intact.
/// </summary>
/// <param name="sender">The source of the suspend request.</param>
/// <param name="e">Details about the suspend request.</param>
private void OnSuspending(object sender, SuspendingEventArgs e)
{
var deferral = e.SuspendingOperation.GetDeferral();
//TODO: Save application state and stop any background activity
deferral.Complete();
}
}
}
================================================
FILE: Flutter.Sample.UWP/Flutter.Sample.UWP.csproj
================================================
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{F02BD326-5760-4246-9EDC-C41B489E965B}</ProjectGuid>
<OutputType>AppContainerExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Flutter.Sample.UWP</RootNamespace>
<AssemblyName>Flutter.Sample.UWP</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.17763.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17134.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
<PackageCertificateKeyFile>Flutter.Sample.UWP_TemporaryKey.pfx</PackageCertificateKeyFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
<OutputPath>bin\ARM\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup>
<ItemGroup>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
<None Include="Flutter.Sample.UWP_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
<Content Include="Properties\Default.rd.xml" />
<Content Include="Assets\LockScreenLogo.scale-200.png" />
<Content Include="Assets\SplashScreen.scale-200.png" />
<Content Include="Assets\Square150x150Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Content Include="Assets\StoreLogo.png" />
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="MainPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>6.1.7</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Flutter.Sample.App\Flutter.Sample.App.csproj">
<Project>{e0fb1bf8-e32c-4a8a-9ae6-e501cc68f279}</Project>
<Name>Flutter.Sample.App</Name>
</ProjectReference>
<ProjectReference Include="..\Flutter.Shell.UWP\Flutter.Shell.UWP.csproj">
<Project>{a5bf7067-2a28-4002-aeb4-1965d0dedc14}</Project>
<Name>Flutter.Shell.UWP</Name>
</ProjectReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
================================================
FILE: Flutter.Sample.UWP/MainPage.xaml
================================================
<fluttershell:FlutterPage
x:Class="Flutter.Sample.UWP.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:fluttershell="using:Flutter.Shell.UWP"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" />
================================================
FILE: Flutter.Sample.UWP/MainPage.xaml.cs
================================================
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
namespace Flutter.Sample.UWP
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class MainPage
{
public MainPage()
{
this.InitializeComponent();
}
}
}
================================================
FILE: Flutter.Sample.UWP/Package.appxmanifest
================================================
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
IgnorableNamespaces="uap mp">
<Identity
Name="68e2ed5a-6b47-4c9b-9fe0-bd7501495a01"
Publisher="CN=Adam"
Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="68e2ed5a-6b47-4c9b-9fe0-bd7501495a01" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<Properties>
<DisplayName>Flutter.Sample.UWP</DisplayName>
<PublisherDisplayName>Adam</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate"/>
</Resources>
<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="Flutter.Sample.UWP.App">
<uap:VisualElements
DisplayName="Flutter.Sample.UWP"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png"
Description="Flutter.Sample.UWP"
BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>
================================================
FILE: Flutter.Sample.UWP/Properties/AssemblyInfo.cs
================================================
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Flutter.Sample.UWP")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Flutter.Sample.UWP")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: ComVisible(false)]
================================================
FILE: Flutter.Sample.UWP/Properties/Default.rd.xml
================================================
<!--
This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
developers. However, you can modify these parameters to modify the behavior of the .NET Native
optimizer.
Runtime Directives are documented at https://go.microsoft.com/fwlink/?LinkID=391919
To fully enable reflection for App1.MyClass and all of its public/private members
<Type Name="App1.MyClass" Dynamic="Required All"/>
To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
-->
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Application>
<!--
An Assembly element with Name="*Application*" applies to all assemblies in
the application package. The asterisks are not wildcards.
-->
<Assembly Name="*Application*" Dynamic="Required All" />
<!-- Add your application specific runtime directives here. -->
</Application>
</Directives>
================================================
FILE: Flutter.Shell.Droid/Flutter.Shell.Droid.csproj
================================================
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{C9E1CAA4-53F3-4032-92A0-81F5322D446B}</ProjectGuid>
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TemplateGuid>{9ef11e43-1701-4396-8835-8392d57abb70}</TemplateGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Flutter.Shell.Droid</RootNamespace>
<AssemblyName>Flutter.Shell.Droid</AssemblyName>
<FileAlignment>512</FileAlignment>
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
<TargetFrameworkVersion>v8.1</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Mono.Android" />
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Resources\Resource.Designer.cs" />
<Compile Include="FlutterCanvas.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="27.0.2.1" />
<PackageReference Include="SkiaSharp">
<Version>1.60.3</Version>
</PackageReference>
<PackageReference Include="SkiaSharp.Views">
<Version>1.60.3</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\values\strings.xml" />
<AndroidResource Include="Resources\layout\FlutterPage.axml" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\drawable\" />
<Folder Include="Resources\layout\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FlutterBinding\FlutterBinding.csproj">
<Project>{c9313643-3357-4872-9b00-03e2c79ad297}</Project>
<Name>FlutterBinding</Name>
</ProjectReference>
<ProjectReference Include="..\FlutterSDK\FlutterSDK.csproj">
<Project>{0781218d-0bcf-4528-aa32-a1937572e43b}</Project>
<Name>FlutterSDK</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
================================================
FILE: Flutter.Shell.Droid/FlutterCanvas.cs
================================================
using Android.OS;
using Android.Support.V7.App;
using FlutterBinding.UI;
using SkiaSharp.Views.Android;
namespace Flutter.Shell.Droid
{
public class FlutterCanvas : AppCompatActivity
{
public SKCanvasView Canvas { get; private set; }
public FlutterSurface Surface { get; private set; }
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
SetContentView(Resource.Layout.FlutterPage);
Canvas = FindViewById<SKCanvasView>(Resource.Id.skiaView);
var scale = Resources.DisplayMetrics.Density;
if (Canvas != null)
{
Surface = new FlutterSurface(scale);
}
Canvas.PaintSurface += OnCanvasPaintSurface;
}
private void OnCanvasPaintSurface(object sender, SKPaintSurfaceEventArgs args)
{
Surface.OnPaintSurface(args.Surface, args.Info);
}
protected override void OnDestroy()
{
Canvas.PaintSurface -= OnCanvasPaintSurface;
base.OnDestroy();
}
}
}
================================================
FILE: Flutter.Shell.Droid/Properties/AssemblyInfo.cs
================================================
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Android.App;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Flutter.Shell.Droid")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Flutter.Shell.Droid")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
================================================
FILE: Flutter.Shell.Droid/Resources/layout/FlutterPage.axml
================================================
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<skiasharp.views.android.SKCanvasView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/skiaView" />
</FrameLayout>
================================================
FILE: Flutter.Shell.Droid/Resources/values/Strings.xml
================================================
<resources>
<string name="hello">Hello World, Click Me!</string>
<string name="app_name">Flutter.Shell.Droid</string>
</resources>
================================================
FILE: Flutter.Shell.UWP/Flutter.Shell.UWP.csproj
================================================
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{A5BF7067-2A28-4002-AEB4-1965D0DEDC14}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Flutter.Shell.UWP</RootNamespace>
<AssemblyName>Flutter.Shell.UWP</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.17763.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17134.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<PlatformTarget>x86</PlatformTarget>
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
<PlatformTarget>ARM</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
<PlatformTarget>ARM</PlatformTarget>
<OutputPath>bin\ARM\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<PlatformTarget>x64</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup>
<ItemGroup>
<Compile Include="FlutterCanvas.cs" />
<Compile Include="FlutterPage.xaml.cs">
<DependentUpon>FlutterPage.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Properties\Flutter.Shell.UWP.rd.xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>6.1.7</Version>
</PackageReference>
<PackageReference Include="SkiaSharp">
<Version>1.60.3</Version>
</PackageReference>
<PackageReference Include="SkiaSharp.Views">
<Version>1.60.3</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FlutterBinding\FlutterBinding.csproj">
<Project>{c9313643-3357-4872-9b00-03e2c79ad297}</Project>
<Name>FlutterBinding</Name>
</ProjectReference>
<ProjectReference Include="..\FlutterSDK\FlutterSDK.csproj">
<Project>{0781218d-0bcf-4528-aa32-a1937572e43b}</Project>
<Name>FlutterSDK</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Page Include="FlutterPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Themes\Generic.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<None Include="VisualStudioToolsManifest.xml" />
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
================================================
FILE: Flutter.Shell.UWP/FlutterCanvas.cs
================================================
using System;
using Windows.Graphics.Display;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using FlutterBinding.UI;
using SkiaSharp.Views.UWP;
namespace Flutter.Shell.UWP
{
//[TemplatePart(Name = "Content")]
public sealed class FlutterCanvas : ContentControl
{
private const string CanvasKey = "Canvas";
public SKXamlCanvas Canvas { get; private set; }
public FlutterSurface Surface { get; private set; }
public FlutterCanvas()
{
DefaultStyleKey = typeof(FlutterCanvas);
}
/// <exception cref="ArgumentNullException"></exception>
/// <inheritdoc />
protected override void OnApplyTemplate()
{
if (Canvas != null)
Canvas.PaintSurface -= OnCanvasOnPaintSurface;
Canvas = GetTemplateChild(CanvasKey) as SKXamlCanvas;
if (Canvas == null)
return;
var display = DisplayInformation.GetForCurrentView();
var scale = display.LogicalDpi / 96.0f;
Surface = new FlutterSurface(scale);
Canvas.PaintSurface += OnCanvasOnPaintSurface;
base.OnApplyTemplate();
}
private void OnCanvasOnPaintSurface(object s, SKPaintSurfaceEventArgs args)
{
Surface.OnPaintSurface(args.Surface, args.Info);
}
/// <inheritdoc />
protected override void OnContentChanged(object oldContent, object newContent)
{
if (oldContent is FrameworkElement oldElement)
oldElement.SizeChanged -= OnSizeChanged;
if (newContent is FrameworkElement newElement)
newElement.SizeChanged += OnSizeChanged;
base.OnContentChanged(oldContent, newContent);
}
private void OnSizeChanged(object sender, SizeChangedEventArgs e)
{
// TODO: Notify
}
}
}
================================================
FILE: Flutter.Shell.UWP/FlutterPage.xaml
================================================
<Page
x:Class="Flutter.Shell.UWP.FlutterPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Flutter.Shell.UWP"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<local:FlutterCanvas x:Name="FlutterCanvas" x:FieldModifier="public" />
</Page>
================================================
FILE: Flutter.Shell.UWP/FlutterPage.xaml.cs
================================================
using Windows.ApplicationModel.Core;
using Windows.UI;
using Windows.UI.ViewManagement;
using Windows.UI.Xaml;
namespace Flutter.Shell.UWP
{
/// <summary>
/// Flutter Page
/// </summary>
public partial class FlutterPage
{
public FlutterPage()
{
InitializeComponent();
HideTitleBar();
}
private static void HideTitleBar()
{
var coreTitleBar = CoreApplication.GetCurrentView().TitleBar;
coreTitleBar.ExtendViewIntoTitleBar = true;
var titleBar = ApplicationView.GetForCurrentView().TitleBar;
titleBar.ForegroundColor = Colors.White;
titleBar.BackgroundColor = Colors.Transparent;
titleBar.ButtonForegroundColor = Colors.White;
titleBar.ButtonBackgroundColor = Colors.Transparent;
titleBar.InactiveBackgroundColor = Colors.Transparent;
}
}
}
================================================
FILE: Flutter.Shell.UWP/Properties/AssemblyInfo.cs
================================================
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Flutter.Shell.UWP")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Flutter.Shell.UWP")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: ComVisible(false)]
================================================
FILE: Flutter.Shell.UWP/Properties/Flutter.Shell.UWP.rd.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<!--
This file contains Runtime Directives, specifications about types your application accesses
through reflection and other dynamic code patterns. Runtime Directives are used to control the
.NET Native optimizer and ensure that it does not remove code accessed by your library. If your
library does not do any reflection, then you generally do not need to edit this file. However,
if your library reflects over types, especially types passed to it or derived from its types,
then you should write Runtime Directives.
The most common use of reflection in libraries is to discover information about types passed
to the library. Runtime Directives have three ways to express requirements on types passed to
your library.
1. Parameter, GenericParameter, TypeParameter, TypeEnumerableParameter
Use these directives to reflect over types passed as a parameter.
2. SubTypes
Use a SubTypes directive to reflect over types derived from another type.
3. AttributeImplies
Use an AttributeImplies directive to indicate that your library needs to reflect over
types or methods decorated with an attribute.
For more information on writing Runtime Directives for libraries, please visit
https://go.microsoft.com/fwlink/?LinkID=391919
-->
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Library Name="Flutter.Shell.UWP">
<!-- add directives for your library here -->
</Library>
</Directives>
================================================
FILE: Flutter.Shell.UWP/Themes/Generic.xaml
================================================
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Flutter.Shell.UWP"
xmlns:skia="using:SkiaSharp.Views.UWP">
<Color x:Key="CanvasColor">#0091ea</Color>
<SolidColorBrush x:Key="CanvasBrush" Color="{StaticResource CanvasColor}" />
<Style TargetType="local:FlutterCanvas" >
<Setter Property="Background" Value="{StaticResource CanvasBrush}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="local:FlutterCanvas">
<Grid
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Margin="{TemplateBinding Margin}"
Padding="{TemplateBinding Padding}">
<skia:SKXamlCanvas x:Name="Canvas" />
<ContentPresenter />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
================================================
FILE: Flutter.Shell.UWP/VisualStudioToolsManifest.xml
================================================
<FileList>
<File Reference="Flutter.Shell.UWP.dll">
<ToolboxItems VSCategory="Flutter Shell Tookit" BlendCategory="Flutter Shell Toolkit">
<Item Type="Flutter.Shell.UWP" />
</ToolboxItems>
</File>
</FileList>
================================================
FILE: FlutterBinding/Engine/Compositing/NativeScene.cs
================================================
using FlutterBinding.Flow.Layers;
using FlutterBinding.UI;
using SkiaSharp;
namespace FlutterBinding.Engine.Compositing
{
public class NativeScene
{
public static NativeScene Create(Layer rootLayer,
uint rasterizerTracingThreshold,
bool checkerboardRasterCacheImages,
bool checkerboardOffscreenLayers)
{
return new NativeScene(
rootLayer, rasterizerTracingThreshold,
checkerboardRasterCacheImages, checkerboardOffscreenLayers);
}
LayerTree m_layerTree;
public LayerTree TakeLayerTree()
{
return m_layerTree;
}
public NativeScene(Layer rootLayer,
uint rasterizerTracingThreshold,
bool checkerboardRasterCacheImages,
bool checkerboardOffscreenLayers)
{
m_layerTree = new LayerTree();
m_layerTree.set_root_layer(rootLayer);
m_layerTree.set_rasterizer_tracing_threshold(rasterizerTracingThreshold);
m_layerTree.set_checkerboard_raster_cache_images(
checkerboardRasterCacheImages);
m_layerTree.set_checkerboard_offscreen_layers(checkerboardOffscreenLayers);
}
public string ToImage(int width,
int height,
_Callback<SKImage> raw_image_callback)
{
if (raw_image_callback == null)
{
return "Image callback was invalid";
}
if (m_layerTree == null)
{
return "Scene did not contain a layer tree.";
}
if (width == 0 || height == 0)
{
return "Image dimensions for scene were invalid.";
}
// We can't create an image on this task runner because we don't have a
// graphics context. Even if we did, it would be slow anyway. Also, this
// thread owns the sole reference to the layer tree. So we flatten the layer
// tree into a picture and use that as the thread transport mechanism.
var picture_bounds = new SKSizeI(width, height);
var picture = m_layerTree.Flatten(new SKRect(0, 0, width, height));
if (picture == null)
{
// Already in Dart scope.
return "Could not flatten scene into a layer tree.";
}
// TODO: Call Callback to create actual image.
return string.Empty;
}
}
}
================================================
FILE: FlutterBinding/Engine/Compositing/NativeSceneBuilder.cs
================================================
using FlutterBinding.Engine.Painting;
using FlutterBinding.Flow.Layers;
using FlutterBinding.UI;
using SkiaSharp;
using System.Collections.Generic;
namespace FlutterBinding.Engine.Compositing
{
//https://github.com/flutter/engine/blob/master/lib/ui/compositing/scene_builder.h
//https://github.com/flutter/engine/blob/master/lib/ui/compositing/scene_builder.cc
public class NativeSceneBuilder
{
ContainerLayer root_layer_;
ContainerLayer current_layer_;
protected void Constructor() { }
protected void PushTransform(List<double> matrix4)
{
var sk_matrix = Matrix.ToSkMatrix(matrix4);
var layer = new TransformLayer();
layer.set_transform(sk_matrix);
PushLayer(layer);
}
protected NativeEngineLayer PushOffset(double dx, double dy)
{
SKMatrix sk_matrix = SKMatrix.MakeTranslation((float)dx, (float)dy);
var layer = new TransformLayer();
layer.set_transform(sk_matrix);
PushLayer(layer);
return NativeEngineLayer.MakeRetained(layer);
}
protected void PushClipRect(double left,
double right,
double top,
double bottom,
int clipBehavior)
{
var clipRect = new SKRect((float)left, (float)top, (float)right, (float)bottom);
var layer = new ClipRectLayer((Flow.Layers.Clip)clipBehavior);
layer.set_clip_rect(clipRect);
PushLayer(layer);
}
protected void PushClipPath(SKPath path, int clipBehavior)
{
// FML_DCHECK(clip_behavior != flow::Clip::none);
var layer = new ClipPathLayer((Flow.Layers.Clip)clipBehavior);
layer.set_clip_path(path);
PushLayer(layer);
}
protected void PushLayer(ContainerLayer layer)
{
if (root_layer_ == null)
{
root_layer_ = layer;
current_layer_ = root_layer_;
return;
}
if (current_layer_ == null)
{
return;
}
ContainerLayer newLayer = layer;
current_layer_.Add(layer);
current_layer_ = newLayer;
}
//Flow.SkiaUnrefQueue _queue = new Flow.SkiaUnrefQueue();
public void AddPicture(double dx, double dy, SKPicture picture, int hints)
{
if (current_layer_ == null)
{
return;
}
SKPoint offset = new SKPoint((float)dx, (float)dy);
SKRect pictureRect = picture.CullRect;
pictureRect.Offset(offset.X, offset.Y);
var layer = new PictureLayer();
layer.set_offset(offset);
layer.set_picture(picture);
layer.set_is_complex((hints & 1) == 1);
layer.set_will_change((hints & 2) == 2);
current_layer_.Add(layer);
}
public void Pop()
{
if (current_layer_ == null)
{
return;
}
current_layer_ = current_layer_.parent();
}
uint rasterizer_tracing_threshold_ = 0;
bool checkerboard_raster_cache_images_ = false;
bool checkerboard_offscreen_layers_ = false;
public Scene Build()
{
var scene = new Scene(root_layer_, rasterizer_tracing_threshold_,
checkerboard_raster_cache_images_, checkerboard_offscreen_layers_);
return scene;
}
}
}
================================================
FILE: FlutterBinding/Engine/Engine.cs
================================================
using FlutterBinding.Flow.Layers;
using SkiaSharp;
namespace FlutterBinding.Engine
{
public class Engine
{
Engine() { }
static Engine _instance;
public static Engine Instance => _instance ?? (_instance = new Engine());
SKCanvas _canvas;
public void LoadCanvas(SKCanvas canvas)
{
_canvas = canvas;
}
double _physicalWidth;
double _physicalHeight;
public void SetSize(double physicalWidth, double physicalHeight)
{
_physicalWidth = physicalWidth;
_physicalHeight = physicalHeight;
}
public void Render(LayerTree layer_tree)
{
if (layer_tree == null)
return;
SKSizeI frame_size = new SKSizeI((int)_physicalWidth,
(int)_physicalHeight);
if (frame_size.IsEmpty)
return;
layer_tree.set_frame_size(frame_size);
var picture = layer_tree.Flatten(new SKRect(0, 0, frame_size.Width, frame_size.Height));
_canvas.DrawPicture(picture);
}
}
}
================================================
FILE: FlutterBinding/Engine/Painting/Matrix.cs
================================================
using SkiaSharp;
using System.Collections.Generic;
using System.Linq;
namespace FlutterBinding.Engine.Painting
{
public class Matrix
{
// Mappings from SkMatrix-index to input-index.
static int[] kSkMatrixIndexToMatrix4Index = new int[] {
// clang-format off
0, 4, 12,
1, 5, 13,
3, 7, 15,
// clang-format on
};
public static SKMatrix ToSkMatrix(List<float> matrix4)
{
return ToSkMatrix(matrix4.Cast<double>().ToList());
}
public static SKMatrix ToSkMatrix(List<double> matrix4)
{
SKMatrix sk_matrix = new SKMatrix();
for (int i = 0; i < 9; ++i)
{
int matrix4_index = kSkMatrixIndexToMatrix4Index[i];
if (matrix4_index < matrix4.Count)
sk_matrix.Values[i] = (float)matrix4[matrix4_index];
else
sk_matrix.Values[i] = 0.0f;
}
return sk_matrix;
}
}
}
================================================
FILE: FlutterBinding/Engine/Painting/NativeCanvas.cs
================================================
using SkiaSharp;
using System;
using System.Collections.Generic;
using System.Text;
namespace FlutterBinding.Engine.Painting
{
public class NativeCanvas : SKCanvas
{
public NativeCanvas(SKBitmap bitmap) : base(bitmap) { }
public SKCanvas RecordingCanvas { get; set; }
public void Constructor(SKPictureRecorder recorder,
double left,
double top,
double right,
double bottom)
{
var canvas = recorder.BeginRecording(new SKRect((float)left, (float)top, (float)right, (float)bottom));
RecordingCanvas = canvas;
}
}
}
================================================
FILE: FlutterBinding/Engine/Painting/NativeCodec.cs
================================================
using FlutterBinding.UI;
using SkiaSharp;
using System.Collections.Generic;
namespace FlutterBinding.Engine.Painting
{
public static class NativeCodec
{
public static string InstantiateImageCodec(List<int> list, _Callback<SKCodec> callback, _ImageInfo imageInfo, double decodedCacheRatioCap)
{
return null;
}
public static SKImage GetImage(this SKCodecFrameInfo info, SKCodec codec)
{
return SKImage.Create(codec.Info);
}
}
}
================================================
FILE: FlutterBinding/Engine/Painting/NativeEngineLayer.cs
================================================
using FlutterBinding.Flow.Layers;
namespace FlutterBinding.Engine.Painting
{
//https://github.com/flutter/engine/blob/master/lib/ui/painting/engine_layer.h
//https://github.com/flutter/engine/blob/master/lib/ui/painting/engine_layer.cc
public class NativeEngineLayer
{
public static NativeEngineLayer MakeRetained(ContainerLayer layer)
{
return new NativeEngineLayer(layer);
}
ContainerLayer _layer;
NativeEngineLayer(ContainerLayer layer)
{
_layer = layer;
}
}
}
================================================
FILE: FlutterBinding/Engine/Painting/NativePath.cs
================================================
using SkiaSharp;
namespace FlutterBinding.Engine.Painting
{
public class NativePath: SKPath
{
}
}
================================================
FILE: FlutterBinding/Engine/Painting/NativePathMetric.cs
================================================
using SkiaSharp;
namespace FlutterBinding.Engine.Painting
{
public class NativePathMetric: SKPathMeasure
{
public NativePathMetric(SKPath path, bool forceClosed = false, float resScale = 1) : base(path, forceClosed, resScale)
{ }
}
}
================================================
FILE: FlutterBinding/Engine/Painting/NativePicture.cs
================================================
using SkiaSharp;
using System;
using System.Collections.Generic;
using System.Text;
namespace FlutterBinding.Engine.Painting
{
//public class NativePicture: SKPicture
//{
//}
}
================================================
FILE: FlutterBinding/Engine/Painting/NativePictureRecorder.cs
================================================
using SkiaSharp;
namespace FlutterBinding.Engine.Painting
{
public class NativePictureRecorder: SKPictureRecorder
{
protected SKCanvas Canvas;
public void SetCanvas(SKCanvas canvas)
=> this.Canvas = canvas;
}
}
================================================
FILE: FlutterBinding/Engine/Text/NativeParagraph.cs
================================================
using FlutterBinding.Engine.Painting;
using SkiaSharp;
namespace FlutterBinding.Engine.Text
{
public class NativeParagraph
{
public string Text { get; set; }
// Temporary, to use for all text, until SkiaSharp can be updated
SKPaint _paint = new SKPaint
{
Color = SKColors.Black,
IsAntialias = true,
Style = SKPaintStyle.Fill,
TextAlign = SKTextAlign.Center,
TextSize = 24
};
public void Paint(SKCanvas canvas, double x, double y)
{
canvas.DrawText(this.Text, (float)x, (float)y, _paint);
}
double _width;
public void Layout(double width)
{
_width = width;
}
public float Width => _paint.MeasureText(Text);
public float Height => 24;
}
}
================================================
FILE: FlutterBinding/Engine/Text/NativeParagraphBuilder.cs
================================================
using FlutterBinding.UI;
using System;
using System.Collections.Generic;
using System.Text;
namespace FlutterBinding.Engine.Text
{
// https://github.com/flutter/engine/blob/master/lib/ui/text/paragraph_builder.h
// https://github.com/flutter/engine/blob/master/lib/ui/text/paragraph_builder.cc
public class NativeParagraphBuilder
{
// TextStyle
const int tsColorIndex = 1;
const int tsTextDecorationIndex = 2;
const int tsTextDecorationColorIndex = 3;
const int tsTextDecorationStyleIndex = 4;
const int tsFontWeightIndex = 5;
const int tsFontStyleIndex = 6;
const int tsTextBaselineIndex = 7;
const int tsFontFamilyIndex = 8;
const int tsFontSizeIndex = 9;
const int tsLetterSpacingIndex = 10;
const int tsWordSpacingIndex = 11;
const int tsHeightIndex = 12;
const int tsLocaleIndex = 13;
const int tsBackgroundIndex = 14;
const int tsForegroundIndex = 15;
const int tsTextShadowsIndex = 16;
const int tsColorMask = 1 << tsColorIndex;
const int tsTextDecorationMask = 1 << tsTextDecorationIndex;
const int tsTextDecorationColorMask = 1 << tsTextDecorationColorIndex;
const int tsTextDecorationStyleMask = 1 << tsTextDecorationStyleIndex;
const int tsFontWeightMask = 1 << tsFontWeightIndex;
const int tsFontStyleMask = 1 << tsFontStyleIndex;
const int tsTextBaselineMask = 1 << tsTextBaselineIndex;
const int tsFontFamilyMask = 1 << tsFontFamilyIndex;
const int tsFontSizeMask = 1 << tsFontSizeIndex;
const int tsLetterSpacingMask = 1 << tsLetterSpacingIndex;
const int tsWordSpacingMask = 1 << tsWordSpacingIndex;
const int tsHeightMask = 1 << tsHeightIndex;
const int tsLocaleMask = 1 << tsLocaleIndex;
const int tsBackgroundMask = 1 << tsBackgroundIndex;
const int tsForegroundMask = 1 << tsForegroundIndex;
const int tsTextShadowsMask = 1 << tsTextShadowsIndex;
// ParagraphStyle
const int psTextAlignIndex = 1;
const int psTextDirectionIndex = 2;
const int psFontWeightIndex = 3;
const int psFontStyleIndex = 4;
const int psMaxLinesIndex = 5;
const int psFontFamilyIndex = 6;
const int psFontSizeIndex = 7;
const int psLineHeightIndex = 8;
const int psEllipsisIndex = 9;
const int psLocaleIndex = 10;
const int psTextAlignMask = 1 << psTextAlignIndex;
const int psTextDirectionMask = 1 << psTextDirectionIndex;
const int psFontWeightMask = 1 << psFontWeightIndex;
const int psFontStyleMask = 1 << psFontStyleIndex;
const int psMaxLinesMask = 1 << psMaxLinesIndex;
const int psFontFamilyMask = 1 << psFontFamilyIndex;
const int psFontSizeMask = 1 << psFontSizeIndex;
const int psLineHeightMask = 1 << psLineHeightIndex;
const int psEllipsisMask = 1 << psEllipsisIndex;
const int psLocaleMask = 1 << psLocaleIndex;
// TextShadows decoding
const uint kColorDefault = 0xFF000000;
const uint kBytesPerShadow = 16;
const uint kShadowPropertiesCount = 4;
const uint kColorOffset = 0;
const uint kXOffset = 1;
const uint kYOffset = 2;
const uint kBlurOffset = 3;
//Txt.ParagraphBuilder m_paragraphBuilder;
protected NativeParagraphBuilder(List<int> encoded,
string fontFamily,
double fontSize,
double lineHeight,
string ellipsis,
string locale)
{
//int mask = encoded[0];
//Txt.ParagraphStyle style;
//if (mask & psTextAlignMask)
// style.text_align = TextAlign(encoded[psTextAlignIndex]);
//if (mask & psTextDirectionMask)
// style.text_direction = txt::TextDirection(encoded[psTextDirectionIndex]);
//if (mask & psFontWeightMask)
// style.font_weight =
// static_cast<txt::FontWeight>(encoded[psFontWeightIndex]);
//if (mask & psFontStyleMask)
// style.font_style = static_cast<txt::FontStyle>(encoded[psFontStyleIndex]);
//if (mask & psFontFamilyMask)
// style.font_family = fontFamily;
//if (mask & psFontSizeMask)
// style.font_size = fontSize;
//if (mask & psLineHeightMask)
// style.line_height = lineHeight;
//if (mask & psMaxLinesMask)
// style.max_lines = encoded[psMaxLinesIndex];
//if (mask & psEllipsisMask)
// style.ellipsis = ellipsis;
//if (mask & psLocaleMask)
// style.locale = locale;
//Txt.FontCollection font_collection =
// UIDartState::Current()->window()->client()->GetFontCollection();
//m_paragraphBuilder = new Txt.ParagraphBuilder(
// style, font_collection.GetFontCollection());
} // namespace blink
string _text = "";
protected string AddText(string text)
{
if (string.IsNullOrEmpty(text))
return null;
_text += text;
// TODO:
//m_paragraphBuilder->AddText(text);
return null;
}
public Paragraph Build()
{
return new Paragraph() { Text = _text };
}
}
}
================================================
FILE: FlutterBinding/Engine/Text/NativeParagraphStyle.cs
================================================
using System;
using System.Collections.Generic;
using System.Text;
namespace FlutterBinding.Engine.Text
{
public class NativeParagraphStyle
{
}
}
================================================
FILE: FlutterBinding/Engine/Window/NativeWindow.cs
================================================
using FlutterBinding.UI;
using System;
using System.Collections.Generic;
using System.Text;
namespace FlutterBinding.Engine.Window
{
public class NativeWindow
{
public void Render(Scene scene)
{
Engine.Instance.Render(scene.TakeLayerTree());
}
}
}
================================================
FILE: FlutterBinding/Flow/CompositorContext.cs
================================================
using FlutterBinding.Flow.Layers;
using SkiaSharp;
using static FlutterBinding.Flow.Helper;
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
namespace FlutterBinding.Flow
{
public class CompositorContext
{
public class ScopedFrame : System.IDisposable
{
public ScopedFrame(CompositorContext context, GRContext gr_context, SKCanvas canvas, ExternalViewEmbedder view_embedder, SKMatrix root_surface_transformation, bool instrumentation_enabled)
{
this.context_ = context;
this.gr_context_ = gr_context;
this.canvas_ = canvas;
this.view_embedder_ = view_embedder;
this.root_surface_transformation_ = root_surface_transformation;
this.instrumentation_enabled_ = instrumentation_enabled;
context_.BeginFrame(this, instrumentation_enabled_);
}
public virtual void Dispose()
{
context_.EndFrame(this, instrumentation_enabled_);
}
public SKCanvas canvas()
{
return canvas_;
}
public ExternalViewEmbedder view_embedder()
{
return view_embedder_;
}
public CompositorContext context()
{
return context_;
}
public SKMatrix root_surface_transformation()
{
return root_surface_transformation_;
}
public GRContext gr_context()
{
return gr_context_;
}
public virtual bool Raster(LayerTree layer_tree, bool ignore_raster_cache)
{
layer_tree.Preroll(this, ignore_raster_cache);
layer_tree.Paint(this, ignore_raster_cache);
return true;
}
private CompositorContext context_;
private GRContext gr_context_;
private SKCanvas canvas_;
private ExternalViewEmbedder view_embedder_;
private readonly SKMatrix root_surface_transformation_;
private readonly bool instrumentation_enabled_;
}
public virtual ScopedFrame AcquireFrame(GRContext gr_context, SKCanvas canvas, ExternalViewEmbedder view_embedder, SKMatrix root_surface_transformation, bool instrumentation_enabled)
{
return new ScopedFrame(this, gr_context, canvas, view_embedder, root_surface_transformation, instrumentation_enabled);
}
public void OnGRContextCreated()
{
texture_registry_.OnGRContextCreated();
raster_cache_.Clear();
}
public void OnGRContextDestroyed()
{
texture_registry_.OnGRContextDestroyed();
raster_cache_.Clear();
}
public RasterCache raster_cache()
{
return raster_cache_;
}
public TextureRegistry texture_registry()
{
return texture_registry_;
}
private RasterCache raster_cache_ = new RasterCache();
private TextureRegistry texture_registry_ = new TextureRegistry();
private void BeginFrame(ScopedFrame frame, bool enable_instrumentation)
{
}
private void EndFrame(ScopedFrame frame, bool enable_instrumentation)
{
raster_cache_.SweepAfterFrame()
gitextract_iyvtmmqi/
├── .gitattributes
├── .gitignore
├── AST/
│ ├── analyzer.dart
│ ├── comments.dart
│ ├── config.dart
│ ├── implementation/
│ │ ├── conditionals.dart
│ │ ├── exceptions.dart
│ │ ├── implementation.dart
│ │ ├── literals.dart
│ │ └── loops.dart
│ ├── naming.dart
│ ├── packageResolver.dart
│ ├── pubspec.yaml
│ ├── readme.md
│ ├── run.bat
│ ├── serialization.dart
│ ├── signature/
│ │ ├── classes.dart
│ │ ├── constructors.dart
│ │ ├── delegates.dart
│ │ ├── fields.dart
│ │ ├── frame.dart
│ │ ├── functions.dart
│ │ └── methods.dart
│ └── types.dart
├── CODE_OF_CONDUCT.md
├── Flutter.Sample.App/
│ ├── Flutter.Sample.App.csproj
│ └── MainPage.cs
├── Flutter.Sample.Droid/
│ ├── Assets/
│ │ └── AboutAssets.txt
│ ├── Flutter.Sample.Droid.csproj
│ ├── MainActivity.cs
│ ├── Properties/
│ │ ├── AndroidManifest.xml
│ │ └── AssemblyInfo.cs
│ └── Resources/
│ ├── layout/
│ │ └── activity_main.axml
│ ├── mipmap-anydpi-v26/
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ └── values/
│ ├── Strings.xml
│ ├── colors.xml
│ ├── ic_launcher_background.xml
│ └── styles.xml
├── Flutter.Sample.UWP/
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── Flutter.Sample.UWP.csproj
│ ├── Flutter.Sample.UWP_TemporaryKey.pfx
│ ├── MainPage.xaml
│ ├── MainPage.xaml.cs
│ ├── Package.appxmanifest
│ └── Properties/
│ ├── AssemblyInfo.cs
│ └── Default.rd.xml
├── Flutter.Shell.Droid/
│ ├── Flutter.Shell.Droid.csproj
│ ├── FlutterCanvas.cs
│ ├── Properties/
│ │ └── AssemblyInfo.cs
│ └── Resources/
│ ├── layout/
│ │ └── FlutterPage.axml
│ └── values/
│ └── Strings.xml
├── Flutter.Shell.UWP/
│ ├── Flutter.Shell.UWP.csproj
│ ├── FlutterCanvas.cs
│ ├── FlutterPage.xaml
│ ├── FlutterPage.xaml.cs
│ ├── Properties/
│ │ ├── AssemblyInfo.cs
│ │ └── Flutter.Shell.UWP.rd.xml
│ ├── Themes/
│ │ └── Generic.xaml
│ └── VisualStudioToolsManifest.xml
├── FlutterBinding/
│ ├── Engine/
│ │ ├── Compositing/
│ │ │ ├── NativeScene.cs
│ │ │ └── NativeSceneBuilder.cs
│ │ ├── Engine.cs
│ │ ├── Painting/
│ │ │ ├── Matrix.cs
│ │ │ ├── NativeCanvas.cs
│ │ │ ├── NativeCodec.cs
│ │ │ ├── NativeEngineLayer.cs
│ │ │ ├── NativePath.cs
│ │ │ ├── NativePathMetric.cs
│ │ │ ├── NativePicture.cs
│ │ │ └── NativePictureRecorder.cs
│ │ ├── Text/
│ │ │ ├── NativeParagraph.cs
│ │ │ ├── NativeParagraphBuilder.cs
│ │ │ └── NativeParagraphStyle.cs
│ │ └── Window/
│ │ └── NativeWindow.cs
│ ├── Flow/
│ │ ├── CompositorContext.cs
│ │ ├── EmbeddedViews.cs
│ │ ├── GlobalMembers.cs
│ │ ├── Helper.cs
│ │ ├── Layers/
│ │ │ ├── BackdropFilterLayer.cs
│ │ │ ├── ChildSceneLayer.cs
│ │ │ ├── ClipPathLayer.cs
│ │ │ ├── ClipRRectLayer.cs
│ │ │ ├── ClipRectLayer.cs
│ │ │ ├── ColorFilterLayer.cs
│ │ │ ├── ContainerLayer.cs
│ │ │ ├── LayerTree.cs
│ │ │ ├── OpacityLayer.cs
│ │ │ ├── PhysicalShapeLayer.cs
│ │ │ ├── PictureLayer.cs
│ │ │ ├── PlatformViewLayer.cs
│ │ │ ├── ShaderMaskLayer.cs
│ │ │ ├── TextureLayer.cs
│ │ │ └── TransformLayer.cs
│ │ ├── MatrixDecomposition.cs
│ │ ├── PaintUtils.cs
│ │ ├── RasterCache.cs
│ │ ├── RasterCacheKey.cs
│ │ ├── layers/
│ │ │ └── layer.cs
│ │ └── texture.cs
│ ├── FlutterBinding.csproj
│ ├── Mapping/
│ │ ├── Future.cs
│ │ ├── Helper.cs
│ │ └── Types.cs
│ ├── Minikin/
│ │ ├── Arrays.cs
│ │ ├── CmapCoverage.cs
│ │ ├── CmapCoverage.h.cs
│ │ ├── DefineConstants.cs
│ │ ├── Emoji.cs
│ │ ├── Emoji.h.cs
│ │ ├── FontCollection.cs
│ │ ├── FontCollection.h.cs
│ │ ├── FontFamily.cs
│ │ ├── FontFamily.h.cs
│ │ ├── FontLanguage.cs
│ │ ├── FontLanguageListCache.cs
│ │ ├── FontUtils.cs
│ │ ├── GlobalMembers.cs
│ │ ├── GraphemeBreak.cs
│ │ ├── GraphemeBreak.h.cs
│ │ ├── HbFontCache.cs
│ │ ├── Hyphenator.cs
│ │ ├── Layout.cs
│ │ ├── Layout.h.cs
│ │ ├── LayoutUtils.cs
│ │ ├── LineBreaker.cs
│ │ ├── LineBreaker.h.cs
│ │ ├── Measurement.cs
│ │ ├── Measurement.h.cs
│ │ ├── MinikinFont.cs
│ │ ├── MinikinFont.h.cs
│ │ ├── MinikinInternal.cs
│ │ ├── SparseBitSet.cs
│ │ ├── SparseBitSet.h.cs
│ │ ├── StringFunctions.cs
│ │ ├── WordBreaker.cs
│ │ ├── WordBreaker.h.cs
│ │ ├── minikin.Hyphenator.cs
│ │ ├── minikin.SparseBitSet.cs
│ │ └── minikin.android.cs
│ ├── Txt/
│ │ ├── DefineConstants.cs
│ │ ├── GlobalMembers.cs
│ │ ├── SkTextBlob.cs
│ │ ├── asset_font_manager.cs
│ │ ├── font_asset_provider.cs
│ │ ├── font_collection.cs
│ │ ├── font_skia.cs
│ │ ├── font_style.cs
│ │ ├── font_weight.cs
│ │ ├── paint_record.cs
│ │ ├── paragraph.cs
│ │ ├── paragraph_builder.cs
│ │ ├── paragraph_style.cs
│ │ ├── platform.cs
│ │ ├── platform_android.cs
│ │ ├── styled_runs.cs
│ │ ├── text_baseline.cs
│ │ ├── text_decoration.cs
│ │ ├── text_shadow.cs
│ │ ├── text_style.cs
│ │ └── typeface_font_asset_provider.cs
│ └── UI/
│ ├── Compositing.cs
│ ├── FlutterSurface.cs
│ ├── Geometry.cs
│ ├── Hooks.cs
│ ├── ICanvas.cs
│ ├── Lerp.cs
│ ├── NativeFieldWrapperClass2.cs
│ ├── Painting.cs
│ ├── Pointer.cs
│ ├── Semantics.cs
│ ├── Text.cs
│ └── Window.cs
├── FlutterBindingSample/
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── FlutterBindingSample.csproj
│ ├── FlutterBindingSample_TemporaryKey.pfx
│ ├── MainPage.xaml
│ ├── MainPage.xaml.cs
│ ├── Package.appxmanifest
│ └── Properties/
│ ├── AssemblyInfo.cs
│ └── Default.rd.xml
├── FlutterSDK/
│ ├── FlutterSDK.csproj
│ └── Mappings/
│ └── Global.cs
├── LICENSE
├── README.md
├── TRANSPILER_README.md
├── Xamarin.Flutter.sln
└── testbed/
└── test.dart
SYMBOL INDEX (1506 symbols across 118 files)
FILE: AST/analyzer.dart
function main (line 20) | main()
function dirContents (line 82) | Future<List<FileSystemEntity>> dirContents(Directory directory)
FILE: AST/comments.dart
class Comments (line 3) | class Comments {
method appendComment (line 4) | void appendComment(StringBuffer buffer, Element element)
FILE: AST/config.dart
class Config (line 3) | class Config {
FILE: AST/implementation/conditionals.dart
class Conditionals (line 4) | class Conditionals {
method processConditionalExpression (line 5) | String processConditionalExpression(ConditionalExpression expression)
method processSwitchStatement (line 14) | String processSwitchStatement(SwitchStatement statement)
method processSwitchCase (line 24) | String processSwitchCase(SwitchCase switchCase)
method processSwitchDefault (line 34) | String processSwitchDefault(SwitchDefault switchDefault)
method processContinueStatement (line 44) | String processContinueStatement(ContinueStatement statement)
method processIfStatement (line 54) | String processIfStatement(IfStatement statement)
FILE: AST/implementation/exceptions.dart
class Exceptions (line 4) | class Exceptions {
method processTryStatement (line 5) | String processTryStatement(TryStatement statement)
method processThrowExpression (line 13) | String processThrowExpression(ThrowExpression expression)
method processCatchClause (line 21) | String processCatchClause(CatchClause clause)
FILE: AST/implementation/implementation.dart
class Implementation (line 15) | class Implementation {
method MethodBody (line 16) | String MethodBody(FunctionBody body)
method processExpressionFunction (line 40) | String processExpressionFunction(ExpressionFunctionBody body)
method processBlockFunction (line 49) | String processBlockFunction(BlockFunctionBody body)
method processCastMap (line 67) | String processCastMap(SyntacticEntity entity)
method processEntity (line 82) | String processEntity(SyntacticEntity entity)
method processPropertyAccess (line 231) | String processPropertyAccess(PropertyAccess access)
method processFunctionDeclaration (line 239) | String processFunctionDeclaration(FunctionDeclaration declaration)
method processFunctionExpressionInvocation (line 247) | String processFunctionExpressionInvocation(
method processExpressionFunctionBody (line 256) | String processExpressionFunctionBody(ExpressionFunctionBody body)
method processTypeArgumentList (line 264) | String processTypeArgumentList(TypeArgumentList list)
method processBlockFunctionBody (line 281) | String processBlockFunctionBody(BlockFunctionBody body)
method processSimpleFormalParameter (line 289) | String processSimpleFormalParameter(SimpleFormalParameter parameter)
method processFormalParameterList (line 293) | String processFormalParameterList(FormalParameterList list)
method processAdjacentString (line 308) | String processAdjacentString(AdjacentStrings string)
method processDeclaredIdentifier (line 319) | String processDeclaredIdentifier(DeclaredIdentifier identifier)
method processLabel (line 327) | String processLabel(Label label)
method processPrefixExpression (line 338) | String processPrefixExpression(PrefixExpression expression)
method processFunctionExpression (line 346) | String processFunctionExpression(FunctionExpression expression)
method processIndexExpression (line 356) | String processIndexExpression(IndexExpression expression)
method processIsExpression (line 366) | String processIsExpression(IsExpression expression)
method processCascadeExpression (line 389) | String processCascadeExpression(CascadeExpression expression)
method processFunctionDeclarationStatement (line 400) | String processFunctionDeclarationStatement(
method processYieldStatement (line 409) | String processYieldStatement(YieldStatement statement)
method processPostfixExpression (line 417) | String processPostfixExpression(PostfixExpression expression)
method processAsExpression (line 425) | String processAsExpression(AsExpression expression)
method processNamedExpression (line 433) | String processNamedExpression(NamedExpression expression)
method processBlock (line 444) | String processBlock(Block block)
method processToken (line 452) | String processToken(KeywordToken keyword)
method processVariableDeclaration (line 466) | String processVariableDeclaration(VariableDeclaration declaration)
method processSuperExpression (line 474) | String processSuperExpression(SuperExpression expression)
method processAwaitExpression (line 482) | String processAwaitExpression(AwaitExpression expression)
method processThisExpression (line 490) | String processThisExpression(ThisExpression expression)
method processArgumentList (line 498) | String processArgumentList(ArgumentList list)
method processParenthesizedExpression (line 509) | String processParenthesizedExpression(
method processInstanceCreationExpression (line 518) | String processInstanceCreationExpression(
method processConstructorName (line 533) | String processConstructorName(ConstructorName name)
method processBinaryExpression (line 541) | String processBinaryExpression(BinaryExpression expression)
method processReturnStatement (line 560) | String processReturnStatement(ReturnStatement statement)
method processMethodInvocation (line 568) | String processMethodInvocation(MethodInvocation invocation)
method processSimpleIdentifier (line 603) | String processSimpleIdentifier(SimpleIdentifier identifier)
method processPrefixedIdentifier (line 647) | String processPrefixedIdentifier(PrefixedIdentifier identifier)
method processMethodElement (line 655) | String processMethodElement(MethodElement element)
method processFunctionElement (line 666) | String processFunctionElement(FunctionElement element)
method processPropertyAccessorElement (line 670) | String processPropertyAccessorElement(
method processStringInterpolation (line 690) | String processStringInterpolation(StringInterpolation interpolation)
method processInterpolationExpression (line 713) | String processInterpolationExpression(
method processExpressionStatement (line 722) | String processExpressionStatement(ExpressionStatement statement)
method processAssignmentExpression (line 732) | String processAssignmentExpression(AssignmentExpression expression)
method processVariableDeclarationStatement (line 756) | String processVariableDeclarationStatement(
method processVariableDeclarationList (line 767) | String processVariableDeclarationList(VariableDeclarationList list)
method processTypeName (line 785) | String processTypeName(TypeName name)
method fieldBody (line 793) | String fieldBody(PropertyAccessorElement element)
method functionBody (line 808) | String functionBody(FunctionElement element)
FILE: AST/implementation/literals.dart
class Literals (line 4) | class Literals {
method processNullLiteral (line 5) | String processNullLiteral(NullLiteral literal)
method processDoubleLiteral (line 13) | String processDoubleLiteral(DoubleLiteral literal)
method processBooleanLiteral (line 21) | String processBooleanLiteral(BooleanLiteral literal)
method processIntegerLiteral (line 29) | String processIntegerLiteral(IntegerLiteral literal)
method processMapLiteral (line 37) | String processMapLiteral(MapLiteral literal)
method processMapLiteralEntry (line 45) | String processMapLiteralEntry(MapLiteralEntry entry)
method processSimpleStringLiteral (line 56) | String processSimpleStringLiteral(SimpleStringLiteral literal)
method processListLiteral (line 68) | String processListLiteral(ListLiteral literal)
FILE: AST/implementation/loops.dart
class Loops (line 4) | class Loops {
method processForStatement (line 5) | String processForStatement(ForStatement statement)
method processWhileStatement (line 13) | String processWhileStatement(WhileStatement statement)
method processDoStatement (line 21) | String processDoStatement(DoStatement statement)
method processForEachStatement (line 29) | String processForEachStatement(ForEachStatement statement)
FILE: AST/naming.dart
class Naming (line 9) | class Naming {
method namespacePartsFromIdentifier (line 10) | List<String> namespacePartsFromIdentifier(String identifier)
method namespaceFromIdentifier (line 24) | String namespaceFromIdentifier(String identifier)
method nameWithTypeArguments (line 30) | String nameWithTypeArguments(
method interfaceTypeName (line 54) | String interfaceTypeName(InterfaceType type)
method nameWithTypeParameters (line 68) | String nameWithTypeParameters(
method parameterTypeWithTypeParameters (line 84) | String parameterTypeWithTypeParameters(
method getReturnType (line 99) | String getReturnType(FunctionTypedElement element)
method className (line 133) | String className(InterfaceType type)
method tokenToText (line 144) | String tokenToText(Token token, bool backwards)
method getTypeParameterName (line 160) | String getTypeParameterName(TypeParameterElement element)
method getFormattedTypeName (line 172) | String getFormattedTypeName(String typeName)
method getFormattedName (line 234) | String getFormattedName(String originalName, NameStyle style)
method lowerCamelCase (line 279) | String lowerCamelCase(String name)
method upperCamelCase (line 293) | String upperCamelCase(String name)
method escapeFixedWords (line 307) | String escapeFixedWords(String word)
method DefaultClassName (line 325) | String DefaultClassName(CompilationUnitElement element)
method getTopLevelVariableName (line 335) | String getTopLevelVariableName(TopLevelVariableElement element)
type NameStyle (line 342) | enum NameStyle {
type NameType (line 348) | enum NameType { Name, Type }
type VariableType (line 350) | enum VariableType { Field, Parameter }
FILE: AST/packageResolver.dart
function packageResolver (line 14) | PackageMapUriResolver packageResolver(
function embeddedResolver (line 25) | EmbedderSdk embeddedResolver(ResourceProvider provider, String projectFo...
function _findPackages (line 38) | _PackageInfo _findPackages(ResourceProvider provider, String projectFolder)
function _getPackageMap (line 58) | Map<String, List<file_system.Folder>> _getPackageMap(
class _PackageInfo (line 74) | class _PackageInfo {
FILE: AST/serialization.dart
type Serializer (line 32) | typedef Serializer(value, {bool primitiveOnly});
function _findGetters (line 34) | List<Symbol> _findGetters(ClassMirror classMirror)
function serialize (line 50) | serialize(value, Serializer serializer, {bool primitiveOnly = false})
function _isPrimitive (line 71) | bool _isPrimitive(value)
function serializeModel (line 76) | String serializeModel(value)
function serializeObject (line 82) | serializeObject(value, {bool primitiveOnly = false})
function serializeNonPrimitiveObject (line 100) | serializeNonPrimitiveObject(value)
function serializeMap (line 105) | Map serializeMap(Map value)
FILE: AST/signature/classes.dart
class Classes (line 10) | class Classes {
method printClass (line 11) | String printClass(ClassElement element)
method interfaceFieldAndMethods (line 79) | String interfaceFieldAndMethods(InterfaceType interface, ClassElement ...
method printFieldsAndMethods (line 116) | void printFieldsAndMethods(StringBuffer code, ClassElement element,
method printMixin (line 137) | String printMixin(ClassElement element)
method printInterface (line 259) | String printInterface(ClassElement element)
FILE: AST/signature/constructors.dart
class Constructors (line 11) | class Constructors {
method printConstructor (line 12) | void printConstructor(
method getBaseParameters (line 81) | String getBaseParameters(ConstructorElement constructor)
FILE: AST/signature/delegates.dart
class Delegates (line 6) | class Delegates {
method printDelegate (line 7) | String printDelegate(FunctionTypeAliasElement element)
FILE: AST/signature/fields.dart
class Fields (line 10) | class Fields {
method containsGenericPart (line 11) | bool containsGenericPart(DartType type)
method getBaseFieldInClass (line 24) | FieldElement getBaseFieldInClass(FieldElement element)
method printField (line 51) | String printField(FieldElement element)
method printImplementedField (line 105) | String printImplementedField(
method getFieldSignature (line 167) | String getFieldSignature(FieldElement element)
method printTypeAndName (line 193) | String printTypeAndName(FieldElement element, {String interfaceName = ...
method printImplementedTypeAndName (line 203) | String printImplementedTypeAndName(
method getFieldName (line 213) | String getFieldName(FieldElement element)
FILE: AST/signature/frame.dart
class Frame (line 11) | class Frame {
method printNamespace (line 12) | String printNamespace(
method printImports (line 72) | String printImports(CompilationUnitElement element)
method AddImport (line 98) | void AddImport(LibraryElement import, List<String> allImports)
method printEnum (line 137) | String printEnum(ClassElement element)
FILE: AST/signature/functions.dart
class Functions (line 8) | class Functions {
method printFunction (line 9) | String printFunction(FunctionElement element)
method methodSignature (line 21) | String methodSignature(ExecutableElement element)
FILE: AST/signature/methods.dart
class Methods (line 9) | class Methods {
method isSameSignature (line 10) | bool isSameSignature(MethodElement m1, MethodElement m2)
method overridesBaseMethod (line 14) | bool overridesBaseMethod(MethodElement method, ClassElement element)
method getBaseMethodInClass (line 21) | MethodElement getBaseMethodInClass(MethodElement element)
method overridesParentBaseMethod (line 45) | bool overridesParentBaseMethod(
method printMethod (line 54) | String printMethod(MethodElement element, bool isOverride,
method typesDifferent (line 106) | bool typesDifferent(
method printImplementedMethod (line 123) | String printImplementedMethod(
method containsGenericPart (line 159) | bool containsGenericPart(DartType type)
method getMethodName (line 168) | String getMethodName(MethodElement element)
method methodSignature (line 183) | String methodSignature(
method printAutoParameters (line 231) | String printAutoParameters(
method printParameterNames (line 250) | String printParameterNames(FunctionTypedElement element)
method printParameter (line 261) | String printParameter(FunctionTypedElement method,
FILE: AST/types.dart
class Types (line 14) | class Types {
method getDartTypeName (line 15) | String getDartTypeName(DartType type)
method getVariableType (line 37) | String getVariableType(VariableElement element, VariableType type)
method addNamespace (line 69) | String addNamespace(DartType type, String typeName)
method handleFunctionType (line 110) | String handleFunctionType(FunctionTypeImpl elementType)
method getParameterType (line 189) | String getParameterType(
method getTypeFromComputedNodeEntities (line 222) | String getTypeFromComputedNodeEntities(ParameterElement parameter,
FILE: Flutter.Sample.Droid/MainActivity.cs
class MainActivity (line 9) | [Activity(Label = "@string/app_name", Theme = "@style/AppTheme", MainLau...
method OnCreate (line 12) | protected override void OnCreate(Bundle savedInstanceState)
FILE: Flutter.Sample.UWP/App.xaml.cs
class App (line 23) | sealed partial class App : Application
method App (line 29) | public App()
method OnLaunched (line 40) | protected override void OnLaunched(LaunchActivatedEventArgs e)
method OnNavigationFailed (line 81) | void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
method OnSuspending (line 93) | private void OnSuspending(object sender, SuspendingEventArgs e)
FILE: Flutter.Sample.UWP/MainPage.xaml.cs
class MainPage (line 23) | public sealed partial class MainPage
method MainPage (line 25) | public MainPage()
FILE: Flutter.Shell.Droid/FlutterCanvas.cs
class FlutterCanvas (line 8) | public class FlutterCanvas : AppCompatActivity
method OnCreate (line 13) | protected override void OnCreate(Bundle savedInstanceState)
method OnCanvasPaintSurface (line 30) | private void OnCanvasPaintSurface(object sender, SKPaintSurfaceEventAr...
method OnDestroy (line 35) | protected override void OnDestroy()
FILE: Flutter.Shell.UWP/FlutterCanvas.cs
class FlutterCanvas (line 11) | public sealed class FlutterCanvas : ContentControl
method FlutterCanvas (line 18) | public FlutterCanvas()
method OnApplyTemplate (line 25) | protected override void OnApplyTemplate()
method OnCanvasOnPaintSurface (line 43) | private void OnCanvasOnPaintSurface(object s, SKPaintSurfaceEventArgs ...
method OnContentChanged (line 49) | protected override void OnContentChanged(object oldContent, object new...
method OnSizeChanged (line 60) | private void OnSizeChanged(object sender, SizeChangedEventArgs e)
FILE: Flutter.Shell.UWP/FlutterPage.xaml.cs
class FlutterPage (line 11) | public partial class FlutterPage
method FlutterPage (line 13) | public FlutterPage()
method HideTitleBar (line 19) | private static void HideTitleBar()
FILE: FlutterBinding/Engine/Compositing/NativeScene.cs
class NativeScene (line 7) | public class NativeScene
method Create (line 10) | public static NativeScene Create(Layer rootLayer,
method TakeLayerTree (line 23) | public LayerTree TakeLayerTree()
method NativeScene (line 28) | public NativeScene(Layer rootLayer,
method ToImage (line 41) | public string ToImage(int width,
FILE: FlutterBinding/Engine/Compositing/NativeSceneBuilder.cs
class NativeSceneBuilder (line 12) | public class NativeSceneBuilder
method Constructor (line 17) | protected void Constructor() { }
method PushTransform (line 19) | protected void PushTransform(List<double> matrix4)
method PushOffset (line 27) | protected NativeEngineLayer PushOffset(double dx, double dy)
method PushClipRect (line 36) | protected void PushClipRect(double left,
method PushClipPath (line 48) | protected void PushClipPath(SKPath path, int clipBehavior)
method PushLayer (line 56) | protected void PushLayer(ContainerLayer layer)
method AddPicture (line 75) | public void AddPicture(double dx, double dy, SKPicture picture, int hi...
method Pop (line 92) | public void Pop()
method Build (line 104) | public Scene Build()
FILE: FlutterBinding/Engine/Engine.cs
class Engine (line 6) | public class Engine
method Engine (line 8) | Engine() { }
method LoadCanvas (line 13) | public void LoadCanvas(SKCanvas canvas)
method SetSize (line 20) | public void SetSize(double physicalWidth, double physicalHeight)
method Render (line 26) | public void Render(LayerTree layer_tree)
FILE: FlutterBinding/Engine/Painting/Matrix.cs
class Matrix (line 7) | public class Matrix
method ToSkMatrix (line 18) | public static SKMatrix ToSkMatrix(List<float> matrix4)
method ToSkMatrix (line 23) | public static SKMatrix ToSkMatrix(List<double> matrix4)
FILE: FlutterBinding/Engine/Painting/NativeCanvas.cs
class NativeCanvas (line 8) | public class NativeCanvas : SKCanvas
method NativeCanvas (line 10) | public NativeCanvas(SKBitmap bitmap) : base(bitmap) { }
method Constructor (line 14) | public void Constructor(SKPictureRecorder recorder,
FILE: FlutterBinding/Engine/Painting/NativeCodec.cs
class NativeCodec (line 7) | public static class NativeCodec
method InstantiateImageCodec (line 9) | public static string InstantiateImageCodec(List<int> list, _Callback<S...
method GetImage (line 14) | public static SKImage GetImage(this SKCodecFrameInfo info, SKCodec codec)
FILE: FlutterBinding/Engine/Painting/NativeEngineLayer.cs
class NativeEngineLayer (line 8) | public class NativeEngineLayer
method MakeRetained (line 11) | public static NativeEngineLayer MakeRetained(ContainerLayer layer)
method NativeEngineLayer (line 17) | NativeEngineLayer(ContainerLayer layer)
FILE: FlutterBinding/Engine/Painting/NativePath.cs
class NativePath (line 5) | public class NativePath: SKPath
FILE: FlutterBinding/Engine/Painting/NativePathMetric.cs
class NativePathMetric (line 5) | public class NativePathMetric: SKPathMeasure
method NativePathMetric (line 7) | public NativePathMetric(SKPath path, bool forceClosed = false, float r...
FILE: FlutterBinding/Engine/Painting/NativePictureRecorder.cs
class NativePictureRecorder (line 5) | public class NativePictureRecorder: SKPictureRecorder
method SetCanvas (line 9) | public void SetCanvas(SKCanvas canvas)
FILE: FlutterBinding/Engine/Text/NativeParagraph.cs
class NativeParagraph (line 6) | public class NativeParagraph
method Paint (line 20) | public void Paint(SKCanvas canvas, double x, double y)
method Layout (line 26) | public void Layout(double width)
FILE: FlutterBinding/Engine/Text/NativeParagraphBuilder.cs
class NativeParagraphBuilder (line 11) | public class NativeParagraphBuilder
method NativeParagraphBuilder (line 152) | protected NativeParagraphBuilder(List<int> encoded,
method AddText (line 237) | protected string AddText(string text)
method Build (line 250) | public Paragraph Build()
FILE: FlutterBinding/Engine/Text/NativeParagraphStyle.cs
class NativeParagraphStyle (line 7) | public class NativeParagraphStyle
FILE: FlutterBinding/Engine/Window/NativeWindow.cs
class NativeWindow (line 8) | public class NativeWindow
method Render (line 11) | public void Render(Scene scene)
FILE: FlutterBinding/Flow/CompositorContext.cs
class CompositorContext (line 11) | public class CompositorContext
class ScopedFrame (line 13) | public class ScopedFrame : System.IDisposable
method ScopedFrame (line 15) | public ScopedFrame(CompositorContext context, GRContext gr_context, ...
method Dispose (line 26) | public virtual void Dispose()
method canvas (line 31) | public SKCanvas canvas()
method view_embedder (line 36) | public ExternalViewEmbedder view_embedder()
method context (line 41) | public CompositorContext context()
method root_surface_transformation (line 46) | public SKMatrix root_surface_transformation()
method gr_context (line 51) | public GRContext gr_context()
method Raster (line 56) | public virtual bool Raster(LayerTree layer_tree, bool ignore_raster_...
method AcquireFrame (line 71) | public virtual ScopedFrame AcquireFrame(GRContext gr_context, SKCanvas...
method OnGRContextCreated (line 76) | public void OnGRContextCreated()
method OnGRContextDestroyed (line 82) | public void OnGRContextDestroyed()
method raster_cache (line 88) | public RasterCache raster_cache()
method texture_registry (line 93) | public TextureRegistry texture_registry()
method BeginFrame (line 101) | private void BeginFrame(ScopedFrame frame, bool enable_instrumentation)
method EndFrame (line 105) | private void EndFrame(ScopedFrame frame, bool enable_instrumentation)
FILE: FlutterBinding/Flow/EmbeddedViews.cs
class EmbeddedViewParams (line 12) | public class EmbeddedViewParams
class ExternalViewEmbedder (line 21) | public class ExternalViewEmbedder
method CompositeEmbeddedView (line 25) | public virtual void CompositeEmbeddedView(ulong view_id, EmbeddedViewP...
FILE: FlutterBinding/Flow/GlobalMembers.cs
class GlobalMembers (line 7) | public static class GlobalMembers
method UnitFrameInterval (line 21) | internal static double UnitFrameInterval(double frame_time_ms)
method UnitHeight (line 26) | internal static double UnitHeight(double frame_time_ms, double max_uni...
method CanRasterizePicture (line 36) | internal static bool CanRasterizePicture(SKPicture picture)
method IsPictureWorthRasterizing (line 60) | internal static bool IsPictureWorthRasterizing(SKPicture picture, bool...
method Rasterize (line 88) | internal static RasterCacheResult Rasterize(GRContext context, SKMatri...
method RasterizePicture (line 125) | public static RasterCacheResult RasterizePicture(SKPicture picture, GR...
method ClampSize (line 135) | internal static int ClampSize(int value, int min, int max)
FILE: FlutterBinding/Flow/Helper.cs
class Helper (line 7) | public static class Helper
method TRACE_EVENT0 (line 10) | public static void TRACE_EVENT0(string source, string message)
method FML_DCHECK (line 13) | public static void FML_DCHECK(bool check)
FILE: FlutterBinding/Flow/Layers/BackdropFilterLayer.cs
class BackdropFilterLayer (line 11) | public class BackdropFilterLayer : ContainerLayer
method set_filter (line 14) | public void set_filter(SKImageFilter filter)
method Paint (line 18) | public override void Paint(PaintContext context)
FILE: FlutterBinding/Flow/Layers/ChildSceneLayer.cs
class ChildSceneLayer (line 12) | public class ChildSceneLayer : Layer
method set_offset (line 15) | public void set_offset(SKPoint offset)
method set_size (line 20) | public void set_size(SKSize size)
method set_hit_testable (line 25) | public void set_hit_testable(bool hit_testable)
method Preroll (line 30) | public override void Preroll(PrerollContext context, SKMatrix matrix)
method Paint (line 35) | public override void Paint(PaintContext context)
FILE: FlutterBinding/Flow/Layers/ClipPathLayer.cs
class ClipPathLayer (line 11) | public class ClipPathLayer : ContainerLayer
method ClipPathLayer (line 13) | public ClipPathLayer(Clip clip_behavior = Clip.antiAlias)
method set_clip_path (line 18) | public void set_clip_path(SKPath clip_path)
method Preroll (line 23) | public override void Preroll(PrerollContext context, SKMatrix matrix)
method Paint (line 34) | public override void Paint(PaintContext context)
FILE: FlutterBinding/Flow/Layers/ClipRRectLayer.cs
class ClipRRectLayer (line 11) | public class ClipRRectLayer : ContainerLayer
method ClipRRectLayer (line 13) | public ClipRRectLayer(Clip clip_behavior)
method set_clip_rrect (line 18) | public void set_clip_rrect(SKRoundRect clip_rrect)
method Preroll (line 23) | public override void Preroll(PrerollContext context, SKMatrix matrix)
method Paint (line 34) | public override void Paint(PaintContext context)
FILE: FlutterBinding/Flow/Layers/ClipRectLayer.cs
class ClipRectLayer (line 11) | public class ClipRectLayer : ContainerLayer
method ClipRectLayer (line 13) | public ClipRectLayer(Clip clip_behavior)
method set_clip_rect (line 18) | public void set_clip_rect(SKRect clip_rect)
method Preroll (line 23) | public override void Preroll(PrerollContext context, SKMatrix matrix)
method Paint (line 33) | public override void Paint(PaintContext context)
FILE: FlutterBinding/Flow/Layers/ColorFilterLayer.cs
class ColorFilterLayer (line 10) | public class ColorFilterLayer : ContainerLayer
method set_color (line 13) | public void set_color(uint color)
method set_blend_mode (line 18) | public void set_blend_mode(SKBlendMode blend_mode)
method Paint (line 23) | public override void Paint(PaintContext context)
FILE: FlutterBinding/Flow/Layers/ContainerLayer.cs
class ContainerLayer (line 12) | public abstract class ContainerLayer : Layer
method Add (line 15) | public void Add(Layer layer)
method Preroll (line 21) | public override void Preroll(PrerollContext context, SKMatrix matrix)
method layers (line 29) | public List<Layer> layers()
method PrerollChildren (line 34) | protected void PrerollChildren(PrerollContext context, SKMatrix child_...
method PaintChildren (line 48) | protected void PaintChildren(PaintContext context)
FILE: FlutterBinding/Flow/Layers/LayerTree.cs
class LayerTree (line 11) | public class LayerTree
method LayerTree (line 13) | public LayerTree()
method Preroll (line 21) | public void Preroll(CompositorContext.ScopedFrame frame, bool ignore_r...
method Paint (line 33) | public void Paint(CompositorContext.ScopedFrame frame, bool ignore_ras...
method Flatten (line 44) | public SKPicture Flatten(SKRect bounds)
method set_root_layer (line 80) | public void set_root_layer(Layer root_layer)
method frame_size (line 85) | public SKSizeI frame_size()
method set_frame_size (line 90) | public void set_frame_size(SKSizeI frame_size)
method set_rasterizer_tracing_threshold (line 98) | public void set_rasterizer_tracing_threshold(uint interval)
method rasterizer_tracing_threshold (line 102) | public uint rasterizer_tracing_threshold()
method set_checkerboard_raster_cache_images (line 107) | public void set_checkerboard_raster_cache_images(bool checkerboard)
method set_checkerboard_offscreen_layers (line 112) | public void set_checkerboard_offscreen_layers(bool checkerboard)
FILE: FlutterBinding/Flow/Layers/OpacityLayer.cs
class OpacityLayer (line 11) | public class OpacityLayer : ContainerLayer
method set_alpha (line 14) | public void set_alpha(int alpha)
method set_offset (line 18) | public void set_offset(SKPoint offset)
method Preroll (line 23) | public override void Preroll(PrerollContext context, SKMatrix matrix)
method Paint (line 40) | public override void Paint(PaintContext context)
FILE: FlutterBinding/Flow/Layers/PhysicalShapeLayer.cs
class PhysicalShapeLayer (line 11) | public class PhysicalShapeLayer : ContainerLayer
method PhysicalShapeLayer (line 13) | public PhysicalShapeLayer(Clip clip_behavior)
method set_path (line 19) | public void set_path(SKPath path)
method set_elevation (line 55) | public void set_elevation(float elevation)
method set_color (line 59) | public void set_color(uint color)
method set_shadow_color (line 63) | public void set_shadow_color(uint shadow_color)
method set_device_pixel_ratio (line 67) | public void set_device_pixel_ratio(float dpr)
method DrawShadow (line 72) | public static void DrawShadow(SKCanvas canvas, SKPath path, uint color...
method Preroll (line 91) | public override void Preroll(PrerollContext context, SKMatrix matrix)
method Paint (line 112) | public override void Paint(PaintContext context)
FILE: FlutterBinding/Flow/Layers/PictureLayer.cs
class PictureLayer (line 11) | public class PictureLayer : Layer
method set_offset (line 14) | public void set_offset(SKPoint offset)
method set_picture (line 18) | public void set_picture(SKPicture picture)
method set_is_complex (line 23) | public void set_is_complex(bool value)
method set_will_change (line 27) | public void set_will_change(bool value)
method picture (line 32) | public SKPicture picture()
method Preroll (line 37) | public override void Preroll(PrerollContext context, SKMatrix matrix)
method Paint (line 56) | public override void Paint(PaintContext context)
FILE: FlutterBinding/Flow/Layers/PlatformViewLayer.cs
class PlatformViewLayer (line 11) | public class PlatformViewLayer : Layer
method set_offset (line 14) | public void set_offset(SKPoint offset)
method set_size (line 18) | public void set_size(SKSize size)
method set_view_id (line 22) | public void set_view_id(ulong view_id)
method Preroll (line 27) | public override void Preroll(PrerollContext context, SKMatrix matrix)
method Paint (line 31) | public override void Paint(PaintContext context)
FILE: FlutterBinding/Flow/Layers/ShaderMaskLayer.cs
class ShaderMaskLayer (line 11) | public class ShaderMaskLayer : ContainerLayer
method set_shader (line 14) | public void set_shader(SKShader shader)
method set_mask_rect (line 19) | public void set_mask_rect(SKRect mask_rect)
method set_blend_mode (line 24) | public void set_blend_mode(SKBlendMode blend_mode)
method Paint (line 28) | public override void Paint(PaintContext context)
FILE: FlutterBinding/Flow/Layers/TextureLayer.cs
class TextureLayer (line 11) | public class TextureLayer : Layer
method set_offset (line 14) | public void set_offset(SKPoint offset)
method set_size (line 18) | public void set_size(SKSize size)
method set_texture_id (line 22) | public void set_texture_id(ulong texture_id)
method set_freeze (line 26) | public void set_freeze(bool freeze)
method Preroll (line 31) | public override void Preroll(PrerollContext context, SKMatrix matrix)
method Paint (line 35) | public override void Paint(PaintContext context)
FILE: FlutterBinding/Flow/Layers/TransformLayer.cs
class TransformLayer (line 11) | public class TransformLayer : ContainerLayer
method set_transform (line 14) | public void set_transform(SKMatrix transform)
method Preroll (line 19) | public override void Preroll(PrerollContext context, SKMatrix matrix)
method Paint (line 31) | public override void Paint(PaintContext context)
FILE: FlutterBinding/Flow/RasterCache.cs
class RasterCacheResult (line 15) | public class RasterCacheResult
method RasterCacheResult (line 17) | public RasterCacheResult()
method RasterCacheResult (line 21) | public RasterCacheResult(SKImage image, SKRect logical_rect)
method draw (line 32) | public void draw(SKCanvas canvas, SKPaint paint = null)
class UniqueEntry (line 43) | public class UniqueEntry : Entry
method UniqueEntry (line 45) | public UniqueEntry(uint value) => Value = value;
class RasterCache (line 50) | public class RasterCache //: System.IDisposable
method RasterCache (line 52) | public RasterCache(int threshold = 3)
method GetDeviceBounds (line 62) | public static SKRectI GetDeviceBounds(SKRect rect, SKMatrix ctm)
method GetIntegralTransCTM (line 70) | public static SKMatrix GetIntegralTransCTM(SKMatrix ctm)
method Prepare (line 86) | public bool Prepare(GRContext context, SKPicture picture, SKMatrix tra...
method Prepare (line 123) | public void Prepare(PrerollContext context, Layer layer, SKMatrix ctm)
method Get (line 140) | public RasterCacheResult Get(SKPicture picture, SKMatrix ctm)
method Get (line 147) | public RasterCacheResult Get(Layer layer, SKMatrix ctm)
method SweepAfterFrame (line 155) | public void SweepAfterFrame()
method Clear (line 161) | public void Clear()
method SetCheckboardCacheImages (line 166) | public void SetCheckboardCacheImages(bool checkerboard)
class Entry (line 180) | public class Entry
method SweepOneCacheAfterFrame (line 187) | private static void SweepOneCacheAfterFrame<Cache>(List<RasterCacheKey...
FILE: FlutterBinding/Flow/RasterCacheKey.cs
class RasterCacheKey (line 12) | public class RasterCacheKey<ID> where ID : Entry
method RasterCacheKey (line 14) | public RasterCacheKey(ID id, SKMatrix ctm)
method id (line 23) | public ID id()
method matrix (line 28) | public SKMatrix matrix()
class Hash (line 33) | public class Hash
method functorMethod (line 35) | public static uint functorMethod(RasterCacheKey<ID> key)
class Equal (line 41) | public class Equal
method functorMethod (line 43) | public static bool functorMethod(RasterCacheKey<ID> lhs, RasterCache...
FILE: FlutterBinding/Flow/layers/layer.cs
type Clip (line 13) | public enum Clip
class PrerollContext (line 21) | public class PrerollContext
method PrerollContext (line 32) | public PrerollContext(RasterCache raster_cache,
class Layer (line 55) | public abstract class Layer: Entry
method Layer (line 57) | public Layer()
method Preroll (line 64) | public virtual void Preroll(PrerollContext context, SKMatrix matrix)
class PaintContext (line 68) | public class PaintContext
method PaintContext (line 76) | public PaintContext(SKCanvas canvas,
class AutoSaveLayer (line 92) | public class AutoSaveLayer : System.IDisposable
method Create (line 94) | public static Layer.AutoSaveLayer Create(PaintContext paint_context,...
method Dispose (line 104) | public void Dispose()
method AutoSaveLayer (line 113) | private AutoSaveLayer(PaintContext paint_context, SKRect bounds, SKP...
method Paint (line 133) | public abstract void Paint(PaintContext context);
method parent (line 135) | public ContainerLayer parent()
method set_parent (line 140) | public void set_parent(ContainerLayer parent)
method needs_system_composite (line 145) | public bool needs_system_composite()
method set_needs_system_composite (line 149) | public void set_needs_system_composite(bool value)
method paint_bounds (line 154) | public SKRect paint_bounds()
method set_paint_bounds (line 161) | public void set_paint_bounds(SKRect paint_bounds)
method needs_painting (line 165) | public bool needs_painting()
FILE: FlutterBinding/Flow/texture.cs
class Texture (line 12) | public abstract class Texture
method Texture (line 14) | protected Texture(ulong id)
method Paint (line 20) | public abstract void Paint(SKCanvas canvas, SKRect bounds, bool freeze);
method OnGRContextCreated (line 23) | public abstract void OnGRContextCreated();
method OnGRContextDestroyed (line 26) | public abstract void OnGRContextDestroyed();
method MarkNewFrameAvailable (line 29) | public abstract void MarkNewFrameAvailable();
method Id (line 31) | public ulong Id()
class TextureRegistry (line 40) | public class TextureRegistry
method RegisterTexture (line 44) | public void RegisterTexture(Texture texture)
method UnregisterTexture (line 50) | public void UnregisterTexture(ulong id)
method GetTexture (line 56) | public Texture GetTexture(ulong id)
method OnGRContextCreated (line 63) | public void OnGRContextCreated()
method OnGRContextDestroyed (line 72) | public void OnGRContextDestroyed()
FILE: FlutterBinding/Mapping/Future.cs
class Future (line 6) | public class Future<T> : Task<T>
method Future (line 8) | public Future(Func<T> function) : base(function) { }
method Future (line 14) | public Future(Action action) : base(action) { }
class Future (line 12) | public class Future : Task
method Future (line 8) | public Future(Func<T> function) : base(function) { }
method Future (line 14) | public Future(Action action) : base(action) { }
FILE: FlutterBinding/Mapping/Helper.cs
class Helper (line 7) | public static class Helper
method identical (line 9) | public static bool identical(object first, object second) => first.Equ...
method hashValues (line 11) | public static int hashValues(object first, object second, object third...
method hashList (line 13) | public static int hashList(List<double> list) => 0;
method hashList (line 14) | public static int hashList(List<int> list) => 0;
method toStringAsFixed (line 16) | public static string toStringAsFixed(this double value, int points)
method toRadixString (line 21) | public static string toRadixString(this uint value, int places) => val...
method round (line 23) | public static double round(this double value) => Math.Round(value);
method toInt (line 25) | public static int toInt(this double value) => Convert.ToInt32(value);
method clamp (line 27) | public static int clamp(this int value, int lower, int upper)
method clamp (line 38) | public static double clamp(this double value, int lower, int upper)
method isFinite (line 49) | public static bool isFinite(this double value) => !double.IsInfinity(v...
method abs (line 51) | public static double abs(this double value) => Math.Abs(value);
method _futurize (line 53) | public static Future<T> _futurize<T>(Action<_Callback<T>> callback)
method _futurize (line 65) | public static Future _futurize(Action<_Callback> callback)
FILE: FlutterBinding/Mapping/Types.cs
class Types (line 7) | public static class Types
type Endian (line 9) | public enum Endian
class Duration (line 15) | public class Duration
method Duration (line 17) | public Duration(long milliseconds = 0, long microseconds = 0)
class ByteData (line 25) | public class ByteData
method ByteData (line 27) | public ByteData() { }
method ByteData (line 28) | public ByteData(int value) { }
method getInt32 (line 30) | public int getInt32(int first, int second) => 0;
method getInt64 (line 31) | public int getInt64(int first, int second) => 0;
method getFloat64 (line 32) | public double getFloat64(int first, int second) => 0;
method getFloat32 (line 33) | public double getFloat32(int first, int second) => 0;
method setInt32 (line 35) | public void setInt32(int first, int second, int third) { }
method setFloat32 (line 36) | public void setFloat32(double first, double second, int third) { }
method asByteData (line 40) | public static ByteData asByteData(List<int> list) => new ByteData();
class Zone (line 43) | public class Zone
method runUnaryGuarded (line 46) | public void runUnaryGuarded(PlatformMessageResponseCallback callback...
method runUnaryGuarded (line 51) | public void runUnaryGuarded<A>(Action<A> callback, A data)
method runGuarded (line 56) | public void runGuarded(VoidCallback callback)
method runBinaryGuarded (line 61) | public void runBinaryGuarded<A1, A2>(Action<A1, A2> callback, A1 arg...
class StateError (line 67) | public class StateError : Exception {
method StateError (line 68) | public StateError(string message) : base(message) { }
FILE: FlutterBinding/Minikin/Arrays.cs
class Arrays (line 7) | internal static class Arrays
method InitializeWithDefaultInstances (line 9) | public static T[] InitializeWithDefaultInstances<T>(int length) where ...
method DeleteArray (line 19) | public static void DeleteArray<T>(T[] array) where T: System.IDisposable
FILE: FlutterBinding/Minikin/CmapCoverage.h.cs
class CmapCoverage (line 22) | public class CmapCoverage
method getCoverage (line 24) | public SparseBitSet getCoverage(byte cmap_data, int cmap_size, ref boo...
FILE: FlutterBinding/Minikin/DefineConstants.cs
class DefineConstants (line 1) | internal static class DefineConstants
FILE: FlutterBinding/Minikin/FontCollection.h.cs
class FontCollection (line 25) | public class FontCollection
method FontCollection (line 27) | public FontCollection(FontFamily typeface)
method FontCollection (line 35) | public FontCollection(vector<FontFamily> typefaces)
class FallbackFontProvider (line 43) | public abstract class FallbackFontProvider //: System.IDisposable
method matchFallbackFont (line 47) | public abstract FontFamily* matchFallbackFont(uint ch, string locale);
class Run (line 50) | public class Run
method itemize (line 59) | public void itemize(UInt16 @string, int string_size, FontStyle style, ...
method hasVariationSelector (line 153) | public bool hasVariationSelector(uint baseCodepoint, uint variationSel...
method baseFontFaked (line 197) | public FakedFont baseFontFaked(FontStyle style)
method createCollectionWithVariation (line 204) | public FontCollection createCollectionWithVariation(List<FontVariation...
method getSupportedTags (line 245) | public HashSet<AxisTag> getSupportedTags()
method getId (line 252) | public uint getId()
method set_fallback_font_provider (line 257) | public void set_fallback_font_provider(std::unique_ptr<FallbackFontPro...
class Range (line 271) | private class Range
method init (line 278) | public void init(vector<FontFamily> typefaces)
method getFamilyForChar (line 345) | public FontFamily* getFamilyForChar(uint ch, uint vs, uint langListId,...
method calcFamilyScore (line 423) | public uint calcFamilyScore(uint ch, uint vs, int variant, uint langLi...
method calcCoverageScore (line 443) | public uint calcCoverageScore(uint ch, uint vs, FontFamily fontFamily)
method calcLanguageMatchingScore (line 495) | public uint calcLanguageMatchingScore(uint userLangListId, FontFamily ...
method calcVariantMatchingScore (line 511) | public uint calcVariantMatchingScore(int variant, FontFamily fontFamily)
FILE: FlutterBinding/Minikin/FontFamily.h.cs
class FontStyle (line 33) | public class FontStyle
method FontStyle (line 35) | public FontStyle() : this(0, 4, false)
method FontStyle (line 38) | public FontStyle(int weight, bool italic) : this(0, weight, italic)
method FontStyle (line 41) | public FontStyle(uint langListId) : this(new uint(langListId), 0, 4, f...
method FontStyle (line 45) | public FontStyle(int variant, int weight, bool italic)
method FontStyle (line 49) | public FontStyle(uint languageListId, int variant, int weight, bool it...
method getWeight (line 57) | public int getWeight()
method getItalic (line 63) | public bool getItalic()
method getVariant (line 69) | public int getVariant()
method getLanguageListId (line 75) | public uint getLanguageListId()
method registerLanguageList (line 95) | public uint registerLanguageList(string languages)
method pack (line 106) | public uint pack(int variant, int weight, bool italic)
type FontVariant (line 115) | public enum FontVariant
class FontFakery (line 123) | public class FontFakery
method FontFakery (line 125) | public FontFakery()
method FontFakery (line 130) | public FontFakery(bool fakeBold, bool fakeItalic)
method isFakeBold (line 136) | public bool isFakeBold()
method isFakeItalic (line 140) | public bool isFakeItalic()
class FakedFont (line 149) | public class FakedFont
class Font (line 157) | public class Font
method Font (line 159) | public Font(MinikinFont typeface, FontStyle style)
method Font (line 165) | public Font(MinikinFont typeface, FontStyle style)
method Font (line 171) | public Font(Font o)
method getSupportedAxesLocked (line 188) | public HashSet<AxisTag> getSupportedAxesLocked()
class FontVariation (line 203) | public class FontVariation
method FontVariation (line 205) | public FontVariation(AxisTag axisTag, float value)
class FontFamily (line 216) | public class FontFamily
method FontFamily (line 219) | public FontFamily(List<Font> fonts)
method FontFamily (line 224) | public FontFamily(int variant, List<Font> fonts)
FILE: FlutterBinding/Minikin/FontLanguage.cs
class FontLanguage (line 45) | public class FontLanguage
type EmojiStyle (line 47) | public enum EmojiStyle : byte
method FontLanguage (line 55) | public FontLanguage()
method FontLanguage (line 72) | public FontLanguage(string buf, int length) : this()
method isUnsupported (line 160) | public bool isUnsupported()
method getEmojiStyle (line 166) | public EmojiStyle getEmojiStyle()
method getHbLanguage (line 172) | public hb_language_t getHbLanguage()
method isEqualScript (line 179) | public bool isEqualScript(FontLanguage other)
method supportsHbScript (line 188) | public bool supportsHbScript(hb_script_t script)
method getString (line 201) | public string getString()
method calcScoreFor (line 231) | public int calcScoreFor(FontLanguages supported)
method getIdentifier (line 283) | public UInt64 getIdentifier()
method scriptToSubScriptBits (line 321) | private static byte scriptToSubScriptBits(uint script)
method resolveEmojiStyle (line 388) | private static FontLanguage.EmojiStyle resolveEmojiStyle(string buf, i...
method supportsScript (line 436) | private static bool supportsScript(byte providedBits, byte requestedBits)
class FontLanguages (line 443) | public class FontLanguages
method FontLanguages (line 446) | public FontLanguages(List<FontLanguage>&& languages)
method FontLanguages (line 467) | public FontLanguages()
method size (line 477) | public int size()
method empty (line 483) | public bool empty()
method getUnionOfSubScriptBits (line 510) | private byte getUnionOfSubScriptBits()
method isAllTheSameLanguage (line 516) | private bool isAllTheSameLanguage()
FILE: FlutterBinding/Minikin/FontLanguageListCache.cs
class FontLanguageListCache (line 42) | public class FontLanguageListCache : System.IDisposable
method getId (line 53) | public static uint getId(string languages)
method getById (line 80) | public static FontLanguages getById(uint id)
method FontLanguageListCache (line 87) | private FontLanguageListCache()
method Dispose (line 90) | public void Dispose()
method getInstance (line 99) | private static FontLanguageListCache getInstance()
FILE: FlutterBinding/Minikin/GlobalMembers.cs
class GlobalMembers (line 6) | public static class GlobalMembers
method readU16 (line 9) | internal static uint readU16(byte[] data, int offset)
method readU32 (line 14) | internal static uint readU32(byte[] data, int offset)
method addRange (line 19) | internal static void addRange(vector<uint> coverage, uint start, uint ...
method getCoverageFormat4 (line 37) | internal static bool getCoverageFormat4(vector<uint> coverage, byte da...
method getCoverageFormat12 (line 104) | internal static bool getCoverageFormat12(vector<uint> coverage, byte d...
method getTablePriority (line 157) | public static byte getTablePriority(UInt16 platformId, UInt16 encodingId)
method isEmoji (line 195) | public static bool isEmoji(uint c)
method isEmojiModifier (line 200) | public static bool isEmojiModifier(uint c)
method isEmojiBase (line 205) | public static bool isEmojiBase(uint c)
method emojiBidiOverride (line 217) | public static UCharDirection emojiBidiOverride(object UnnamedParameter...
method max (line 221) | internal static T max<T>(T a, T b)
method GetFontLocale (line 229) | public static uint FontCollection.sNextId = 0;
method isStickyWhitelisted (line 257) | internal static bool isStickyWhitelisted(uint c)
method isVariationSelector (line 271) | internal static bool isVariationSelector(uint c)
method computeMatch (line 277) | internal static int computeMatch(FontStyle style1, FontStyle style2)
method computeFakery (line 291) | internal static FontFakery computeFakery(FontStyle wanted, FontStyle a...
method isEmojiSubtag (line 316) | internal static bool isEmojiSubtag(string buf, int bufLen, string subt...
method packLanguageOrRegion (line 337) | internal static UInt16 packLanguageOrRegion(string c, int length, byte...
method unpackLanguageOrRegion (line 349) | internal static int unpackLanguageOrRegion(UInt16 @in, ref string @out...
method nextDelimiterIndex (line 372) | internal static int nextDelimiterIndex(string buffer, int bufferLength...
method isLowercase (line 384) | internal static bool isLowercase(char c)
method isUppercase (line 389) | internal static bool isUppercase(char c)
method isDigit (line 394) | internal static bool isDigit(char c)
method isValidLanguageCode (line 400) | internal static bool isValidLanguageCode(string buffer, int length)
method isValidScriptCode (line 423) | internal static bool isValidScriptCode(string buffer)
method isValidRegionCode (line 429) | internal static bool isValidRegionCode(string buffer, int length)
method toLanguageTag (line 436) | internal static int toLanguageTag(ref string output, int outSize, stri...
method parseLanguageList (line 488) | internal static List<FontLanguage> parseLanguageList(string input)
method analyzeStyle (line 530) | public static bool analyzeStyle(byte os2_data, int os2_size, ref int w...
method analyzeAxes (line 545) | public static void analyzeAxes(byte fvar_data, int fvar_size, HashSet<...
method readU16 (line 581) | internal static UInt16 readU16(byte[] data, int offset)
method readU32 (line 586) | internal static uint readU32(byte[] data, int offset)
method tailoredGraphemeClusterBreak (line 591) | public static int tailoredGraphemeClusterBreak(uint c)
method isPureKiller (line 613) | public static bool isPureKiller(uint c)
method purgeHbFontCacheLocked (line 618) | public static void purgeHbFontCacheLocked()
method purgeHbFontLocked (line 623) | public static void purgeHbFontLocked(MinikinFont minikinFont)
method getHbFontLocked (line 634) | public static HarfBuzzSharp.Font getHbFontLocked(MinikinFont minikinFont)
method getFontCacheLocked (line 680) | public static HbFontCache getFontCacheLocked()
method getScript (line 704) | internal static UScriptCode getScript(uint codePoint)
method hyphenationTypeBasedOnScript (line 718) | internal static HyphenationType hyphenationTypeBasedOnScript(uint code...
method getJoiningType (line 745) | internal static int getJoiningType(UChar32 codepoint)
method getHyphTypeForArabic (line 753) | internal static HyphenationType getHyphTypeForArabic(UInt16[] word, in...
method disabledDecomposeCompatibility (line 781) | internal static uint disabledDecomposeCompatibility(hb_unicode_funcs_t...
method hash_type (line 786) | public static android.hash_t hash_type(LayoutCacheKey key)
method harfbuzzGetGlyphHorizontalAdvance (line 791) | internal static HarfBuzzSharp.Position harfbuzzGetGlyphHorizontalAdvan...
method harfbuzzGetGlyphHorizontalOrigin (line 799) | internal static hb_bool_t harfbuzzGetGlyphHorizontalOrigin(HarfBuzzSha...
method getHbFontFuncs (line 810) | public static hb_font_funcs_t getHbFontFuncs(bool forColorBitmapFont)
method isColorBitmapFont (line 844) | internal static bool isColorBitmapFont(HarfBuzzSharp.Font font)
method HBFixedToFloat (line 851) | internal static float HBFixedToFloat(HarfBuzzSharp.Position v)
method HBFloatToFixed (line 856) | internal static HarfBuzzSharp.Position HBFloatToFixed(float v)
method codePointToScript (line 863) | internal static hb_script_t codePointToScript(hb_codepoint_t codepoint)
method decodeUtf16 (line 874) | internal static hb_codepoint_t decodeUtf16(UInt16[] chars, int len, re...
method getScriptRun (line 905) | internal static hb_script_t getScriptRun(UInt16 chars, int len, ref ui...
method isScriptOkForLetterspacing (line 954) | internal static bool isScriptOkForLetterspacing(hb_script_t script)
method addFeatures (line 961) | internal static void addFeatures(string str, vector<hb_feature_t> feat...
method determineHyphenChar (line 998) | internal static hb_codepoint_t determineHyphenChar(hb_codepoint_t pref...
method addHyphenToHbBuffer (line 1028) | internal static void addHyphenToHbBuffer(hb_buffer_t buffer, HarfBuzzS...
method addToHbBuffer (line 1043) | internal static uint addToHbBuffer(hb_buffer_t buffer, UInt16 buf, int...
method isWordSpace (line 1160) | public static bool isWordSpace(UInt16 code_unit)
method getPrevWordBreakForCache (line 1176) | public static int getPrevWordBreakForCache(UInt16[] chars, int offset,...
method getNextWordBreakForCache (line 1213) | public static int getNextWordBreakForCache(UInt16[] chars, int offset,...
method isWordBreakAfter (line 1243) | internal static bool isWordBreakAfter(UInt16 c)
method isWordBreakBefore (line 1254) | internal static bool isWordBreakBefore(UInt16 c)
method isLineEndSpace (line 1296) | public static bool isLineEndSpace(UInt16 c)
method getRunAdvance (line 1304) | internal static float getRunAdvance(float[] advances, UInt16 buf, int ...
method getRunAdvance (line 1356) | public static float getRunAdvance(float advances, UInt16 buf, int star...
method getOffsetForAdvance (line 1369) | public static int getOffsetForAdvance(float[] advances, UInt16 buf, in...
method assertMinikinLocked (line 1432) | public static void assertMinikinLocked()
method getFontTable (line 1439) | public static hb_blob_t getFontTable(MinikinFont minikinFont, uint tag)
method isBreakValid (line 1463) | internal static bool isBreakValid(UInt16 buf, int bufEnd, int i)
method breakAfter (line 1517) | internal static bool breakAfter(UInt16 c)
method breakBefore (line 1524) | internal static bool breakBefore(UInt16 c)
method hash_type (line 1545) | public static android.hash_t hash_type(FontStyle style)
FILE: FlutterBinding/Minikin/GraphemeBreak.h.cs
class GraphemeBreak (line 22) | public class GraphemeBreak
type MoveOpt (line 25) | public enum MoveOpt
method isGraphemeBreak (line 37) | public bool isGraphemeBreak(float[] advances, UInt16[] buf, int start,...
method getTextRunCursor (line 214) | public int getTextRunCursor(float advances, UInt16 buf, int start, int...
FILE: FlutterBinding/Minikin/HbFontCache.cs
class HbFontCache (line 54) | public class HbFontCache : android.OnEntryRemoved<int, HarfBuzzSharp.Font*>
method HbFontCache (line 56) | public HbFontCache()
method functorMethod (line 63) | public static void functorMethod(int UnnamedParameter, ref HarfBuzzSha...
method get (line 68) | public HarfBuzzSharp.Font get(int fontId)
method put (line 73) | public void put(int fontId, HarfBuzzSharp.Font font)
method clear (line 78) | public void clear()
method remove (line 83) | public void remove(int fontId)
FILE: FlutterBinding/Minikin/Hyphenator.cs
type HyphenationType (line 51) | public enum HyphenationType : byte
class HyphenEdit (line 92) | public class HyphenEdit
method isReplacement (line 113) | public static bool isReplacement(uint hyph)
method isInsertion (line 118) | public static bool isInsertion(uint hyph)
method getHyphenString (line 123) | public static uint getHyphenString(uint hyph)
method editForThisLine (line 145) | public static uint editForThisLine(HyphenationType type)
method editForNextLine (line 167) | public static uint editForNextLine(HyphenationType type)
method HyphenEdit (line 182) | public HyphenEdit()
method HyphenEdit (line 188) | public HyphenEdit(uint hyphenInt)
method getHyphen (line 196) | public uint getHyphen()
method getEnd (line 209) | public uint getEnd()
method getStart (line 215) | public uint getStart()
class Hyphenator (line 227) | public class Hyphenator
method isLineBreakingHyphen (line 250) | public static bool isLineBreakingHyphen(uint c)
method loadBinary (line 261) | public static Hyphenator loadBinary(byte patternData, int minPrefix, i...
method hyphenateWithNoPatterns (line 281) | private void hyphenateWithNoPatterns(HyphenationType[] result, UInt16[...
method alphabetLookup (line 338) | private HyphenationType alphabetLookup(UInt16[] alpha_codes, UInt16[] ...
method hyphenateFromCodes (line 412) | private void hyphenateFromCodes(HyphenationType[] result, UInt16[] codes...
method getHeader (line 488) | private Header getHeader()
class AlphabetTable0 (line 516) | public class AlphabetTable0
class AlphabetTable1 (line 524) | public class AlphabetTable1
method codepoint (line 530) | public static uint codepoint(uint entry)
method value (line 534) | public static uint value(uint entry)
class Trie (line 540) | public class Trie
class Pattern (line 551) | public class Pattern
method len (line 560) | public static uint len(uint entry)
method shift (line 564) | public static uint shift(uint entry)
method buf (line 570) | public byte buf(uint entry)
class Header (line 577) | public class Header
method bytes (line 589) | public byte bytes()
method alphabetVersion (line 596) | public uint alphabetVersion()
method alphabetTable0 (line 603) | public AlphabetTable0 alphabetTable0()
method alphabetTable1 (line 610) | public AlphabetTable1 alphabetTable1()
method trieTable (line 617) | public Trie trieTable()
method patternTable (line 624) | public Pattern patternTable()
FILE: FlutterBinding/Minikin/Layout.cs
class LayoutContext (line 28) | public class LayoutContext
method clearHbFonts (line 34) | public void clearHbFonts()
class LayoutCacheKey (line 47) | public class LayoutCacheKey
method LayoutCacheKey (line 49) | public LayoutCacheKey(FontCollection collection, MinikinPaint paint, F...
method hash (line 86) | public android.hash_t hash()
method copyText (line 91) | public void copyText()
method freeText (line 98) | public void freeText()
method doLayout (line 106) | public void doLayout(Layout layout, LayoutContext ctx, FontCollection ...
method computeHash (line 132) | private android.hash_t computeHash()
class LayoutCache (line 152) | public class LayoutCache : android.OnEntryRemoved<LayoutCacheKey, Layout*>
method LayoutCache (line 154) | public LayoutCache()
method clear (line 160) | public void clear()
method get (line 165) | public Layout get(LayoutCacheKey key, LayoutContext ctx, FontCollectio...
method functorMethod (line 179) | private static void functorMethod(LayoutCacheKey key, ref Layout value)
class LayoutEngine (line 195) | public class LayoutEngine
method LayoutEngine (line 197) | public LayoutEngine()
method getInstance (line 212) | public static LayoutEngine getInstance()
class BidiText (line 226) | public class BidiText : System.IDisposable
class Iter (line 228) | public class Iter
class RunInfo (line 230) | public class RunInfo
method Iter (line 237) | public Iter(UBiDi bidi, int start, int end, int runIndex, int runCou...
method Indirection (line 272) | public RunInfo Indirection()
method updateRunInfo (line 291) | private void updateRunInfo()
method BidiText (line 325) | public BidiText(UInt16 buf, int start, int count, int bufSize, int bid...
method Dispose (line 389) | public void Dispose()
method begin (line 399) | public Iter begin()
method end (line 406) | public Iter end()
FILE: FlutterBinding/Minikin/Layout.h.cs
class LayoutGlyph (line 26) | public class LayoutGlyph
type AnonymousEnum (line 49) | public enum AnonymousEnum
class Layout (line 64) | public class Layout
method Layout (line 66) | public Layout()
method dump (line 87) | public void dump()
method doLayout (line 101) | public void doLayout(UInt16 buf, int start, int count, int bufSize, bo...
method measureText (line 121) | public float measureText(UInt16 buf, int start, int count, int bufSize...
method nGlyphs (line 142) | public int nGlyphs()
method getFont (line 148) | public MinikinFont getFont(int i)
method getFakery (line 155) | public FontFakery getFakery(int i)
method getGlyphId (line 162) | public uint getGlyphId(int i)
method getGlyphCluster (line 169) | public uint getGlyphCluster(int i)
method getX (line 176) | public float getX(int i)
method getY (line 183) | public float getY(int i)
method getAdvance (line 191) | public float getAdvance()
method getAdvances (line 198) | public void getAdvances(ref float advances)
method getCharAdvance (line 208) | public float getCharAdvance(int i)
method getBounds (line 215) | public void getBounds(MinikinRect bounds)
method purgeCaches (line 221) | public void purgeCaches()
method findFace (line 233) | public int findFace(FakedFont face, LayoutContext ctx)
method reset (line 259) | public void reset()
method doLayoutRunCached (line 271) | public float doLayoutRunCached(UInt16 buf, int start, int count, int b...
method doLayoutWord (line 333) | public float doLayoutWord(UInt16[] buf, int start, int count, int bufS...
method doLayoutRun (line 381) | public void doLayoutRun(UInt16[] buf, int start, int count, int bufSiz...
method appendLayout (line 568) | public void appendLayout(Layout src, int start, float extraAdvance)
FILE: FlutterBinding/Minikin/LineBreaker.h.cs
type BreakStrategy (line 45) | public enum BreakStrategy
type HyphenationFrequency (line 52) | public enum HyphenationFrequency
class LineWidths (line 60) | public class LineWidths
method setWidths (line 62) | public void setWidths(float firstWidth, int firstWidthLineCount, float...
method setIndents (line 68) | public void setIndents(List<float> indents)
method isConstant (line 74) | public bool isConstant()
method getLineWidth (line 82) | public float getLineWidth(int line)
method clear (line 98) | public void clear()
class TabStops (line 109) | public class TabStops
method set (line 111) | public void set(int stops, int nStops, int tabWidth)
method nextTab (line 125) | public float nextTab(float widthSoFar)
class LineBreaker (line 141) | public class LineBreaker
method setLocale (line 152) | public void setLocale(icu.Locale locale, Hyphenator hyphenator)
method resize (line 159) | public void resize(int size)
method size (line 167) | public int size()
method buffer (line 172) | public UInt16 buffer()
method charWidths (line 179) | public float charWidths()
method setText (line 185) | public void setText()
method setLineWidths (line 208) | public void setLineWidths(float firstWidth, int firstWidthLineCount, f...
method setIndents (line 213) | public void setIndents(List<float> indents)
method setTabStops (line 218) | public void setTabStops(int stops, int nStops, int tabWidth)
method getStrategy (line 225) | public BreakStrategy getStrategy()
method setStrategy (line 230) | public void setStrategy(BreakStrategy strategy)
method setJustified (line 235) | public void setJustified(bool justified)
method getHyphenationFrequency (line 242) | public HyphenationFrequency getHyphenationFrequency()
method setHyphenationFrequency (line 247) | public void setHyphenationFrequency(HyphenationFrequency frequency)
method addStyleRun (line 257) | public float addStyleRun(MinikinPaint paint, FontCollection typeface, ...
method addReplacement (line 383) | public void addReplacement(int start, int end, float width)
method computeBreaks (line 390) | public int computeBreaks()
method getBreaks (line 406) | public int getBreaks()
method getWidths (line 414) | public float getWidths()
method getFlags (line 422) | public int getFlags()
method finish (line 427) | public void finish()
class Candidate (line 462) | private class Candidate
method currentLineWidth (line 480) | public float currentLineWidth()
method addWordBreak (line 485) | public void addWordBreak(int offset, ParaWidth preBreak, ParaWidth pos...
method addCandidate (line 532) | public void addCandidate(Candidate cand)
method pushGreedyBreak (line 587) | public void pushGreedyBreak()
method pushBreak (line 601) | public void pushBreak(int offset, float width, byte hyphenEdit)
method getSpaceWidth (line 613) | public float getSpaceWidth()
method computeBreaksGreedy (line 625) | public void computeBreaksGreedy()
method computeBreaksOptimal (line 639) | public void computeBreaksOptimal(bool isRectangle)
method finishBreaksOptimal (line 753) | public void finishBreaksOptimal()
FILE: FlutterBinding/Minikin/MinikinFont.h.cs
class MinikinPaint (line 35) | public class MinikinPaint
method MinikinPaint (line 37) | public MinikinPaint()
method skipCache (line 53) | public bool skipCache()
type MinikinPaintFlags (line 72) | public enum MinikinPaintFlags
class MinikinRect (line 77) | public class MinikinRect
method isEmpty (line 85) | public bool isEmpty()
method set (line 89) | public void set(MinikinRect r)
method offset (line 96) | public void offset(float dx, float dy)
method setEmpty (line 103) | public void setEmpty()
method join (line 107) | public void join(MinikinRect r)
class MinikinFont (line 126) | public abstract class MinikinFont : System.IDisposable
method MinikinFont (line 128) | public MinikinFont(int uniqueId)
method Dispose (line 135) | public void Dispose()
method GetHorizontalAdvance (line 143) | public abstract float GetHorizontalAdvance(uint glyph_id, MinikinPaint...
method GetBounds (line 147) | public abstract void GetBounds(MinikinRect bounds, uint glyph_id, Mini...
method CreateHarfBuzzFace (line 151) | public virtual HarfBuzzSharp.Face CreateHarfBuzzFace()
method GetAxes (line 158) | public abstract List<minikin.FontVariation> GetAxes();
method createFontWithVariation (line 162) | public virtual MinikinFont createFontWithVariation(List<FontVariation>...
method MakeTag (line 167) | public static uint MakeTag(char c1, char c2, char c3, char c4)
method GetUniqueId (line 174) | public int GetUniqueId()
FILE: FlutterBinding/Minikin/MinikinInternal.cs
class HbBlob (line 45) | public class HbBlob : System.IDisposable
method HbBlob (line 49) | public HbBlob(hb_blob_t blob)
method Dispose (line 54) | public void Dispose()
method get (line 61) | public byte get()
method size (line 72) | public int size()
FILE: FlutterBinding/Minikin/SparseBitSet.h.cs
class SparseBitSet (line 30) | public class SparseBitSet
method InitializeInstanceFields (line 34) | private void InitializeInstanceFields()
method SparseBitSet (line 41) | public SparseBitSet()
method SparseBitSet (line 54) | public SparseBitSet(uint ranges, int nRanges) : this()
method get (line 72) | public bool get(uint ch)
method length (line 86) | public uint length()
method nextSetBit (line 95) | public uint nextSetBit(uint fromIndex)
method initFromRanges (line 144) | public void initFromRanges(uint[] ranges, int nRanges)
method calcNumPages (line 221) | public uint calcNumPages(uint[] ranges, int nRanges)
method CountLeadingZeros (line 251) | public int CountLeadingZeros(element x)
FILE: FlutterBinding/Minikin/StringFunctions.cs
class StringFunctions (line 8) | internal static class StringFunctions
method ChangeCharacter (line 14) | public static string ChangeCharacter(string sourceString, int charInde...
method IsXDigit (line 23) | public static bool IsXDigit(char character)
method StrChr (line 36) | public static string StrChr(string stringToSearch, char charToFind)
method StrRChr (line 48) | public static string StrRChr(string stringToSearch, char charToFind)
method StrStr (line 60) | public static string StrStr(string stringToSearch, string stringToFind)
method StrTok (line 76) | public static string StrTok(string stringToTokenize, string delimiters)
FILE: FlutterBinding/Minikin/WordBreaker.cs
type ScanState (line 32) | public enum ScanState
FILE: FlutterBinding/Minikin/WordBreaker.h.cs
class WordBreaker (line 42) | public class WordBreaker : System.IDisposable
method Dispose (line 44) | public void Dispose()
method setLocale (line 49) | public void setLocale(icu.Locale locale)
method setText (line 61) | public void setText(UInt16 data, int size)
method next (line 78) | public uint next()
method current (line 97) | public uint current()
method wordStart (line 107) | public uint wordStart()
method wordEnd (line 133) | public uint wordEnd()
method breakBadness (line 158) | public int breakBadness()
method finish (line 163) | public void finish()
method iteratorNext (line 170) | public int iteratorNext()
method detectEmailOrUrl (line 187) | public void detectEmailOrUrl()
method findNextBreakInEmailOrUrl (line 241) | public uint findNextBreakInEmailOrUrl()
FILE: FlutterBinding/Minikin/minikin.Hyphenator.cs
class Hyphenator (line 4) | public class Hyphenator
method hyphenate (line 7) | public void hyphenate(vector<HyphenationType> result, UInt16 word, int...
FILE: FlutterBinding/Minikin/minikin.SparseBitSet.cs
class SparseBitSet (line 4) | public class SparseBitSet
method CountLeadingZeros (line 7) | public int CountLeadingZeros(element x)
FILE: FlutterBinding/Minikin/minikin.android.cs
class android (line 4) | public class android
method hash (line 7) | public android.hash_t FontStyle.hash()
FILE: FlutterBinding/Txt/SkTextBlob.cs
class SkTextBlob (line 7) | public class SkTextBlob
FILE: FlutterBinding/Txt/font_collection.cs
class FontCollection (line 358) | public class FontCollection : System.IDisposable
method FontCollection (line 360) | public FontCollection()
method Dispose (line 366) | public void Dispose() { }
FILE: FlutterBinding/Txt/font_style.cs
type FontStyle (line 21) | public enum FontStyle
FILE: FlutterBinding/Txt/font_weight.cs
type FontWeight (line 21) | public enum FontWeight
FILE: FlutterBinding/Txt/paint_record.cs
class PaintRecord (line 405) | public class PaintRecord //: System.IDisposable
method PaintRecord (line 413) | public PaintRecord(TextStyle style, SKPoint offset, SkTextBlob text, S...
method PaintRecord (line 425) | public PaintRecord(TextStyle style, SkTextBlob text, SKFontMetrics met...
method PaintRecord (line 437) | public PaintRecord(PaintRecord other)
method offset (line 462) | public SKPoint offset()
method SetOffset (line 467) | public void SetOffset(SKPoint pt)
method text (line 476) | public SkTextBlob text()
method metrics (line 483) | public SKFontMetrics metrics()
method style (line 490) | public TextStyle style()
method line (line 497) | public int line()
method GetRunWidth (line 504) | public double GetRunWidth()
FILE: FlutterBinding/Txt/paragraph.cs
class Paragraph (line 431) | public class Paragraph //: System.IDisposable
method Paragraph (line 435) | public Paragraph()
type Affinity (line 443) | public enum Affinity
class LineBoxMetrics (line 451) | public class LineBoxMetrics
type RectHeightStyle (line 466) | public enum RectHeightStyle
type RectWidthStyle (line 489) | public enum RectWidthStyle
class PositionWithAffinity (line 500) | public class PositionWithAffinity
method PositionWithAffinity (line 505) | public PositionWithAffinity(int p, Affinity a)
class TextBox (line 514) | public class TextBox
method TextBox (line 519) | public TextBox(SKRect r, TextDirection d)
class Range (line 528) | public class Range<T> where T : struct
method Range (line 530) | public Range()
method Range (line 535) | public Range(T s, T e)
method width (line 551) | public T width()
method Shift (line 556) | public void Shift(T delta)
method Layout (line 571) | public void Layout(double width, bool force = false)
method Paint (line 970) | public void Paint(SKCanvas canvas, double x, double y)
method GetParagraphStyle (line 1002) | public ParagraphStyle GetParagraphStyle()
method TextSize (line 1010) | public int TextSize()
method GetHeight (line 1020) | public double GetHeight()
method GetMaxWidth (line 1030) | public double GetMaxWidth()
method GetAlphabeticBaseline (line 1039) | public double GetAlphabeticBaseline()
method GetIdeographicBaseline (line 1049) | public double GetIdeographicBaseline()
method GetMaxIntrinsicWidth (line 1058) | public double GetMaxIntrinsicWidth()
method GetMinIntrinsicWidth (line 1069) | public double GetMinIntrinsicWidth()
method GetRectsForRange (line 1078) | public List<Paragraph.TextBox> GetRectsForRange(int start, int end, Re...
method GetGlyphPositionAtCoordinate (line 1252) | public Paragraph.PositionWithAffinity GetGlyphPositionAtCoordinate(dou...
method if (line 1283) | if (dx < glyph_end)
class LineRange (line 1441) | private class LineRange
method LineRange (line 1443) | public LineRange(int s, int e, int eew, int ein, bool h)
class BidiRun (line 1484) | internal class BidiRun
method BidiRun (line 1486) | public BidiRun(int s, int e, TextDirection d, TextStyle st)
method start (line 1500) | public int start()
method end (line 1506) | public int end()
method direction (line 1512) | public TextDirection direction()
method style (line 1518) | public TextStyle style()
method is_rtl (line 1524) | public bool is_rtl()
class GlyphPosition (line 1535) | internal class GlyphPosition
method GlyphPosition (line 1540) | public GlyphPosition(double x_start, double x_advance, int code_unit_i...
method Shift (line 1546) | public void Shift(double delta)
class GlyphLine (line 1552) | internal class GlyphLine
method GlyphLine (line 1559) | public GlyphLine(List<GlyphPosition> p, int tcu)
class CodeUnitRun (line 1568) | internal class CodeUnitRun
method CodeUnitRun (line 1579) | public CodeUnitRun(List<GlyphPosition> p, Range<int> cu, Range<double>...
method Shift (line 1591) | public void Shift(double delta)
class WaveCoordinates (line 1618) | private class WaveCoordinates
method WaveCoordinates (line 1625) | public WaveCoordinates(double x_s, double y_s, double x_e, double y_e)
FILE: FlutterBinding/Txt/paragraph_builder.cs
class ParagraphBuilder (line 415) | public class ParagraphBuilder //: System.IDisposable
method ParagraphBuilder (line 417) | public ParagraphBuilder(ParagraphStyle style, FontCollection font_coll...
method PushStyle (line 428) | public void PushStyle(TextStyle style)
method Pop (line 446) | public void Pop()
method PeekStyle (line 459) | public TextStyle PeekStyle()
method AddText (line 466) | public void AddText(std::u16string text)
method AddText (line 472) | public void AddText(string text)
method AddText (line 480) | public void AddText(string text)
method SetParagraphStyle (line 487) | public void SetParagraphStyle(ParagraphStyle style)
method Build (line 500) | public Paragraph Build()
method PeekStyleIndex (line 520) | private int PeekStyleIndex()
FILE: FlutterBinding/Txt/paragraph_style.cs
type TextAlign (line 399) | public enum TextAlign
type TextDirection (line 409) | public enum TextDirection
class ParagraphStyle (line 415) | public class ParagraphStyle
method GetTextStyle (line 437) | public TextStyle GetTextStyle()
method unlimited_lines (line 453) | public bool unlimited_lines()
method ellipsized (line 459) | public bool ellipsized()
method effective_align (line 467) | public TextAlign effective_align()
FILE: FlutterBinding/Txt/styled_runs.cs
class StyledRuns (line 405) | public class StyledRuns //: System.IDisposable
class Run (line 407) | public class Run
method StyledRuns (line 424) | public StyledRuns(StyledRuns other)
method swap (line 439) | public void swap(StyledRuns other)
method AddStyle (line 445) | public int AddStyle(TextStyle style)
method GetStyle (line 454) | public TextStyle GetStyle(int style_index)
method StartRun (line 459) | public void StartRun(int style_index, int start)
method EndRunIfNeeded (line 465) | public void EndRunIfNeeded(int end)
method size (line 487) | public int size()
method GetRun (line 494) | public StyledRuns.Run GetRun(int index)
class IndexedRun (line 541) | private class IndexedRun
method IndexedRun (line 547) | public IndexedRun(int style_index, int start, int end)
FILE: FlutterBinding/Txt/text_baseline.cs
type TextBaseline (line 21) | public enum TextBaseline
FILE: FlutterBinding/Txt/text_decoration.cs
type TextDecoration (line 40) | public enum TextDecoration
type TextDecorationStyle (line 48) | public enum TextDecorationStyle
FILE: FlutterBinding/Txt/text_shadow.cs
class TextShadow (line 44) | public class TextShadow
method TextShadow (line 50) | public TextShadow()
method TextShadow (line 54) | public TextShadow(SKColor color, SKPoint offset, double blur_radius)
method hasShadow (line 94) | public bool hasShadow()
FILE: FlutterBinding/Txt/text_style.cs
class TextStyle (line 394) | public class TextStyle
method TextStyle (line 419) | public TextStyle()
method equals (line 426) | public bool equals(TextStyle other)
FILE: FlutterBinding/Txt/typeface_font_asset_provider.cs
class TypefaceFontStyleSet (line 46) | public class TypefaceFontStyleSet : SkFontStyleSet, System.IDisposable
method registerTypeface (line 54) | public void registerTypeface(SKTypeface typeface)
method count (line 64) | public override int count()
method getStyle (line 70) | public override void getStyle(int index, SkFontStyle UnnamedParameter,...
method createTypeface (line 76) | public override SkTypeface createTypeface(int i)
method matchStyle (line 87) | public override SKTypeface matchStyle(SKFontStyle pattern)
method FML_DISALLOW_COPY_AND_ASSIGN (line 108) | FML_DISALLOW_COPY_AND_ASSIGN(TypefaceFontStyleSet);
class TypefaceFontAssetProvider (line 111) | public class TypefaceFontAssetProvider : FontAssetProvider
method RegisterTypeface (line 118) | public void RegisterTypeface(SKTypeface typeface)
method RegisterTypeface (line 132) | public void RegisterTypeface(SKTypeface typeface, string family_name_a...
method GetFamilyCount (line 155) | public override int GetFamilyCount()
method GetFamilyName (line 165) | public override string GetFamilyName(int index)
method MatchFamily (line 173) | public override SkFontStyleSet MatchFamily(string family_name)
FILE: FlutterBinding/UI/Compositing.cs
class Scene (line 19) | public class Scene : NativeScene
method Scene (line 23) | public Scene(Layer rootLayer,
method toImage (line 31) | public Future<SKImage> toImage(int width, int height)
method _toImage (line 40) | String _toImage(int width, int height, _Callback<SKImage> callback)
method dispose (line 51) | public void dispose()
class SceneBuilder (line 64) | public class SceneBuilder : NativeSceneBuilder
method SceneBuilder (line 67) | public SceneBuilder() { _constructor(); }
method _constructor (line 68) | void _constructor()
method pushTransform (line 79) | public void pushTransform(List<double> matrix4)
method _pushTransform (line 87) | void _pushTransform(List<double> matrix4)
method pushOffset (line 98) | public NativeEngineLayer pushOffset(double dx, double dy)
method pushClipRect (line 110) | public void pushClipRect(Rect rect, Clip clipBehavior = Clip.antiAlias)
method _pushClipRect (line 117) | void _pushClipRect(double left,
method pushClipRRect (line 133) | public void pushClipRRect(RRect rrect, Clip clipBehavior = Clip.antiAl...
method _pushClipRRect (line 139) | void _pushClipRRect(List<double> rrect, int clipBehavior)
method pushClipPath (line 150) | public void pushClipPath(Path path, Clip clipBehavior = Clip.antiAlias)
method _pushClipPath (line 156) | void _pushClipPath(Path path, int clipBehavior)
method pushOpacity (line 169) | public void pushOpacity(int alpha, Offset offset = null)
method _pushOpacity (line 176) | void _pushOpacity(int alpha, double dx, double dy)
method pushColorFilter (line 187) | public void pushColorFilter(Color color, BlendMode blendMode)
method _pushColorFilter (line 191) | void _pushColorFilter(uint color, int blendMode)
method pushBackdropFilter (line 202) | public void pushBackdropFilter(ImageFilter filter)
method pushShaderMask (line 213) | public void pushShaderMask(SKShader shader, Rect maskRect, BlendMode b...
method _pushShaderMask (line 222) | void _pushShaderMask(SKShader shader,
method pushPhysicalShape (line 245) | public NativeEngineLayer pushPhysicalShape(Path path, double elevation...
method _pushPhysicalShape (line 249) | NativeEngineLayer _pushPhysicalShape(Path path, double elevation, uint...
method pop (line 261) | public void pop()
method addRetained (line 275) | public NativeEngineLayer addRetained(NativeEngineLayer retainedLayer)
method addPerformanceOverlay (line 305) | public void addPerformanceOverlay(int enabledOptions, Rect bounds)
method _addPerformanceOverlay (line 313) | void _addPerformanceOverlay(int enabledOptions,
method addPicture (line 325) | public void addPicture(Offset offset, SKPicture picture, bool isComple...
method _addPicture (line 334) | void _addPicture(double dx, double dy, SKPicture picture, int hints)
method addTexture (line 351) | public void addTexture(int textureId, Offset offset = null, double wid...
method _addTexture (line 359) | void _addTexture(double dx, double dy, double width, double height, in...
method addPlatformView (line 367) | public void addPlatformView(int viewId, Offset offset = null, double w...
method _addPlatformView (line 374) | void _addPlatformView(double dx, double dy, double width, double heigh...
method addChildScene (line 381) | public void addChildScene(
method _addChildScene (line 399) | void _addChildScene(double dx,
method setRasterizerTracingThreshold (line 416) | public void setRasterizerTracingThreshold(int frameInterval)
method setCheckerboardRasterCacheImages (line 437) | public void setCheckerboardRasterCacheImages(bool checkerboard)
method setCheckerboardOffscreenLayers (line 446) | public void setCheckerboardOffscreenLayers(bool checkerboard)
method build (line 459) | public Scene build()
class SceneHost (line 467) | public class SceneHost : NativeFieldWrapperClass2
method SceneHost (line 481) | public SceneHost(object exportTokenHandle)
method _constructor (line 485) | void _constructor(object exportTokenHandle)
method dispose (line 493) | public void dispose()
FILE: FlutterBinding/UI/FlutterSurface.cs
class FlutterSurface (line 5) | public class FlutterSurface
method FlutterSurface (line 9) | public FlutterSurface(float scale)
method OnPaintSurface (line 14) | public void OnPaintSurface(SKSurface surface, SKImageInfo info)
FILE: FlutterBinding/UI/Geometry.cs
class OffsetBase (line 11) | public abstract class OffsetBase
method OffsetBase (line 18) | public OffsetBase(double _dx, double _dy)
method toString (line 103) | public String toString() => $"{nameof(OffsetBase)}({_dx.toStringAsFixe...
class Offset (line 127) | public class Offset : OffsetBase
method Offset (line 131) | public Offset(double dx, double dy) : base(dx, dy) { }
method scale (line 215) | public Offset scale(double scaleX, double scaleY) => new Offset(dx * s...
method translate (line 229) | public Offset translate(double translateX, double translateY) => new O...
method lerp (line 316) | public static Offset lerp(Offset a, Offset b, double t)
method toString (line 342) | public String toString() => $"Offset({dx.toStringAsFixed(1)}, {dy.toSt...
class Size (line 348) | public class Size : OffsetBase
method Size (line 351) | public Size(double width, double height) : base(width, height) { }
method copy (line 355) | public static Size copy(Size source) => new Size(source.width, source....
method square (line 363) | public static Size square(double dimension) => new Size(dimension, dim...
method fromWidth (line 366) | public static Size fromWidth(double width) => new Size(width, double.P...
method fromHeight (line 369) | public static Size fromHeight(double height) => new Size(double.Positi...
method fromRadius (line 379) | public static Size fromRadius(double radius) => new Size(radius * 2.0,...
method topLeft (line 479) | public Offset topLeft(Offset origin) => origin;
method topCenter (line 485) | public Offset topCenter(Offset origin) => new Offset(origin.dx + width...
method topRight (line 492) | public Offset topRight(Offset origin) => new Offset(origin.dx + width,...
method centerLeft (line 498) | public Offset centerLeft(Offset origin) => new Offset(origin.dx, origi...
method center (line 505) | public Offset center(Offset origin) => new Offset(origin.dx + width / ...
method centerRight (line 511) | public Offset centerRight(Offset origin) => new Offset(origin.dx + wid...
method bottomLeft (line 518) | public Offset bottomLeft(Offset origin) => new Offset(origin.dx, origi...
method bottomCenter (line 525) | public Offset bottomCenter(Offset origin) => new Offset(origin.dx + wi...
method bottomRight (line 532) | public Offset bottomRight(Offset origin) => new Offset(origin.dx + wid...
method contains (line 540) | public bool contains(Offset offset)
method lerp (line 563) | public static Size lerp(Size a, Size b, double t)
method toString (line 590) | public String toString() => $"Size({width.toStringAsFixed(1)}, {height...
class Rect (line 602) | public class Rect
method Rect (line 604) | private Rect() { }
method Rect (line 606) | private Rect(double one, double two, double three, double four)
method Rect (line 614) | private Rect(List<double> values)
method fromLTRB (line 620) | public static Rect fromLTRB(double left, double top, double right, dou...
method fromLTWH (line 630) | public static Rect fromLTWH(double left, double top, double width, dou...
method fromCircle (line 645) | public static Rect fromCircle(Offset center = null, double radius = 0.0)
method fromPoints (line 660) | public static Rect fromPoints(Offset a, Offset b)
method shift (line 728) | public Rect shift(Offset offset)
method translate (line 738) | public Rect translate(double translateX, double translateY)
method inflate (line 744) | public Rect inflate(double delta)
method deflate (line 750) | public Rect deflate(double delta) => inflate(-delta);
method intersect (line 756) | public Rect intersect(Rect other)
method expandToInclude (line 768) | public Rect expandToInclude(Rect other)
method overlaps (line 778) | public bool overlaps(Rect other)
method contains (line 847) | public bool contains(Offset offset)
method lerp (line 867) | public static Rect lerp(Rect a, Rect b, double t)
method toString (line 905) | public String toString() => $"Rect.fromLTRB({left.toStringAsFixed(1)},...
class Radius (line 909) | public class Radius
method circular (line 912) | public static Radius circular(double radius)
method elliptical (line 918) | public static Radius elliptical(double x, double y)
method Radius (line 922) | private Radius(double x, double y)
method lerp (line 1007) | public static Radius lerp(Radius a, Radius b, double t)
method toString (line 1038) | public String toString()
class RRect (line 1047) | public class RRect
method RRect (line 1049) | private RRect(List<double> value)
method fromLTRBXY (line 1056) | public static RRect fromLTRBXY(double left, double top, double right, ...
method fromLTRBR (line 1080) | public static RRect fromLTRBR(double left, double top, double right, d...
method fromRectXY (line 1103) | public static RRect fromRectXY(Rect rect, double radiusX, double radiusY)
method fromRectAndRadius (line 1125) | public static RRect fromRectAndRadius(Rect rect, Radius radius)
method fromLTRBAndCorners (line 1149) | public static RRect fromLTRBAndCorners(
method fromRectAndCorners (line 1194) | public static RRect fromRectAndCorners(
method _fromList (line 1230) | static RRect _fromList(List<double> list)
method shift (line 1295) | public RRect shift(Offset offset)
method inflate (line 1323) | public RRect inflate(double delta)
method deflate (line 1350) | public RRect deflate(double delta) => inflate(-delta);
method _getMin (line 1492) | double _getMin(double min, double radius1, double radius2, double limit)
method _scaleRadii (line 1505) | void _scaleRadii()
method contains (line 1534) | public bool contains(Offset point)
method lerp (line 1607) | public static RRect lerp(RRect a, RRect b, double t)
method toString (line 1679) | public String toString()
class RSTransform (line 1708) | public class RSTransform
method RSTransform (line 1734) | RSTransform(double scos, double ssin, double tx, double ty)
method fromComponents (line 1761) | public static RSTransform fromComponents(double rotation = 0.0,
FILE: FlutterBinding/UI/Hooks.cs
class Hooks (line 10) | public static class Hooks
method _updateWindowMetrics (line 12) | static void _updateWindowMetrics(double devicePixelRatio,
method _localeClosure (line 42) | static String _localeClosure() => Window.Instance.locale.toString();
method _getLocaleClosure (line 44) | static _LocaleClosure _getLocaleClosure() => _localeClosure;
method _updateLocales (line 46) | static void _updateLocales(List<String> locales)
method _updateUserSettingsData (line 59) | static void _updateUserSettingsData(String jsonData)
method _updateTextScaleFactor (line 66) | static void _updateTextScaleFactor(double textScaleFactor)
method _updateAlwaysUse24HourFormat (line 72) | static void _updateAlwaysUse24HourFormat(bool alwaysUse24HourFormat)
method _updateSemanticsEnabled (line 77) | static void _updateSemanticsEnabled(bool enabled)
method _updateAccessibilityFeatures (line 83) | static void _updateAccessibilityFeatures(int values)
method _dispatchPlatformMessage (line 92) | static void _dispatchPlatformMessage(String name, ByteData data, int r...
method _dispatchPointerDataPacket (line 112) | static void _dispatchPointerDataPacket(ByteData packet)
method _dispatchSemanticsAction (line 118) | static void _dispatchSemanticsAction(int id, int action, ByteData args)
method _beginFrame (line 128) | static void _beginFrame(int microseconds)
method _drawFrame (line 133) | static void _drawFrame()
method _invoke (line 139) | static void _invoke(VoidCallback callback, Zone zone)
method _invoke1 (line 157) | static void _invoke1<A>(Action<A> callback, Zone zone, A arg)
method _invoke2 (line 173) | static void _invoke2<A1, A2>(Action<A1, A2> callback, Zone zone, A1 ar...
method _invoke3 (line 189) | static void _invoke3<A1, A2, A3>(Action<A1, A2, A3> callback, Zone zon...
method _unpackPointerDataPacket (line 213) | static PointerDataPacket _unpackPointerDataPacket(ByteData packet)
FILE: FlutterBinding/UI/ICanvas.cs
type ICanvas (line 6) | public interface ICanvas
method ClipPath (line 8) | void ClipPath(Path path, bool doAntiAlias = true);
method ClipRect (line 9) | void ClipRect(Rect rect, ClipOp clipOp = default(ClipOp), bool doAntiA...
method ClipRRect (line 10) | void ClipRRect(RRect rrect, bool doAntiAlias = true);
method DrawColor (line 11) | void DrawColor(Color color, BlendMode blendMode);
method DrawImageNine (line 12) | void DrawImageNine(SKImage image, Rect center, Rect dst, SKPaint paint);
method DrawLine (line 13) | void DrawLine(Offset p1, Offset p2, SKPaint paint);
method DrawPaint (line 14) | void DrawPaint(SKPaint paint);
method DrawParagraph (line 15) | void DrawParagraph(Paragraph paragraph, Offset offset);
method DrawPicture (line 16) | void DrawPicture(SKPicture picture);
method DrawPoints (line 17) | void DrawPoints(PointMode pointMode, List<Offset> points, SKPaint paint);
method DrawRawAtlas (line 18) | void DrawRawAtlas(SKImage atlas, List<double> rstTransforms, List<doub...
method DrawRawPoints (line 19) | void DrawRawPoints(PointMode pointMode, List<double> points, SKPaint p...
method DrawShadow (line 20) | void DrawShadow(Path path, Color color, double elevation, bool transpa...
method DrawVertices (line 21) | void DrawVertices(SKVertices vertices, BlendMode blendMode, SKPaint pa...
method GetSaveCount (line 22) | int GetSaveCount();
method Restore (line 23) | void Restore();
method Rotate (line 24) | void Rotate(double radians);
method Save (line 25) | void Save();
method Scale (line 26) | void Scale(double sx, double sy = default(double));
method Skew (line 27) | void Skew(double sx, double sy);
method Transform (line 28) | void Transform(List<float> matrix4);
method Translate (line 29) | void Translate(double dx, double dy);
FILE: FlutterBinding/UI/Lerp.cs
class Lerp (line 3) | public static class Lerp
method lerpDouble (line 5) | public static double lerpDouble(double a, double b, double t)
FILE: FlutterBinding/UI/NativeFieldWrapperClass2.cs
class NativeFieldWrapperClass2 (line 6) | public class NativeFieldWrapperClass2
FILE: FlutterBinding/UI/Painting.cs
class Helper (line 18) | public static class Helper
method ToPoint (line 20) | public static SKPoint ToPoint(this Offset offset) => new SKPoint((floa...
method ToPoints (line 22) | public static List<SKPoint> ToPoints(this List<Offset> offset)
method ToColors (line 31) | public static List<SKColor> ToColors(this List<Color> colors)
method ToRect (line 41) | public static SKRect ToRect(this Rect rect)
method ToRectI (line 44) | public static SKRectI ToRectI(this Rect rect)
method ToRoundedRect (line 47) | public static SKRoundRect ToRoundedRect(this RRect rect)
class Painting (line 52) | public class Painting
method _rectIsValid (line 71) | public static bool _rectIsValid(Rect rect)
method _rrectIsValid (line 78) | public static bool _rrectIsValid(RRect rrect)
method _offsetIsValid (line 85) | public static bool _offsetIsValid(Offset offset)
method _matrix4IsValid (line 92) | public static bool _matrix4IsValid(List<float> matrix4)
method _radiusIsValid (line 99) | public static bool _radiusIsValid(Radius radius)
method _scaleAlpha (line 106) | public static Color _scaleAlpha(Color a, double factor)
method _encodeColorList (line 111) | public static List<uint> _encodeColorList(List<Color> colors)
method _encodePointList (line 120) | public static List<double> _encodePointList(List<Offset> points)
method _encodeTwoPoints (line 137) | public static List<double> _encodeTwoPoints(Offset pointA, Offset pointB)
method instantiateImageCodec (line 179) | public Task<SKCodec> instantiateImageCodec(List<int> list,
method _instantiateImageCodec (line 189) | String _instantiateImageCodec(List<int> list, _Callback<SKCodec> callb...
method decodeImageFromList (line 196) | void decodeImageFromList(List<int> list, ImageDecoderCallback callback)
method _decodeImageFromListAsync (line 201) | async Task _decodeImageFromListAsync(List<int> list,
method decodeImageFromPixels (line 225) | public void decodeImageFromPixels(
class Color (line 272) | public class Color
method Color (line 291) | public Color(uint value)
method fromARGB (line 308) | public static Color fromARGB(uint a, uint r, uint g, uint b)
method fromRGBO (line 328) | public static Color fromRGBO(int r, int g, int b, double opacity)
method withAlpha (line 372) | public Color withAlpha(uint a)
method withOpacity (line 381) | public Color withOpacity(double opacity)
method withRed (line 391) | public Color withRed(uint r)
method withGreen (line 400) | public Color withGreen(uint g)
method withBlue (line 409) | public Color withBlue(uint b)
method _linearizeColorComponent (line 415) | static double _linearizeColorComponent(double component)
method computeLuminance (line 428) | public double computeLuminance()
method lerp (line 459) | public static Color lerp(Color a, Color b, double t)
method alphaBlend (line 483) | static Color alphaBlend(Color foreground, Color background)
method toString (line 527) | public String toString() => $"Color(0x{value.toRadixString(16).PadLeft...
type BlendMode (line 579) | public enum BlendMode
type FilterQuality (line 1005) | public enum FilterQuality
type StrokeCap (line 1039) | public enum StrokeCap
type StrokeJoin (line 1086) | public enum StrokeJoin
type PaintingStyle (line 1138) | public enum PaintingStyle
type Clip (line 1157) | public enum Clip
class Paint (line 1236) | public class Paint
method toString (line 1654) | public String toString()
type ImageByteFormat (line 1726) | public enum ImageByteFormat
type PixelFormat (line 1758) | public enum PixelFormat
class _ImageInfo (line 1771) | public class _ImageInfo
method _ImageInfo (line 1773) | public _ImageInfo(int width, int height, int format, int? rowBytes)
type PathFillType (line 1798) | public enum PathFillType
type PathOperation (line 1825) | public enum PathOperation
class Path (line 1893) | public class Path : NativePath
method Path (line 1896) | public Path() { _constructor(); }
method _constructor (line 1897) | void _constructor()
method from (line 1906) | public static Path from(Path source)
method _clone (line 1910) | Path _clone()
method _getFillType (line 1924) | int _getFillType()
method _setFillType (line 1928) | void _setFillType(int fillType)
method moveTo (line 1934) | public void moveTo(double x, double y)
method relativeMoveTo (line 1940) | public void relativeMoveTo(double dx, double dy)
method lineTo (line 1947) | public void lineTo(double x, double y)
method relativeLineTo (line 1954) | public void relativeLineTo(double dx, double dy)
method quadraticBezierTo (line 1962) | public void quadraticBezierTo(double x1, double y1, double x2, double y2)
method relativeQuadraticBezierTo (line 1971) | public void relativeQuadraticBezierTo(double x1, double y1, double x2,...
method cubicTo (line 1979) | public void cubicTo(double x1, double y1, double x2, double y2, double...
method relativeCubicTo (line 1988) | public void relativeCubicTo(double x1, double y1, double x2, double y2...
method conicTo (line 1998) | public void conicTo(double x1, double y1, double x2, double y2, double w)
method relativeConicTo (line 2009) | public void relativeConicTo(double x1, double y1, double x2, double y2...
method arcTo (line 2030) | public void arcTo(Rect rect, double startAngle, double sweepAngle, boo...
method _arcTo (line 2034) | void _arcTo(double left, double top, double right, double bottom,
method arcToPoint (line 2052) | public void arcToPoint(Offset arcEnd,
method _arcToPoint (line 2065) | void _arcToPoint(double arcEndX, double arcEndY, double radiusX,
method relativeArcToPoint (line 2092) | public void relativeArcToPoint(Offset arcEndDelta,
method _relativeArcToPoint (line 2105) | void _relativeArcToPoint(double arcEndX, double arcEndY, double radiusX,
method addRect (line 2120) | public void addRect(Rect rect)
method _addRect (line 2125) | void _addRect(double left, double top, double right, double bottom)
method addOval (line 2135) | public void addOval(Rect oval)
method _addOval (line 2140) | void _addOval(double left, double top, double right, double bottom)
method addArc (line 2153) | public void addArc(Rect oval, double startAngle, double sweepAngle)
method _addArc (line 2158) | void _addArc(double left, double top, double right, double bottom,
method addPolygon (line 2171) | public void addPolygon(List<Offset> points, bool close)
method _addPolygon (line 2176) | void _addPolygon(List<Offset> points, bool close)
method addRRect (line 2187) | public void addRRect(RRect rrect)
method addPath (line 2201) | public void addPath(Path path, Offset offset, List<float> matrix4 = null)
method _addPath (line 2215) | void _addPath(Path path, double dx, double dy)
method _addPathWithMatrix (line 2219) | void _addPathWithMatrix(Path path, double dx, double dy, List<float> m...
method extendWithPath (line 2233) | public void extendWithPath(Path path, Offset offset, List<float> matri...
method _extendWithPath (line 2247) | void _extendWithPath(Path path, double dx, double dy)
method _extendWithPathAndMatrix (line 2252) | void _extendWithPathAndMatrix(Path path, double dx, double dy, List<fl...
method close (line 2262) | public void close()
method reset (line 2270) | public void reset()
method contains (line 2282) | public bool contains(Offset point)
method _contains (line 2287) | bool _contains(double x, double y)
method shift (line 2294) | public Path shift(Offset offset)
method _shift (line 2299) | Path _shift(double dx, double dy)
method transform (line 2308) | public Path transform(List<float> matrix4)
method _transform (line 2313) | Path _transform(List<float> matrix4)
method getBounds (line 2335) | public Rect getBounds()
method _getBounds (line 2340) | List<float> _getBounds()
method combine (line 2359) | public static Path combine(PathOperation operation, Path path1, Path p...
method computeMetrics (line 2375) | public PathMetrics computeMetrics(bool forceClosed = false)
class Tangent (line 2385) | public class Tangent
method Tangent (line 2390) | public Tangent(Offset position, Offset vector)
method fromAngle (line 2403) | public static Tangent fromAngle(Offset position, double angle)
class PathMetrics (line 2450) | public class PathMetrics : List<PathMetric>
method PathMetrics (line 2452) | internal PathMetrics(Path path, bool forceClosed)
class PathMetricIterator (line 2461) | public class PathMetricIterator : List<PathMetric>
method PathMetricIterator (line 2463) | internal PathMetricIterator(PathMetric _pathMetric)
method moveNext (line 2473) | public bool moveNext()
class PathMetric (line 2499) | public class PathMetric : NativePathMetric
method PathMetric (line 2503) | internal PathMetric(Path path, bool forceClosed) : base(path, forceClo...
method getTangentForOffset (line 2521) | public Tangent getTangentForOffset(double distance)
method extractPath (line 2544) | public Path extractPath(double start, double end, bool startWithMoveTo...
method _moveNext (line 2575) | public bool _moveNext() => this.NextContour();
type BlurStyle (line 2580) | public enum BlurStyle
class MaskFilter (line 2608) | public class MaskFilter
method blur (line 2628) | public static MaskFilter blur(BlurStyle _style, double _sigma)
method MaskFilter (line 2635) | private MaskFilter(BlurStyle style, double sigma)
method toString (line 2662) | public String toString() => $"MaskFilter.blur({_style}, {_sigma.toStri...
class ColorFilter (line 2673) | public class ColorFilter
method mode (line 2682) | public static ColorFilter mode(Color color, BlendMode blendMode)
method ColorFilter (line 2687) | public ColorFilter(Color color, BlendMode blendMode)
method toString (line 2709) | public String toString() => $"ColorFilter({_color}, {_blendMode})";
class ImageFilter (line 2719) | public class ImageFilter : NativeFieldWrapperClass2
method blur (line 2722) | public static SKImageFilter blur(double sigmaX = 0.0, double sigmaY = ...
method matrix (line 2731) | public static SKImageFilter matrix(List<float> matrix4,
type TileMode (line 2762) | public enum TileMode
class Gradient (line 2800) | public class Gradient
method linear (line 2820) | public static SKShader linear(
method radial (line 2864) | public static SKShader radial(
method sweep (line 2922) | public static SKShader sweep(
method _validateColorStops (line 2945) | static void _validateColorStops(List<Color> colors, List<double> color...
class ImageShader (line 2961) | public class ImageShader
method ToImageShader (line 2968) | public static SKShader ToImageShader(SKImage image, TileMode tmx, Tile...
type VertexMode (line 2985) | public enum VertexMode
class Vertices (line 2998) | public class Vertices
method Raw (line 3000) | public static SKVertices Raw(
type PointMode (line 3034) | public enum PointMode
type ClipOp (line 3066) | public enum ClipOp
class Canvas (line 3092) | public class Canvas : NativeCanvas, ICanvas
method Canvas (line 3106) | public Canvas(PictureRecorder recorder, Rect cullRect = null) : base(n...
method _constructor (line 3114) | void _constructor(PictureRecorder recorder,
method Save (line 3132) | public void Save() => this.Save();
method saveLayer (line 3243) | void saveLayer(Rect bounds, SKPaint paint)
method Restore (line 3264) | public void Restore()
method GetSaveCount (line 3276) | public int GetSaveCount() => this.SaveCount;
method Translate (line 3280) | public void Translate(double dx, double dy) => this.Translate((float)d...
method Scale (line 3288) | public void Scale(double sx, double sy = default(double)) => _scale(sx...
method _scale (line 3290) | void _scale(double sx, double sy)
method Rotate (line 3297) | public void Rotate(double radians)
method Skew (line 3306) | public void Skew(double sx, double sy)
method Transform (line 3313) | public void Transform(List<float> matrix4)
method _transform (line 3320) | void _transform(List<float> matrix4)
method ClipRect (line 3337) | public void ClipRect(Rect rect, ClipOp clipOp = default(ClipOp), bool ...
method ClipRRect (line 3354) | public void ClipRRect(RRect rrect, bool doAntiAlias = true)
method ClipPath (line 3370) | public void ClipPath(Path path, bool doAntiAlias = true)
method DrawColor (line 3380) | public void DrawColor(Color color, BlendMode blendMode)
method DrawLine (line 3391) | public void DrawLine(Offset p1, Offset p2, SKPaint paint)
method DrawPaint (line 3405) | public void DrawPaint(SKPaint paint)
method drawRect (line 3413) | void drawRect(Rect rect, SKPaint paint)
method drawRRect (line 3422) | void drawRRect(RRect rrect, SKPaint paint)
method drawDRRect (line 3434) | void drawDRRect(RRect outer, RRect inner, Paint paint)
method drawOval (line 3447) | void drawOval(Rect rect, SKPaint paint)
method drawCircle (line 3458) | void drawCircle(Offset c, double radius, SKPaint paint)
method drawArc (line 3475) | void drawArc(Rect rect, double startAngle, double sweepAngle, bool use...
method drawPath (line 3487) | void drawPath(Path path, SKPaint paint)
method drawImage (line 3496) | void drawImage(SKImage image, Offset p, SKPaint paint)
method drawImageRect (line 3513) | void drawImageRect(SKImage image, Rect src, Rect dst, SKPaint paint)
method DrawImageNine (line 3536) | public void DrawImageNine(SKImage image, Rect center, Rect dst, SKPain...
method DrawPicture (line 3549) | public void DrawPicture(SKPicture picture)
method DrawParagraph (line 3575) | public void DrawParagraph(Paragraph paragraph, Offset offset)
method DrawPoints (line 3590) | public void DrawPoints(PointMode pointMode, List<Offset> points, SKPai...
method DrawRawPoints (line 3607) | public void DrawRawPoints(PointMode pointMode, List<double> points, SK...
method DrawVertices (line 3626) | public void DrawVertices(SKVertices vertices, BlendMode blendMode, SKP...
method drawAtlas (line 3639) | void drawAtlas(SKImage atlas,
method DrawRawAtlas (line 3706) | public void DrawRawAtlas(SKImage atlas,
method _drawAtlas (line 3736) | void _drawAtlas(List<Object> paintObjects,
method DrawShadow (line 3754) | public void DrawShadow(Path path, Color color, double elevation, bool ...
class PictureRecorder (line 3771) | public class PictureRecorder : NativePictureRecorder
method endRecording (line 3794) | public SKPicture endRecording()
class Shadow (line 3803) | public class Shadow
method Shadow (line 3815) | public Shadow(Color color = null,
method convertRadiusToSigma (line 3865) | static double convertRadiusToSigma(double radius)
method toPaint (line 3884) | public Paint toPaint()
method scale (line 3895) | public Shadow scale(double factor)
method lerp (line 3922) | public static Shadow lerp(Shadow a, Shadow b, double t)
method lerpList (line 3942) | static List<Shadow> lerpList(List<Shadow> a, List<Shadow> b, double t)
method _shadowsListEquals (line 3985) | public static bool _shadowsListEquals(List<Shadow> a, List<Shadow> b)
method _encodeShadows (line 4001) | public static ByteData _encodeShadows(List<Shadow> shadows)
method toString (line 4033) | public String toString() => $"TextShadow({color}, {offset}, {blurRadiu...
FILE: FlutterBinding/UI/Pointer.cs
type PointerChange (line 9) | public enum PointerChange
type PointerDeviceKind (line 42) | public enum PointerDeviceKind
class PointerData (line 61) | public class PointerData
method PointerData (line 64) | public PointerData(
method toString (line 221) | public String toString() => $"{nameof(PointerData)}(x: {physicalX}, y:...
method toStringFull (line 224) | public String toStringFull()
class PointerDataPacket (line 250) | public class PointerDataPacket
method PointerDataPacket (line 253) | public PointerDataPacket(List<PointerData> data = null)
FILE: FlutterBinding/UI/Semantics.cs
class SemanticsAction (line 9) | public class SemanticsAction
method SemanticsAction (line 11) | private SemanticsAction(int index)
method toString (line 215) | public String toString()
class SemanticsFlag (line 267) | public class SemanticsFlag
method SemanticsFlag (line 289) | public SemanticsFlag(int index)
method toString (line 511) | public String toString()
class SemanticsUpdateBuilder (line 562) | public class SemanticsUpdateBuilder : NativeFieldWrapperClass2
method SemanticsUpdateBuilder (line 566) | public SemanticsUpdateBuilder() { _constructor(); }
method _constructor (line 567) | void _constructor()
method updateNode (line 622) | public void updateNode(
method _updateNode (line 675) | void _updateNode(
method updateCustomAction (line 719) | void updateCustomAction(int id = 0, String label = "", String hint = "...
method _updateCustomAction (line 725) | void _updateCustomAction(int id, String label, String hint, int overri...
method build (line 735) | public SemanticsUpdate build()
class SemanticsUpdate (line 749) | public class SemanticsUpdate : NativeFieldWrapperClass2
method dispose (line 762) | void dispose()
FILE: FlutterBinding/UI/Text.cs
type FontStyle (line 14) | public enum FontStyle
class FontWeight (line 24) | public class FontWeight
method FontWeight (line 26) | private FontWeight(int index)
method lerp (line 92) | public static FontWeight lerp(FontWeight a, FontWeight b, double t)
method toString (line 98) | public String toString()
type TextAlign (line 116) | public enum TextAlign
type TextBaseline (line 149) | public enum TextBaseline
class TextDecoration (line 159) | public class TextDecoration
method TextDecoration (line 161) | public TextDecoration(int _mask)
method combine (line 167) | public TextDecoration combine(List<TextDecoration> decorations)
method contains (line 178) | bool contains(TextDecoration other)
method toString (line 207) | public String toString()
type TextDecorationStyle (line 225) | public enum TextDecorationStyle
class TextStyle (line 245) | public class TextStyle
method TextStyle (line 264) | public TextStyle(
method toString (line 356) | public String toString()
class ParagraphStyle (line 382) | public class ParagraphStyle
method ParagraphStyle (line 429) | public ParagraphStyle(
method toString (line 496) | String toString()
type TextDirection (line 598) | public enum TextDirection
class TextBox (line 610) | public class TextBox
method fromLTRBD (line 613) | public static TextBox fromLTRBD(double left,
method TextBox (line 623) | public TextBox(double left,
method toRect (line 655) | public Rect toRect() => Rect.fromLTRB(left, top, right, bottom);
method toString (line 689) | public String toString() => $"TextBox.fromLTRBD({left.toStringAsFixed(...
type TextAffinity (line 699) | public enum TextAffinity
class TextPosition (line 715) | public class TextPosition
method TextPosition (line 720) | public TextPosition(int offset = 0,
method toString (line 758) | public String toString()
class ParagraphConstraints (line 770) | public class ParagraphConstraints
method ParagraphConstraints (line 775) | public ParagraphConstraints(double width = 0.0) //: assert(width != nu...
method toString (line 811) | public String toString() => $"{GetType().ToString()}(width: {width})";
class Paragraph (line 823) | public class Paragraph : NativeParagraph
method Paragraph (line 830) | public Paragraph() { }
method layout (line 874) | public void layout(ParagraphConstraints constraints) => _layout(constr...
method _layout (line 875) | void _layout(double width)
method getBoxesForRange (line 882) | public List<TextBox> getBoxesForRange(int start, int end)
method getPositionForOffset (line 889) | TextPosition getPositionForOffset(Offset offset)
method _getPositionForOffset (line 894) | List<int> _getPositionForOffset(double dx, double dy)
method getWordBoundary (line 905) | public List<int> getWordBoundary(int offset)
method _paint (line 914) | public void _paint(SkiaSharp.SKCanvas canvas, double x, double y)
class ParagraphBuilder (line 935) | public class ParagraphBuilder : NativeParagraphBuilder
method ParagraphBuilder (line 941) | public ParagraphBuilder(ParagraphStyle style) : base(style._encoded, s...
method _constructor (line 945) | void _constructor(List<int> encoded, String fontFamily, double fontSiz...
method pushStyle (line 954) | void pushStyle(TextStyle style) => _pushStyle(style._encoded, style._f...
method _pushStyle (line 955) | void _pushStyle(List<int> encoded, String fontFamily, double fontSize,...
method _encodeLocale (line 960) | static String _encodeLocale(Locale locale) => locale?.toString() ?? "";
method pop (line 968) | public void pop()
method addText (line 976) | public void addText(String text)
method _addText (line 982) | String _addText(String text)
method build (line 993) | public Paragraph build()
class Text (line 1000) | public static class Text
method loadFontFromList (line 1007) | static Task loadFontFromList(List<int> list, String fontFamily = "")
method _loadFontFromList (line 1014) | static String _loadFontFromList(List<int> list, _Callback callback, St...
method _encodeParagraphStyle (line 1037) | public static List<int> _encodeParagraphStyle(
method _encodeTextStyle (line 1131) | public static List<int> _encodeTextStyle(
FILE: FlutterBinding/UI/Window.cs
type AppLifecycleState (line 42) | public enum AppLifecycleState
class WindowPadding (line 98) | public class WindowPadding
method WindowPadding (line 100) | public WindowPadding(double left, double top, double right, double bot...
method toString (line 123) | public String toString()
class Locale (line 144) | public class Locale
method Locale (line 164) | public Locale(string _languageCode, string _countryCode = "")
method _canonicalizeLanguageCode (line 191) | static String _canonicalizeLanguageCode(String languageCode)
method _canonicalizeRegionCode (line 296) | static String _canonicalizeRegionCode(String regionCode)
method toString (line 339) | public String toString()
class Window (line 351) | public class Window: Engine.Window.NativeWindow
method Window (line 357) | private Window() { }
method _defaultRouteName (line 674) | String _defaultRouteName()
method scheduleFrame (line 688) | public void scheduleFrame()
method render (line 717) | public void render(Scene scene)
method updateSemantics (line 792) | public void updateSemantics(SemanticsUpdate update)
method setIsolateDebugName (line 805) | public void setIsolateDebugName(String name)
method sendPlatformMessage (line 819) | public void sendPlatformMessage(String name,
method _sendPlatformMessage (line 828) | String _sendPlatformMessage(String name,
method _respondToPlatformMessage (line 862) | public void _respondToPlatformMessage(int responseId, ByteData data)
method _zonedPlatformMessageResponseCallback (line 868) | static PlatformMessageResponseCallback _zonedPlatformMessageResponseCa...
class AccessibilityFeatures (line 886) | public class AccessibilityFeatures
method AccessibilityFeatures (line 888) | public AccessibilityFeatures(int _index) { this._index = _index; }
method toString (line 922) | public String toString()
FILE: FlutterBindingSample/App.xaml.cs
class App (line 23) | sealed partial class App : Application
method App (line 29) | public App()
method OnLaunched (line 40) | protected override void OnLaunched(LaunchActivatedEventArgs e)
method OnNavigationFailed (line 84) | void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
method OnSuspending (line 96) | private void OnSuspending(object sender, SuspendingEventArgs e)
FILE: FlutterBindingSample/MainPage.xaml.cs
class MainPage (line 13) | public sealed partial class MainPage : Page
method MainPage (line 15) | public MainPage()
class MyApp (line 20) | public class MyApp : StatelessWidget
method Build (line 22) | public override Widget Build(BuildContext context)
method OnCanvasViewPaintSurface (line 32) | public void OnCanvasViewPaintSurface(object sender, SKPaintSurfaceEven...
method BeginFrame (line 47) | public void BeginFrame()
FILE: FlutterSDK/Mappings/Global.cs
type IException (line 40) | public interface IException { }
class RegExp (line 42) | public class RegExp
class StreamSubscription (line 46) | public class StreamSubscription<T> { }
class File (line 47) | public class File
class SplayTreeMap (line 53) | public class SplayTreeMap<K, V> : Dictionary<K, V> { }
class SendPort (line 55) | public class SendPort { }
class Uint8Buffer (line 57) | public class Uint8Buffer { }
class Element (line 59) | public class Element
class Picture (line 64) | public class Picture
class EngineLa (line 69) | public class EngineLa
class Pattern (line 74) | public class Pattern
class Float32List (line 78) | public class Float32List
class Int32List (line 83) | public class Int32List
class Comparable (line 88) | public class Comparable<T>
method Compare (line 90) | public Comparable<T> Compare(Comparable<T> a, Comparable<T> b)
class Int64List (line 97) | public class Int64List
class Float64List (line 102) | public class Float64List
class Uint8List (line 107) | public class Uint8List: List<ushort>
type TextDirection (line 112) | public enum TextDirection
type TextAlign (line 118) | public enum TextAlign
class Matrix4 (line 123) | public class Matrix4 // TODO
class Function (line 128) | public class Function
class Radius (line 131) | public class Radius
class LinkedHashSet (line 134) | public class LinkedHashSet<T> : HashSet<T> { }
class Completer (line 136) | public class Completer<T> // todo
method complete (line 140) | public void complete(T callback)
class Stream (line 146) | public class Stream<T> // todo
class Timeline (line 151) | public class Timeline
class Null (line 156) | public class Null // todo
class StackTrace (line 159) | public class StackTrace // This is really just a string equivalent in .N...
class AssertionError (line 162) | public class AssertionError : System.Exception
method AssertionError (line 164) | public AssertionError() { }
method AssertionError (line 165) | public AssertionError(string message): base(message) { }
class Rect (line 170) | public class Rect { }
class Color (line 171) | public class Color
method Color (line 173) | public Color(uint? i)
class Size (line 178) | public class Size
method Size (line 180) | public Size(double? height)
method Size (line 185) | public Size(double? width, double? height)
class Offset (line 196) | public class Offset //TODO
method Offset (line 198) | public Offset() { }
method Offset (line 199) | public Offset(double? one, double? two) { }
class ByteData (line 207) | public class ByteData //TODO
class Future (line 210) | public class Future
method Wait (line 219) | public virtual Future<List<T>> Wait<T>(Iterable<Future<T>> futures, bo...
method Any (line 222) | public virtual Future<T> Any<T>(Iterable<Future<T>> futures) { throw n...
method ForEach (line 225) | public virtual Future<T> ForEach<T>(Iterable<T> elements, Func<FutureO...
method DoWhile (line 228) | public virtual Future<T> DoWhile(Func<FutureOr<bool>> action) { throw ...
method Future (line 230) | public Future() { }
method Future (line 231) | public Future(Func<T> func) { }
class Future (line 217) | public class Future<T>: Future
method Wait (line 219) | public virtual Future<List<T>> Wait<T>(Iterable<Future<T>> futures, bo...
method Any (line 222) | public virtual Future<T> Any<T>(Iterable<Future<T>> futures) { throw n...
method ForEach (line 225) | public virtual Future<T> ForEach<T>(Iterable<T> elements, Func<FutureO...
method DoWhile (line 228) | public virtual Future<T> DoWhile(Func<FutureOr<bool>> action) { throw ...
method Future (line 230) | public Future() { }
method Future (line 231) | public Future(Func<T> func) { }
type IFuture (line 234) | public interface IFuture<T> { }
class FutureOr (line 236) | public class FutureOr<T>
class HashSet (line 242) | public class HashSet<T> : System.Collections.Generic.HashSet<T>
method From (line 244) | public HashSet<T> From(List<T> newList)
class Timer (line 254) | public class Timer
method run (line 256) | public static void run(Action task)
class AppLifecycleState (line 262) | public class AppLifecycleState
class StringBuffer (line 271) | public class StringBuffer // Similar to System.Text.StringBuilder
method Write (line 274) | public void Write(string value)
method Writeln (line 279) | public void Writeln(string value) => _value += value + '\n';
method Writeln (line 280) | public void Writeln(char value) => _value += value + '\n';
method WriteAll (line 281) | public void WriteAll(List<string> values, char separator) => _value +=...
method ToString (line 283) | public override string ToString()
class Dictionary (line 289) | public class Dictionary<T, V> : System.Collections.Generic.Dictionary<T, V>
method remove (line 291) | public void remove(T element) => this.Remove(element);
class Iterable (line 294) | public class Iterable<T> : List<T>
class Iterator (line 298) | public class Iterator<T> : Iterable<T>, IIterator<T>
type IIterator (line 303) | public interface IIterator<E>
class IterableBase (line 309) | public class IterableBase<E> : Iterator<E>, IEnumerable<E>
method Map (line 311) | public virtual Iterable<T> Map<T>(Func<T, E> f) { throw new NotImpleme...
method Where (line 314) | public virtual Iterable<E> Where(Func<bool, E> test) { throw new NotIm...
method Expand (line 317) | public virtual Iterable<T> Expand<T>(Func<Iterable<T>, E> f) { throw n...
method Take (line 320) | public virtual Iterable<E> Take(int count) { throw new NotImplementedE...
method TakeWhile (line 323) | public virtual Iterable<E> TakeWhile(Func<bool, E> test) { throw new N...
method Skip (line 326) | public virtual Iterable<E> Skip(int count) { throw new NotImplementedE...
method SkipWhile (line 329) | public virtual Iterable<E> SkipWhile(Func<bool, E> test) { throw new N...
method ToList (line 332) | public virtual List<E> ToList(bool growable = default(bool)) { throw n...
class Error (line 336) | public class Error : Exception { }
class Global (line 338) | public static class Global
method Multiply (line 341) | public static string Multiply(this string source, int multiplier)
method IsEmpty (line 352) | public static bool IsEmpty(this string value)
method Identical (line 357) | public static bool Identical(object main, object other)
method DescribeIdentity (line 360) | public static string DescribeIdentity(object obj)
method ShortHash (line 365) | public static string ShortHash(object obj)
method ToUnsigned (line 370) | public static int ToUnsigned(this int value, int bits)
method ToRadixString (line 375) | public static string ToRadixString(this int value, int radix)
method ToDouble (line 394) | public static double ToDouble(this int i) => Convert.ToDouble(i);
method ToDouble (line 395) | public static double ToDouble(this double d) => d;
method Join (line 397) | public static string Join(this List<string> list, string separator) =>...
method Join (line 398) | public static string Join(this List<string> list, char separator) => s...
method TruncateToDouble (line 399) | public static double TruncateToDouble(this double d) => Math.Truncate(d);
method ToStringAsFixed (line 401) | public static string ToStringAsFixed(this double d, int value) => d.To...
method InMicroseconds (line 403) | public static double InMicroseconds(this TimeSpan timespan)
method Clamp (line 408) | public static double Clamp(this double d, double lower, double upper)
method IsFinite (line 419) | public static bool IsFinite(this double d)
method Abs (line 424) | public static double Abs(this double d)
FILE: testbed/test.dart
class Widget (line 1) | class Widget {}
class Row (line 2) | class Row {
class OutlineButton (line 7) | class OutlineButton {
class _OutlineButtonWithIcon (line 11) | class _OutlineButtonWithIcon extends OutlineButton {
Condensed preview — 190 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,439K chars).
[
{
"path": ".gitattributes",
"chars": 2518,
"preview": "###############################################################################\n# Set default behavior to automatically "
},
{
"path": ".gitignore",
"chars": 291,
"preview": "bin/\nobj/\n.vs\n.vscode\n**/*.Android/**/[Rr]esource.[Dd]esigner.cs\n**/*.Droid/**/[Rr]esource.[Dd]esigner.cs\n**/Android/**/"
},
{
"path": "AST/analyzer.dart",
"chars": 3917,
"preview": "import 'package:analyzer/analyzer.dart';\nimport 'package:analyzer/file_system/physical_file_system.dart';\nimport 'dart:i"
},
{
"path": "AST/comments.dart",
"chars": 375,
"preview": "import 'package:analyzer/dart/element/element.dart';\n\nclass Comments {\n static void appendComment(StringBuffer buffer, "
},
{
"path": "AST/config.dart",
"chars": 2302,
"preview": "import 'dart:io';\n\nclass Config {\n\n static const dartSdkEnvVariableName = \"DART_SDK\";\n static bool includeMethodImplem"
},
{
"path": "AST/implementation/conditionals.dart",
"chars": 1744,
"preview": "import 'package:analyzer/dart/ast/ast.dart';\nimport 'implementation.dart';\n\nclass Conditionals {\n static String process"
},
{
"path": "AST/implementation/exceptions.dart",
"chars": 747,
"preview": "import 'package:analyzer/dart/ast/ast.dart';\nimport 'implementation.dart';\n\nclass Exceptions {\n static String processTr"
},
{
"path": "AST/implementation/implementation.dart",
"chars": 27353,
"preview": "import 'package:analyzer/analyzer.dart';\nimport 'package:analyzer/dart/ast/ast.dart';\nimport 'package:analyzer/dart/ast/"
},
{
"path": "AST/implementation/literals.dart",
"chars": 2477,
"preview": "import 'package:analyzer/dart/ast/ast.dart';\nimport 'implementation.dart';\n\nclass Literals {\n static String processNull"
},
{
"path": "AST/implementation/loops.dart",
"chars": 1049,
"preview": "import 'package:analyzer/dart/ast/ast.dart';\nimport 'implementation.dart';\n\nclass Loops {\n static String processForStat"
},
{
"path": "AST/naming.dart",
"chars": 10996,
"preview": "import 'package:analyzer/analyzer.dart';\nimport 'package:analyzer/dart/ast/token.dart';\nimport 'package:analyzer/dart/el"
},
{
"path": "AST/packageResolver.dart",
"chars": 2722,
"preview": "import 'package:analyzer/file_system/file_system.dart' as file_system;\nimport 'package:analyzer/file_system/file_system."
},
{
"path": "AST/pubspec.yaml",
"chars": 56,
"preview": "name: analyzer_export\n\ndependencies:\n analyzer: ^0.33.3"
},
{
"path": "AST/readme.md",
"chars": 322,
"preview": "# Dart to C# transpiler\n\nTODO Intra\n\n## dev prerequisites\n\nTODO what is needed to build this\n-> Config path must be okay"
},
{
"path": "AST/run.bat",
"chars": 25,
"preview": "dart analyzer.dart\n\npause"
},
{
"path": "AST/serialization.dart",
"chars": 3593,
"preview": "// MIT License\n\n// Copyright (c) 2016 Tobe O\n// https://github.com/thosakwe/json_god\n// Modified 2018 Adam Pedley\n\n// Pe"
},
{
"path": "AST/signature/classes.dart",
"chars": 10229,
"preview": "import 'package:analyzer/dart/element/element.dart';\nimport 'package:analyzer/dart/element/type.dart';\n\nimport '../comme"
},
{
"path": "AST/signature/constructors.dart",
"chars": 4858,
"preview": "import 'package:analyzer/analyzer.dart';\nimport 'package:analyzer/dart/element/element.dart';\nimport 'package:analyzer/s"
},
{
"path": "AST/signature/delegates.dart",
"chars": 456,
"preview": "import 'package:analyzer/dart/element/element.dart';\n\nimport '../naming.dart';\nimport 'methods.dart';\n\nclass Delegates {"
},
{
"path": "AST/signature/fields.dart",
"chars": 6879,
"preview": "import 'package:analyzer/dart/element/element.dart';\nimport 'package:analyzer/src/dart/element/element.dart';\nimport 'pa"
},
{
"path": "AST/signature/frame.dart",
"chars": 5619,
"preview": "import 'package:analyzer/dart/element/element.dart';\n\nimport '../comments.dart';\nimport '../config.dart';\nimport '../typ"
},
{
"path": "AST/signature/functions.dart",
"chars": 1286,
"preview": "import 'package:analyzer/dart/element/element.dart';\nimport 'package:analyzer/src/dart/element/type.dart';\n\nimport '../i"
},
{
"path": "AST/signature/methods.dart",
"chars": 11173,
"preview": "import 'package:analyzer/src/dart/element/member.dart';\nimport 'package:analyzer/dart/element/element.dart';\nimport 'pac"
},
{
"path": "AST/types.dart",
"chars": 10614,
"preview": "import 'package:analyzer/dart/element/type.dart';\nimport 'package:analyzer/dart/element/element.dart';\nimport 'package:a"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 3250,
"preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
},
{
"path": "Flutter.Sample.App/Flutter.Sample.App.csproj",
"chars": 235,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <TargetFramework>netstandard2.0</TargetFramework>\n </PropertyG"
},
{
"path": "Flutter.Sample.App/MainPage.cs",
"chars": 3782,
"preview": "namespace Flutter.Sample.App\n{\n // Left here as a sample of what this may look like\n\n //static void main() => run"
},
{
"path": "Flutter.Sample.Droid/Assets/AboutAssets.txt",
"chars": 623,
"preview": "Any raw assets you want to be deployed with your application can be placed in\nthis directory (and child directories) and"
},
{
"path": "Flutter.Sample.Droid/Flutter.Sample.Droid.csproj",
"chars": 5921,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microso"
},
{
"path": "Flutter.Sample.Droid/MainActivity.cs",
"chars": 555,
"preview": "using Android.App;\nusing Android.OS;\nusing Android.Support.V7.App;\nusing Android.Runtime;\nusing Android.Widget;\n\nnamesp"
},
{
"path": "Flutter.Sample.Droid/Properties/AndroidManifest.xml",
"chars": 562,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\" \n "
},
{
"path": "Flutter.Sample.Droid/Properties/AssemblyInfo.cs",
"chars": 1077,
"preview": "using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\nusing Android.App"
},
{
"path": "Flutter.Sample.Droid/Resources/layout/activity_main.axml",
"chars": 320,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xm"
},
{
"path": "Flutter.Sample.Droid/Resources/mipmap-anydpi-v26/ic_launcher.xml",
"chars": 265,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <b"
},
{
"path": "Flutter.Sample.Droid/Resources/mipmap-anydpi-v26/ic_launcher_round.xml",
"chars": 265,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <b"
},
{
"path": "Flutter.Sample.Droid/Resources/values/Strings.xml",
"chars": 136,
"preview": "<resources>\n <string name=\"app_name\">Flutter.Sample.Droid</string>\n <string name=\"action_settings\">Settings</strin"
},
{
"path": "Flutter.Sample.Droid/Resources/values/colors.xml",
"chars": 208,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <color name=\"colorPrimary\">#2c3e50</color>\n <color name=\"color"
},
{
"path": "Flutter.Sample.Droid/Resources/values/ic_launcher_background.xml",
"chars": 120,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <color name=\"ic_launcher_background\">#2C3E50</color>\n</resources>"
},
{
"path": "Flutter.Sample.Droid/Resources/values/styles.xml",
"chars": 383,
"preview": "<resources>\n\n <!-- Base application theme. -->\n <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar"
},
{
"path": "Flutter.Sample.UWP/App.xaml",
"chars": 240,
"preview": "<Application\n x:Class=\"Flutter.Sample.UWP.App\"\n xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\""
},
{
"path": "Flutter.Sample.UWP/App.xaml.cs",
"chars": 3930,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Runtime.InteropService"
},
{
"path": "Flutter.Sample.UWP/Flutter.Sample.UWP.csproj",
"chars": 7095,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"15.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.micros"
},
{
"path": "Flutter.Sample.UWP/MainPage.xaml",
"chars": 480,
"preview": "<fluttershell:FlutterPage\n x:Class=\"Flutter.Sample.UWP.MainPage\"\n xmlns=\"http://schemas.microsoft.com/winfx/2006/"
},
{
"path": "Flutter.Sample.UWP/MainPage.xaml.cs",
"chars": 821,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Runtime.InteropService"
},
{
"path": "Flutter.Sample.UWP/Package.appxmanifest",
"chars": 1587,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<Package\n xmlns=\"http://schemas.microsoft.com/appx/manifest/foundation/windows"
},
{
"path": "Flutter.Sample.UWP/Properties/AssemblyInfo.cs",
"chars": 1053,
"preview": "using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Infor"
},
{
"path": "Flutter.Sample.UWP/Properties/Default.rd.xml",
"chars": 1243,
"preview": "<!--\n This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most\n develope"
},
{
"path": "Flutter.Shell.Droid/Flutter.Shell.Droid.csproj",
"chars": 3763,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microso"
},
{
"path": "Flutter.Shell.Droid/FlutterCanvas.cs",
"chars": 1136,
"preview": "using Android.OS;\nusing Android.Support.V7.App;\nusing FlutterBinding.UI;\nusing SkiaSharp.Views.Android;\n\nnamespace Flut"
},
{
"path": "Flutter.Shell.Droid/Properties/AssemblyInfo.cs",
"chars": 1075,
"preview": "using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\nusing Android.App"
},
{
"path": "Flutter.Shell.Droid/Resources/layout/FlutterPage.axml",
"chars": 378,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n andr"
},
{
"path": "Flutter.Shell.Droid/Resources/values/Strings.xml",
"chars": 139,
"preview": "<resources>\n <string name=\"hello\">Hello World, Click Me!</string>\n <string name=\"app_name\">Flutter.Shell.Droid</st"
},
{
"path": "Flutter.Shell.UWP/Flutter.Shell.UWP.csproj",
"chars": 7138,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"15.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.micros"
},
{
"path": "Flutter.Shell.UWP/FlutterCanvas.cs",
"chars": 1938,
"preview": "using System;\nusing Windows.Graphics.Display;\nusing Windows.UI.Xaml;\nusing Windows.UI.Xaml.Controls;\nusing FlutterBindi"
},
{
"path": "Flutter.Shell.UWP/FlutterPage.xaml",
"chars": 540,
"preview": "<Page\n x:Class=\"Flutter.Shell.UWP.FlutterPage\"\n xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\""
},
{
"path": "Flutter.Shell.UWP/FlutterPage.xaml.cs",
"chars": 955,
"preview": "using Windows.ApplicationModel.Core;\nusing Windows.UI;\nusing Windows.UI.ViewManagement;\nusing Windows.UI.Xaml;\n\nnamespa"
},
{
"path": "Flutter.Shell.UWP/Properties/AssemblyInfo.cs",
"chars": 1051,
"preview": "using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Infor"
},
{
"path": "Flutter.Shell.UWP/Properties/Flutter.Shell.UWP.rd.xml",
"chars": 1548,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n This file contains Runtime Directives, specifications about types your a"
},
{
"path": "Flutter.Shell.UWP/Themes/Generic.xaml",
"chars": 1238,
"preview": "<ResourceDictionary\n xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \n xmlns:x=\"http://schemas.m"
},
{
"path": "Flutter.Shell.UWP/VisualStudioToolsManifest.xml",
"chars": 227,
"preview": "<FileList>\n <File Reference=\"Flutter.Shell.UWP.dll\">\n <ToolboxItems VSCategory=\"Flutter Shell Tookit\" BlendCategory"
},
{
"path": "FlutterBinding/Engine/Compositing/NativeScene.cs",
"chars": 2656,
"preview": "using FlutterBinding.Flow.Layers;\nusing FlutterBinding.UI;\nusing SkiaSharp;\n\nnamespace FlutterBinding.Engine.Compositin"
},
{
"path": "FlutterBinding/Engine/Compositing/NativeSceneBuilder.cs",
"chars": 3686,
"preview": "using FlutterBinding.Engine.Painting;\nusing FlutterBinding.Flow.Layers;\nusing FlutterBinding.UI;\nusing SkiaSharp;\nusing"
},
{
"path": "FlutterBinding/Engine/Engine.cs",
"chars": 1166,
"preview": "using FlutterBinding.Flow.Layers;\nusing SkiaSharp;\n\nnamespace FlutterBinding.Engine\n{\n public class Engine\n {\n "
},
{
"path": "FlutterBinding/Engine/Painting/Matrix.cs",
"chars": 1392,
"preview": "using SkiaSharp;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace FlutterBinding.Engine.Painting\n{\n p"
},
{
"path": "FlutterBinding/Engine/Painting/NativeCanvas.cs",
"chars": 697,
"preview": "using SkiaSharp;\nusing System;\nusing System.Collections.Generic;\nusing System.Text;\n\nnamespace FlutterBinding.Engine.Pa"
},
{
"path": "FlutterBinding/Engine/Painting/NativeCodec.cs",
"chars": 524,
"preview": "using FlutterBinding.UI;\nusing SkiaSharp;\nusing System.Collections.Generic;\n\nnamespace FlutterBinding.Engine.Painting\n{"
},
{
"path": "FlutterBinding/Engine/Painting/NativeEngineLayer.cs",
"chars": 585,
"preview": "using FlutterBinding.Flow.Layers;\n\nnamespace FlutterBinding.Engine.Painting\n{\n //https://github.com/flutter/engine/b"
},
{
"path": "FlutterBinding/Engine/Painting/NativePath.cs",
"chars": 112,
"preview": "using SkiaSharp;\n\nnamespace FlutterBinding.Engine.Painting\n{\n public class NativePath: SKPath\n {\n }\n}\n"
},
{
"path": "FlutterBinding/Engine/Painting/NativePathMetric.cs",
"chars": 265,
"preview": "using SkiaSharp;\n\nnamespace FlutterBinding.Engine.Painting\n{\n public class NativePathMetric: SKPathMeasure\n {\n "
},
{
"path": "FlutterBinding/Engine/Painting/NativePicture.cs",
"chars": 191,
"preview": "using SkiaSharp;\nusing System;\nusing System.Collections.Generic;\nusing System.Text;\n\nnamespace FlutterBinding.Engine.Pa"
},
{
"path": "FlutterBinding/Engine/Painting/NativePictureRecorder.cs",
"chars": 255,
"preview": "using SkiaSharp;\n\nnamespace FlutterBinding.Engine.Painting\n{\n public class NativePictureRecorder: SKPictureRecorder\n"
},
{
"path": "FlutterBinding/Engine/Text/NativeParagraph.cs",
"chars": 874,
"preview": "using FlutterBinding.Engine.Painting;\nusing SkiaSharp;\n\nnamespace FlutterBinding.Engine.Text\n{\n public class NativeP"
},
{
"path": "FlutterBinding/Engine/Text/NativeParagraphBuilder.cs",
"chars": 5710,
"preview": "using FlutterBinding.UI;\nusing System;\nusing System.Collections.Generic;\nusing System.Text;\n\nnamespace FlutterBinding.E"
},
{
"path": "FlutterBinding/Engine/Text/NativeParagraphStyle.cs",
"chars": 160,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Text;\n\nnamespace FlutterBinding.Engine.Text\n{\n public c"
},
{
"path": "FlutterBinding/Engine/Window/NativeWindow.cs",
"chars": 300,
"preview": "using FlutterBinding.UI;\nusing System;\nusing System.Collections.Generic;\nusing System.Text;\n\nnamespace FlutterBinding.E"
},
{
"path": "FlutterBinding/Flow/CompositorContext.cs",
"chars": 3581,
"preview": "using FlutterBinding.Flow.Layers;\nusing SkiaSharp;\nusing static FlutterBinding.Flow.Helper;\n\n// Copyright 2015 The Chro"
},
{
"path": "FlutterBinding/Flow/EmbeddedViews.cs",
"chars": 852,
"preview": "using static FlutterBinding.Flow.Helper;\nusing SkiaSharp;\n\n// Copyright 2017 The Chromium Authors. All rights reserved."
},
{
"path": "FlutterBinding/Flow/GlobalMembers.cs",
"chars": 5106,
"preview": "using SkiaSharp;\nusing System;\nusing static FlutterBinding.Flow.Helper;\n\nnamespace FlutterBinding.Flow\n{\n public sta"
},
{
"path": "FlutterBinding/Flow/Helper.cs",
"chars": 294,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Text;\n\nnamespace FlutterBinding.Flow\n{\n public static c"
},
{
"path": "FlutterBinding/Flow/Layers/BackdropFilterLayer.cs",
"chars": 868,
"preview": "using SkiaSharp;\nusing static FlutterBinding.Flow.Helper;\n\n// Copyright 2016 The Chromium Authors. All rights reserved."
},
{
"path": "FlutterBinding/Flow/Layers/ChildSceneLayer.cs",
"chars": 1105,
"preview": "using SkiaSharp;\nusing static FlutterBinding.Flow.Helper;\n\n// Copyright 2016 The Chromium Authors. All rights reserved."
},
{
"path": "FlutterBinding/Flow/Layers/ClipPathLayer.cs",
"chars": 1647,
"preview": "using SkiaSharp;\nusing static FlutterBinding.Flow.Helper;\n\n// Copyright 2015 The Chromium Authors. All rights reserved."
},
{
"path": "FlutterBinding/Flow/Layers/ClipRRectLayer.cs",
"chars": 1641,
"preview": "using SkiaSharp;\nusing static FlutterBinding.Flow.Helper;\n\n// Copyright 2015 The Chromium Authors. All rights reserved."
},
{
"path": "FlutterBinding/Flow/Layers/ClipRectLayer.cs",
"chars": 1612,
"preview": "using SkiaSharp;\nusing static FlutterBinding.Flow.Helper;\n\n// Copyright 2015 The Chromium Authors. All rights reserved."
},
{
"path": "FlutterBinding/Flow/Layers/ColorFilterLayer.cs",
"chars": 965,
"preview": "using SkiaSharp;\n\n// Copyright 2015 The Chromium Authors. All rights reserved.\n// Use of this source code is governed b"
},
{
"path": "FlutterBinding/Flow/Layers/ContainerLayer.cs",
"chars": 1974,
"preview": "using SkiaSharp;\nusing System.Collections.Generic;\nusing static FlutterBinding.Flow.Helper;\n\n// Copyright 2015 The Chro"
},
{
"path": "FlutterBinding/Flow/Layers/LayerTree.cs",
"chars": 4582,
"preview": "using SkiaSharp;\nusing static FlutterBinding.Flow.Helper;\n\n// Copyright 2015 The Chromium Authors. All rights reserved."
},
{
"path": "FlutterBinding/Flow/Layers/OpacityLayer.cs",
"chars": 2427,
"preview": "using SkiaSharp;\nusing static FlutterBinding.Flow.Helper;\n\n// Copyright 2015 The Chromium Authors. All rights reserved."
},
{
"path": "FlutterBinding/Flow/Layers/PhysicalShapeLayer.cs",
"chars": 6458,
"preview": "using SkiaSharp;\nusing static FlutterBinding.Flow.Helper;\n\n// Copyright 2017 The Chromium Authors. All rights reserved."
},
{
"path": "FlutterBinding/Flow/Layers/PictureLayer.cs",
"chars": 2635,
"preview": "using static FlutterBinding.Flow.Helper;\nusing SkiaSharp;\n\n// Copyright 2015 The Chromium Authors. All rights reserved."
},
{
"path": "FlutterBinding/Flow/Layers/PlatformViewLayer.cs",
"chars": 1444,
"preview": "using SkiaSharp;\nusing static FlutterBinding.Flow.Helper;\n\n// Copyright 2018 The Chromium Authors. All rights reserved."
},
{
"path": "FlutterBinding/Flow/Layers/ShaderMaskLayer.cs",
"chars": 1377,
"preview": "using SkiaSharp;\nusing static FlutterBinding.Flow.Helper;\n\n// Copyright 2016 The Chromium Authors. All rights reserved."
},
{
"path": "FlutterBinding/Flow/Layers/TextureLayer.cs",
"chars": 1383,
"preview": "using static FlutterBinding.Flow.Helper;\nusing SkiaSharp;\n\n// Copyright 2017 The Chromium Authors. All rights reserved."
},
{
"path": "FlutterBinding/Flow/Layers/TransformLayer.cs",
"chars": 1229,
"preview": "using SkiaSharp;\nusing static FlutterBinding.Flow.Helper;\n\n// Copyright 2015 The Chromium Authors. All rights reserved."
},
{
"path": "FlutterBinding/Flow/MatrixDecomposition.cs",
"chars": 208,
"preview": "using static FlutterBinding.Flow.Helper;\n\n// Copyright 2017 The Chromium Authors. All rights reserved.\n// Use of this s"
},
{
"path": "FlutterBinding/Flow/PaintUtils.cs",
"chars": 208,
"preview": "using static FlutterBinding.Flow.Helper;\n\n// Copyright 2017 The Chromium Authors. All rights reserved.\n// Use of this s"
},
{
"path": "FlutterBinding/Flow/RasterCache.cs",
"chars": 8265,
"preview": "using FlutterBinding.Flow.Layers;\nusing SkiaSharp;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nu"
},
{
"path": "FlutterBinding/Flow/RasterCacheKey.cs",
"chars": 1275,
"preview": "using SkiaSharp;\nusing static FlutterBinding.Flow.Helper;\nusing static FlutterBinding.Flow.RasterCache;\n\n// Copyright 2"
},
{
"path": "FlutterBinding/Flow/layers/layer.cs",
"chars": 6132,
"preview": "using SkiaSharp;\nusing static FlutterBinding.Flow.Helper;\nusing static FlutterBinding.Flow.RasterCache;\n\n// Copyright 2"
},
{
"path": "FlutterBinding/Flow/texture.cs",
"chars": 1983,
"preview": "using SkiaSharp;\nusing System.Collections.Generic;\nusing static FlutterBinding.Flow.Helper;\n\n// Copyright 2017 The Chro"
},
{
"path": "FlutterBinding/FlutterBinding.csproj",
"chars": 3547,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <TargetFramework>netstandard2.0</TargetFramework>\n </PropertyG"
},
{
"path": "FlutterBinding/Mapping/Future.cs",
"chars": 294,
"preview": "using System;\nusing System.Threading.Tasks;\n\nnamespace FlutterBinding.Mapping\n{\n public class Future<T> : Task<T>\n "
},
{
"path": "FlutterBinding/Mapping/Helper.cs",
"chars": 2386,
"preview": "using FlutterBinding.UI;\nusing System;\nusing System.Collections.Generic;\n\nnamespace FlutterBinding.Mapping\n{\n public"
},
{
"path": "FlutterBinding/Mapping/Types.cs",
"chars": 1958,
"preview": "using FlutterBinding.UI;\nusing System;\nusing System.Collections.Generic;\n\nnamespace FlutterBinding.Mapping\n{\n public"
},
{
"path": "FlutterBinding/Minikin/Arrays.cs",
"chars": 807,
"preview": "//----------------------------------------------------------------------------------------\n//\tCopyright © 2006 - 2018 T"
},
{
"path": "FlutterBinding/Minikin/CmapCoverage.cs",
"chars": 693,
"preview": "/*\n * Copyright (C) 2013 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "FlutterBinding/Minikin/CmapCoverage.h.cs",
"chars": 7337,
"preview": "/*\n * Copyright (C) 2013 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "FlutterBinding/Minikin/DefineConstants.cs",
"chars": 308,
"preview": "internal static class DefineConstants\n{\n//C++ TO C# CONVERTER TODO TASK: The following #define constant was defined in "
},
{
"path": "FlutterBinding/Minikin/Emoji.cs",
"chars": 623,
"preview": "/*\n * Copyright (C) 2014 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "FlutterBinding/Minikin/Emoji.h.cs",
"chars": 623,
"preview": "/*\n * Copyright (C) 2014 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "FlutterBinding/Minikin/FontCollection.cs",
"chars": 6050,
"preview": "using System;\nusing System.Collections.Generic;\n\n/*\n * Copyright (C) 2013 The Android Open Source Project\n *\n * License"
},
{
"path": "FlutterBinding/Minikin/FontCollection.h.cs",
"chars": 23583,
"preview": "using System.Collections.Generic;\n\n/*\n * Copyright (C) 2013 The Android Open Source Project\n *\n * Licensed under the Ap"
},
{
"path": "FlutterBinding/Minikin/FontFamily.cs",
"chars": 2071,
"preview": "using System.Collections.Generic;\n\n/*\n * Copyright (C) 2013 The Android Open Source Project\n *\n * Licensed under the Ap"
},
{
"path": "FlutterBinding/Minikin/FontFamily.h.cs",
"chars": 17249,
"preview": "using System.Collections.Generic;\n\n/*\n * Copyright (C) 2013 The Android Open Source Project\n *\n * Licensed under the Ap"
},
{
"path": "FlutterBinding/Minikin/FontLanguage.cs",
"chars": 21287,
"preview": "using System.Collections.Generic;\n\n/*\n * Copyright (C) 2015 The Android Open Source Project\n *\n * Licensed under the Ap"
},
{
"path": "FlutterBinding/Minikin/FontLanguageListCache.cs",
"chars": 4272,
"preview": "using System.Collections.Generic;\n\n/*\n * Copyright (C) 2015 The Android Open Source Project\n *\n * Licensed under the Ap"
},
{
"path": "FlutterBinding/Minikin/FontUtils.cs",
"chars": 1249,
"preview": "/*\n * Copyright (C) 2017 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "FlutterBinding/Minikin/GlobalMembers.cs",
"chars": 66916,
"preview": "using System;\nusing System.Collections.Generic;\n\nnamespace minikin\n{\n public static class GlobalMembers\n {\n "
},
{
"path": "FlutterBinding/Minikin/GraphemeBreak.cs",
"chars": 1537,
"preview": "using System;\n\n/*\n * Copyright (C) 2014 The Android Open Source Project\n *\n * Licensed under the Apache License, Versio"
},
{
"path": "FlutterBinding/Minikin/GraphemeBreak.h.cs",
"chars": 8553,
"preview": "/*\n * Copyright (C) 2014 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "FlutterBinding/Minikin/HbFontCache.cs",
"chars": 2505,
"preview": "/*\n * Copyright (C) 2015 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "FlutterBinding/Minikin/Hyphenator.cs",
"chars": 23497,
"preview": "using System;\n\n/*\n * Copyright (C) 2015 The Android Open Source Project\n *\n * Licensed under the Apache License, Versio"
},
{
"path": "FlutterBinding/Minikin/Layout.cs",
"chars": 16693,
"preview": "/*\n * Copyright (C) 2013 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "FlutterBinding/Minikin/Layout.h.cs",
"chars": 22644,
"preview": "using System.Collections.Generic;\n\n/*\n * Copyright (C) 2013 The Android Open Source Project\n *\n * Licensed under the Ap"
},
{
"path": "FlutterBinding/Minikin/LayoutUtils.cs",
"chars": 1248,
"preview": "/*\n * Copyright (C) 2015 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "FlutterBinding/Minikin/LineBreaker.cs",
"chars": 1819,
"preview": "using System;\nusing System.Collections.Generic;\n\n/*\n * Copyright (C) 2015 The Android Open Source Project\n *\n * License"
},
{
"path": "FlutterBinding/Minikin/LineBreaker.h.cs",
"chars": 26085,
"preview": "using System;\nusing System.Collections.Generic;\n\n/*\n * Copyright (C) 2015 The Android Open Source Project\n *\n * License"
},
{
"path": "FlutterBinding/Minikin/Measurement.cs",
"chars": 626,
"preview": "/*\n * Copyright (C) 2015 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "FlutterBinding/Minikin/Measurement.h.cs",
"chars": 625,
"preview": "/*\n * Copyright (C) 2015 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "FlutterBinding/Minikin/MinikinFont.cs",
"chars": 623,
"preview": "/*\n * Copyright (C) 2016 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "FlutterBinding/Minikin/MinikinFont.h.cs",
"chars": 6176,
"preview": "using System.Collections.Generic;\nusing System;\n\n/*\n * Copyright (C) 2013 The Android Open Source Project\n *\n * License"
},
{
"path": "FlutterBinding/Minikin/MinikinInternal.cs",
"chars": 2357,
"preview": "/*\n * Copyright (C) 2014 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "FlutterBinding/Minikin/SparseBitSet.cs",
"chars": 839,
"preview": "/*\n * Copyright (C) 2012 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "FlutterBinding/Minikin/SparseBitSet.h.cs",
"chars": 8811,
"preview": "/*\n * Copyright (C) 2012 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "FlutterBinding/Minikin/StringFunctions.cs",
"chars": 4488,
"preview": "//----------------------------------------------------------------------------------------\n//\tCopyright © 2006 - 2018 T"
},
{
"path": "FlutterBinding/Minikin/WordBreaker.cs",
"chars": 1384,
"preview": "/*\n * Copyright (C) 2015 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "FlutterBinding/Minikin/WordBreaker.h.cs",
"chars": 8022,
"preview": "using System;\n\n/*\n * Copyright (C) 2015 The Android Open Source Project\n *\n * Licensed under the Apache License, Versio"
},
{
"path": "FlutterBinding/Minikin/minikin.Hyphenator.cs",
"chars": 1207,
"preview": "namespace minikin\n{\n\n\tpublic class Hyphenator\n\t{\n//C++ TO C# CONVERTER WARNING: The original C++ declaration of the fol"
},
{
"path": "FlutterBinding/Minikin/minikin.SparseBitSet.cs",
"chars": 335,
"preview": "namespace minikin\n{\n\n\tpublic class SparseBitSet\n\t{\n//C++ TO C# CONVERTER WARNING: The original C++ declaration of the f"
},
{
"path": "FlutterBinding/Minikin/minikin.android.cs",
"chars": 365,
"preview": "namespace minikin\n{\n\n\tpublic class android\n\t{\n//C++ TO C# CONVERTER WARNING: The original C++ declaration of the follow"
},
{
"path": "FlutterBinding/Txt/DefineConstants.cs",
"chars": 2880,
"preview": "//internal static class DefineConstants\n//{\n//\tpublic const int SK_CPU_X86 = 1;\n//\tpublic const int SK_CPU_SSE_LEVEL_SS"
},
{
"path": "FlutterBinding/Txt/GlobalMembers.cs",
"chars": 6698,
"preview": "//using System.Collections.Generic;\n\n//namespace FlutterBinding.Txt\n//{\n//\tpublic static class GlobalMembers\n//\t{\n//\tpu"
},
{
"path": "FlutterBinding/Txt/SkTextBlob.cs",
"chars": 142,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Text;\n\nnamespace FlutterBinding.Txt\n{\n public class SkT"
},
{
"path": "FlutterBinding/Txt/asset_font_manager.cs",
"chars": 8480,
"preview": "//using SkiaSharp;\n\n///*\n// * Copyright 2017 Google Inc.\n// *\n// * Licensed under the Apache License, Version 2.0 (the "
},
{
"path": "FlutterBinding/Txt/font_asset_provider.cs",
"chars": 2558,
"preview": "///*\n// * Copyright 2018 Google Inc.\n// *\n// * Licensed under the Apache License, Version 2.0 (the \"License\");\n// * you"
},
{
"path": "FlutterBinding/Txt/font_collection.cs",
"chars": 37821,
"preview": "//using System.Collections.Generic;\n\n///*\n// * Copyright 2017 Google Inc.\n// *\n// * Licensed under the Apache License, "
},
{
"path": "FlutterBinding/Txt/font_skia.cs",
"chars": 4299,
"preview": "//using System.Collections.Generic;\n\n///*\n// * Copyright 2017 Google Inc.\n// *\n// * Licensed under the Apache License, "
},
{
"path": "FlutterBinding/Txt/font_style.cs",
"chars": 737,
"preview": "/*\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "FlutterBinding/Txt/font_weight.cs",
"chars": 936,
"preview": "/*\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "FlutterBinding/Txt/paint_record.cs",
"chars": 33050,
"preview": "/*\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "FlutterBinding/Txt/paragraph.cs",
"chars": 116079,
"preview": "using FlutterBinding.Txt;\nusing HarfBuzzSharp;\nusing SkiaSharp;\nusing System;\nusing System.Collections.Generic;\nusing s"
},
{
"path": "FlutterBinding/Txt/paragraph_builder.cs",
"chars": 33870,
"preview": "using System;\nusing System.Collections.Generic;\n\n/*\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache Licen"
},
{
"path": "FlutterBinding/Txt/paragraph_style.cs",
"chars": 31004,
"preview": "/*\n * Copyright 2017 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
},
{
"path": "FlutterBinding/Txt/platform.cs",
"chars": 449,
"preview": "// Copyright 2017 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style lice"
},
{
"path": "FlutterBinding/Txt/platform_android.cs",
"chars": 168,
"preview": "// Copyright 2017 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style lice"
},
{
"path": "FlutterBinding/Txt/styled_runs.cs",
"chars": 36934,
"preview": "using System.Collections.Generic;\n\n/*\n * Copyright (C) 2017 Google, Inc.\n *\n * Licensed under the Apache License, Versi"
},
{
"path": "FlutterBinding/Txt/text_baseline.cs",
"chars": 727,
"preview": "/*\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "FlutterBinding/Txt/text_decoration.cs",
"chars": 1622,
"preview": "/*\n * Copyright 2017 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
},
{
"path": "FlutterBinding/Txt/text_shadow.cs",
"chars": 4012,
"preview": "/*\n * Copyright 2018 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
},
{
"path": "FlutterBinding/Txt/text_style.cs",
"chars": 30741,
"preview": "using SkiaSharp;\nusing System.Collections.Generic;\n\n/*\n * Copyright 2017 Google, Inc.\n *\n * Licensed under the Apache L"
},
{
"path": "FlutterBinding/Txt/typeface_font_asset_provider.cs",
"chars": 7622,
"preview": "using SkiaSharp;\nusing System.Collections.Generic;\n\n/*\n * Copyright 2018 Google Inc.\n *\n * Licensed under the Apache Li"
},
{
"path": "FlutterBinding/UI/Compositing.cs",
"chars": 21236,
"preview": "using FlutterBinding.Engine.Compositing;\nusing FlutterBinding.Engine.Painting;\nusing FlutterBinding.Flow.Layers;\nusing "
},
{
"path": "FlutterBinding/UI/FlutterSurface.cs",
"chars": 1158,
"preview": "using SkiaSharp;\n\nnamespace FlutterBinding.UI\n{\n public class FlutterSurface\n {\n private readonly float _s"
},
{
"path": "FlutterBinding/UI/Geometry.cs",
"chars": 75239,
"preview": "using System;\nusing System.Collections.Generic;\nusing static FlutterBinding.UI.Lerp;\nusing static FlutterBinding.Mappin"
},
{
"path": "FlutterBinding/UI/Hooks.cs",
"chars": 10268,
"preview": "using Newtonsoft.Json;\nusing System;\nusing System.Collections.Generic;\nusing static FlutterBinding.Mapping.Helper;\nusin"
},
{
"path": "FlutterBinding/UI/ICanvas.cs",
"chars": 1491,
"preview": "using System.Collections.Generic;\nusing SkiaSharp;\n\nnamespace FlutterBinding.UI\n{\n public interface ICanvas\n {\n "
},
{
"path": "FlutterBinding/UI/Lerp.cs",
"chars": 200,
"preview": "namespace FlutterBinding.UI\n{\n public static class Lerp\n {\n public static double lerpDouble(double a, doub"
},
{
"path": "FlutterBinding/UI/NativeFieldWrapperClass2.cs",
"chars": 143,
"preview": "using FlutterBinding.Mapping;\nusing System;\n\nnamespace FlutterBinding.UI\n{\n public class NativeFieldWrapperClass2\n "
},
{
"path": "FlutterBinding/UI/Painting.cs",
"chars": 175361,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\nusing static FlutterBinding.Mapping.Types"
},
{
"path": "FlutterBinding/UI/Pointer.cs",
"chars": 10477,
"preview": "using System;\nusing System.Collections.Generic;\nusing static FlutterBinding.Mapping.Types;\n\nnamespace FlutterBinding.UI"
},
{
"path": "FlutterBinding/UI/Semantics.cs",
"chars": 35900,
"preview": "using System;\nusing System.Collections.Generic;\n\nnamespace FlutterBinding.UI\n{\n\n /// The possible actions that can b"
},
{
"path": "FlutterBinding/UI/Text.cs",
"chars": 51969,
"preview": "using FlutterBinding.Engine.Text;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\nusing s"
},
{
"path": "FlutterBinding/UI/Window.cs",
"chars": 43422,
"preview": "using FlutterBinding.Engine;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing static FlutterBin"
},
{
"path": "FlutterBindingSample/App.xaml",
"chars": 244,
"preview": "<Application\n x:Class=\"FlutterBindingSample.App\"\n xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentatio"
},
{
"path": "FlutterBindingSample/App.xaml.cs",
"chars": 4076,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Runtime.InteropService"
},
{
"path": "FlutterBindingSample/FlutterBindingSample.csproj",
"chars": 7274,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"15.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.micros"
},
{
"path": "FlutterBindingSample/MainPage.xaml",
"chars": 616,
"preview": "<Page\n x:Class=\"FlutterBindingSample.MainPage\"\n xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\""
},
{
"path": "FlutterBindingSample/MainPage.xaml.cs",
"chars": 2819,
"preview": "using FlutterBinding.Engine;\nusing FlutterSDK.Widgets.Basic;\nusing FlutterSDK.Widgets.Framework;\nusing FlutterSDK.Widge"
},
{
"path": "FlutterBindingSample/Package.appxmanifest",
"chars": 1595,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<Package\n xmlns=\"http://schemas.microsoft.com/appx/manifest/foundation/windows"
},
{
"path": "FlutterBindingSample/Properties/AssemblyInfo.cs",
"chars": 1057,
"preview": "using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Infor"
},
{
"path": "FlutterBindingSample/Properties/Default.rd.xml",
"chars": 1243,
"preview": "<!--\n This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most\n develope"
},
{
"path": "FlutterSDK/FlutterSDK.csproj",
"chars": 436,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <TargetFramework>netstandard2.0</TargetFramework>\n </PropertyG"
},
{
"path": "FlutterSDK/Mappings/Global.cs",
"chars": 10243,
"preview": "using FlutterSDK.Animation.Animation;\nusing FlutterSDK.Widgets.Framework;\nusing FlutterSDK.Widgets.Navigator;\nusing Ski"
},
{
"path": "LICENSE",
"chars": 1061,
"preview": "MIT License\n\nCopyright (c) 2018 Adam\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof th"
},
{
"path": "README.md",
"chars": 2591,
"preview": "**ABANDONED: While this project is technically feasible, it's not feasible for a couple of developers in their spare tim"
},
{
"path": "TRANSPILER_README.md",
"chars": 1165,
"preview": "# Transpiler\n\nThis document details how to run the transpiler. It is currently a work in progress.\n\n## Dart Analyzer\n\nIn"
},
{
"path": "Xamarin.Flutter.sln",
"chars": 14869,
"preview": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 15\nVisualStudioVersion = 15.0.28010.2036\nM"
},
{
"path": "testbed/test.dart",
"chars": 430,
"preview": "class Widget {}\nclass Row {\n Row(<Widget> children) {}\n }\n}\n\nclass OutlineButton {\n OutlineButton({Row child});\n}\n\ncla"
}
]
// ... and 2 more files (download for full content)
About this extraction
This page contains the full source code of the adamped/xamarin.flutter GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 190 files (1.3 MB), approximately 330.7k tokens, and a symbol index with 1506 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.