-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
07b14d9
commit ccb607e
Showing
17 changed files
with
620 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,3 +123,5 @@ app.*.symbols | |
pubspec.lock | ||
**/*.evc | ||
**/pubspec_overrides.yaml | ||
|
||
flutter_eval.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
import 'package:dart_eval/dart_eval.dart'; | ||
import 'package:dart_eval/dart_eval_bridge.dart'; | ||
import 'package:dart_eval/stdlib/core.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
class $AlignmentGeometry implements $Instance { | ||
static const $type = | ||
BridgeTypeRef.spec(BridgeTypeSpec('package:flutter/src/painting/alignment.dart', 'AlignmentGeometry')); | ||
|
||
static const $declaration = BridgeClassDef(BridgeClassType($type, isAbstract: true), | ||
constructors: {}, methods: {}, getters: {}, setters: {}, fields: {}, wrap: true); | ||
|
||
$AlignmentGeometry.wrap(this.$value); | ||
|
||
@override | ||
final AlignmentGeometry $value; | ||
|
||
late final $Instance _superclass = $Object($value); | ||
|
||
@override | ||
AlignmentGeometry get $reified => $value; | ||
|
||
@override | ||
$Value? $getProperty(Runtime runtime, String identifier) { | ||
return _superclass.$getProperty(runtime, identifier); | ||
} | ||
|
||
@override | ||
int get $runtimeType => throw UnimplementedError(); | ||
|
||
@override | ||
void $setProperty(Runtime runtime, String identifier, $Value value) { | ||
return _superclass.$setProperty(runtime, identifier, value); | ||
} | ||
} | ||
|
||
class $Alignment implements $Instance { | ||
static const $type = BridgeTypeRef.spec(BridgeTypeSpec('package:flutter/src/painting/alignment.dart', 'Alignment')); | ||
|
||
static const _stValueType = | ||
BridgeMethodDef(BridgeFunctionDef(returns: BridgeTypeAnnotation($Alignment.$type)), isStatic: true); | ||
static const $declaration = | ||
BridgeClassDef(BridgeClassType($type, isAbstract: false, $extends: $AlignmentGeometry.$type), | ||
constructors: { | ||
'': BridgeConstructorDef(BridgeFunctionDef(returns: BridgeTypeAnnotation($type), namedParams: [ | ||
BridgeParameter('x', BridgeTypeAnnotation(BridgeTypeRef.type(RuntimeTypes.doubleType)), false), | ||
BridgeParameter('y', BridgeTypeAnnotation(BridgeTypeRef.type(RuntimeTypes.doubleType)), false), | ||
])) | ||
}, | ||
methods: {}, | ||
getters: { | ||
'x': BridgeMethodDef( | ||
BridgeFunctionDef(returns: BridgeTypeAnnotation(BridgeTypeRef.type(RuntimeTypes.doubleType)))), | ||
'y': BridgeMethodDef( | ||
BridgeFunctionDef(returns: BridgeTypeAnnotation(BridgeTypeRef.type(RuntimeTypes.doubleType)))), | ||
'topLeft': _stValueType, | ||
'topCenter': _stValueType, | ||
'topRight': _stValueType, | ||
'centerLeft': _stValueType, | ||
'center': _stValueType, | ||
'centerRight': _stValueType, | ||
'bottomLeft': _stValueType, | ||
'bottomCenter': _stValueType, | ||
'bottomRight': _stValueType, | ||
}, | ||
setters: {}, | ||
fields: {}, | ||
wrap: true); | ||
|
||
static $Value? $new(Runtime runtime, $Value? target, List<$Value?> args) { | ||
return $Alignment.wrap(Alignment( | ||
args[0]!.$value, | ||
args[1]!.$value, | ||
)); | ||
} | ||
|
||
static $Value? $topLeft(Runtime runtime, $Value? target, List<$Value?> args) { | ||
return $Alignment.wrap(Alignment.topLeft); | ||
} | ||
|
||
static $Value? $topCenter(Runtime runtime, $Value? target, List<$Value?> args) { | ||
return $Alignment.wrap(Alignment.topCenter); | ||
} | ||
|
||
static $Value? $topRight(Runtime runtime, $Value? target, List<$Value?> args) { | ||
return $Alignment.wrap(Alignment.topRight); | ||
} | ||
|
||
static $Value? $centerLeft(Runtime runtime, $Value? target, List<$Value?> args) { | ||
return $Alignment.wrap(Alignment.centerLeft); | ||
} | ||
|
||
static $Value? $center(Runtime runtime, $Value? target, List<$Value?> args) { | ||
return $Alignment.wrap(Alignment.center); | ||
} | ||
|
||
static $Value? $centerRight(Runtime runtime, $Value? target, List<$Value?> args) { | ||
return $Alignment.wrap(Alignment.centerRight); | ||
} | ||
|
||
static $Value? $bottomLeft(Runtime runtime, $Value? target, List<$Value?> args) { | ||
return $Alignment.wrap(Alignment.bottomLeft); | ||
} | ||
|
||
static $Value? $bottomCenter(Runtime runtime, $Value? target, List<$Value?> args) { | ||
return $Alignment.wrap(Alignment.bottomCenter); | ||
} | ||
|
||
static $Value? $bottomRight(Runtime runtime, $Value? target, List<$Value?> args) { | ||
return $Alignment.wrap(Alignment.bottomRight); | ||
} | ||
|
||
$Alignment.wrap(this.$value); | ||
|
||
@override | ||
final Alignment $value; | ||
|
||
late final $Instance _superclass = $AlignmentGeometry.wrap($value); | ||
|
||
@override | ||
get $reified => $value; | ||
|
||
@override | ||
$Value? $getProperty(Runtime runtime, String identifier) { | ||
switch (identifier) { | ||
case 'x': | ||
return $double($value.x); | ||
case 'y': | ||
return $double($value.y); | ||
} | ||
return _superclass.$getProperty(runtime, identifier); | ||
} | ||
|
||
@override | ||
int get $runtimeType => throw UnimplementedError(); | ||
|
||
@override | ||
void $setProperty(Runtime runtime, String identifier, $Value value) { | ||
throw UnimplementedError(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
const renderingSource = ''' | ||
export 'package:flutter/src/rendering/box.dart'; | ||
export 'package:flutter/src/rendering/flex.dart'; | ||
export 'package:flutter/src/rendering/object.dart'; | ||
'''; |
Oops, something went wrong.