-
Notifications
You must be signed in to change notification settings - Fork 36
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
ca0bca0
commit 055203e
Showing
14 changed files
with
444 additions
and
30 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
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
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,115 @@ | ||
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/painting.dart'; | ||
import 'package:flutter_eval/src/sky_engine/ui/painting.dart'; | ||
|
||
class $BorderStyle implements $Instance { | ||
static const $type = BridgeTypeRef.spec(BridgeTypeSpec('package:flutter/src/painting/borders.dart', 'BorderStyle')); | ||
|
||
static const $declaration = | ||
BridgeEnumDef($type, values: ['solid', 'none'], methods: {}, getters: {}, setters: {}, fields: {}); | ||
|
||
static final $values = BorderStyle.values.asNameMap().map((key, value) => MapEntry(key, $BorderStyle.wrap(value))); | ||
|
||
final $Instance _superclass; | ||
|
||
$BorderStyle.wrap(this.$value) : _superclass = $Object($value); | ||
|
||
@override | ||
final BorderStyle $value; | ||
|
||
@override | ||
BorderStyle 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 $ShapeBorder implements $Instance { | ||
static const $type = BridgeTypeRef.spec(BridgeTypeSpec('package:flutter/src/painting/borders.dart', 'ShapeBorder')); | ||
|
||
static const $declaration = BridgeClassDef(BridgeClassType($type, isAbstract: true), | ||
constructors: {}, methods: {}, getters: {}, setters: {}, fields: {}, wrap: true); | ||
|
||
$ShapeBorder.wrap(this.$value) : _superclass = $Object($value); | ||
|
||
final $Instance _superclass; | ||
|
||
@override | ||
final ShapeBorder $value; | ||
|
||
@override | ||
get $reified => $value; | ||
|
||
@override | ||
int get $runtimeType => throw UnimplementedError(); | ||
|
||
@override | ||
$Value? $getProperty(Runtime runtime, String identifier) { | ||
return _superclass.$getProperty(runtime, identifier); | ||
} | ||
|
||
@override | ||
void $setProperty(Runtime runtime, String identifier, $Value value) { | ||
_superclass.$setProperty(runtime, identifier, value); | ||
} | ||
} | ||
|
||
class $BorderSide implements $Instance { | ||
static const $type = BridgeTypeRef.spec(BridgeTypeSpec('package:flutter/src/painting/borders.dart', 'BorderSide')); | ||
|
||
static const $declaration = BridgeClassDef(BridgeClassType($type, isAbstract: false), | ||
constructors: { | ||
'': BridgeConstructorDef(BridgeFunctionDef(returns: BridgeTypeAnnotation($type), namedParams: [ | ||
BridgeParameter('color', BridgeTypeAnnotation($Color.$type), true), | ||
BridgeParameter('width', BridgeTypeAnnotation(BridgeTypeRef.type(RuntimeTypes.doubleType)), true), | ||
BridgeParameter('style', BridgeTypeAnnotation($BorderStyle.$type), true) | ||
])) | ||
}, | ||
methods: {}, | ||
getters: {}, | ||
setters: {}, | ||
fields: {}, | ||
wrap: true); | ||
|
||
$BorderSide.wrap(this.$value) : _superclass = $Object($value); | ||
|
||
final $Instance _superclass; | ||
|
||
@override | ||
final BorderSide $value; | ||
|
||
@override | ||
get $reified => $value; | ||
|
||
@override | ||
int get $runtimeType => throw UnimplementedError(); | ||
|
||
static $Value? $new(Runtime runtime, $Value? target, List<$Value?> args) { | ||
return $BorderSide.wrap(BorderSide( | ||
color: args[0]?.$value ?? const Color(0xFF000000), | ||
width: args[1]?.$value ?? 1.0, | ||
style: args[2]?.$value ?? BorderStyle.solid)); | ||
} | ||
|
||
@override | ||
$Value? $getProperty(Runtime runtime, String identifier) { | ||
return _superclass.$getProperty(runtime, identifier); | ||
} | ||
|
||
@override | ||
void $setProperty(Runtime runtime, String identifier, $Value value) { | ||
_superclass.$setProperty(runtime, identifier, value); | ||
} | ||
} |
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,119 @@ | ||
import 'package:dart_eval/dart_eval.dart'; | ||
import 'package:dart_eval/dart_eval_bridge.dart'; | ||
import 'package:flutter/painting.dart'; | ||
import 'package:flutter_eval/src/painting/borders.dart'; | ||
import 'package:flutter_eval/src/sky_engine/ui/painting.dart'; | ||
|
||
class $BoxBorder implements $Instance { | ||
static const $type = BridgeTypeRef.spec(BridgeTypeSpec('package:flutter/src/painting/box_border.dart', 'BoxBorder')); | ||
|
||
static const $declaration = BridgeClassDef(BridgeClassType($type, isAbstract: true), | ||
constructors: {}, methods: {}, getters: {}, setters: {}, fields: {}, wrap: true); | ||
|
||
$BoxBorder.wrap(this.$value) : _superclass = $ShapeBorder.wrap($value); | ||
|
||
final $Instance _superclass; | ||
|
||
@override | ||
final ShapeBorder $value; | ||
|
||
@override | ||
get $reified => $value; | ||
|
||
@override | ||
int get $runtimeType => throw UnimplementedError(); | ||
|
||
@override | ||
$Value? $getProperty(Runtime runtime, String identifier) { | ||
return _superclass.$getProperty(runtime, identifier); | ||
} | ||
|
||
@override | ||
void $setProperty(Runtime runtime, String identifier, $Value value) { | ||
_superclass.$setProperty(runtime, identifier, value); | ||
} | ||
} | ||
|
||
class $Border implements $Instance { | ||
static const $type = BridgeTypeRef.spec(BridgeTypeSpec('package:flutter/src/painting/box_border.dart', 'Border')); | ||
|
||
static const $declaration = BridgeClassDef(BridgeClassType($type, isAbstract: false), | ||
constructors: { | ||
'': BridgeConstructorDef(BridgeFunctionDef(returns: BridgeTypeAnnotation($type), namedParams: [ | ||
BridgeParameter('top', BridgeTypeAnnotation($BorderSide.$type), true), | ||
BridgeParameter('right', BridgeTypeAnnotation($BorderSide.$type), true), | ||
BridgeParameter('bottom', BridgeTypeAnnotation($BorderSide.$type), true), | ||
BridgeParameter('left', BridgeTypeAnnotation($BorderSide.$type), true) | ||
])), | ||
'all': BridgeConstructorDef( | ||
BridgeFunctionDef(returns: BridgeTypeAnnotation($type), namedParams: [ | ||
BridgeParameter('color', BridgeTypeAnnotation($Color.$type), true), | ||
BridgeParameter('width', BridgeTypeAnnotation(BridgeTypeRef.type(RuntimeTypes.doubleType)), true), | ||
BridgeParameter('style', BridgeTypeAnnotation($BorderStyle.$type), true) | ||
]), | ||
isFactory: true), | ||
'fromBorderSide': BridgeConstructorDef(BridgeFunctionDef( | ||
returns: BridgeTypeAnnotation($type), | ||
namedParams: [BridgeParameter('side', BridgeTypeAnnotation($BorderSide.$type), true)])), | ||
'symmetric': BridgeConstructorDef(BridgeFunctionDef(returns: BridgeTypeAnnotation($type), namedParams: [ | ||
BridgeParameter('vertical', BridgeTypeAnnotation($BorderSide.$type), true), | ||
BridgeParameter('horizontal', BridgeTypeAnnotation($BorderSide.$type), true) | ||
])) | ||
}, | ||
methods: {}, | ||
getters: {}, | ||
setters: {}, | ||
fields: {}, | ||
wrap: true); | ||
|
||
$Border.wrap(this.$value) : _superclass = $BoxBorder.wrap($value); | ||
|
||
final $Instance _superclass; | ||
|
||
static $Value? $new(Runtime runtime, $Value? target, List<$Value?> args) { | ||
return $Border.wrap(Border( | ||
top: args[0]?.$value ?? BorderSide.none, | ||
right: args[1]?.$value ?? BorderSide.none, | ||
bottom: args[2]?.$value ?? BorderSide.none, | ||
left: args[3]?.$value ?? BorderSide.none, | ||
)); | ||
} | ||
|
||
static $Value? $all(Runtime runtime, $Value? target, List<$Value?> args) { | ||
return $Border.wrap(Border.all( | ||
color: args[0]?.$value ?? const Color(0xFF000000), | ||
width: args[1]?.$value ?? 1.0, | ||
style: args[2]?.$value ?? BorderStyle.solid, | ||
)); | ||
} | ||
|
||
static $Value? $fromBorderSide(Runtime runtime, $Value? target, List<$Value?> args) { | ||
return $Border.wrap(Border.fromBorderSide(args[0]?.$value ?? BorderSide.none)); | ||
} | ||
|
||
static $Value? $symmetric(Runtime runtime, $Value? target, List<$Value?> args) { | ||
return $Border.wrap(Border.symmetric( | ||
vertical: args[0]?.$value ?? BorderSide.none, | ||
horizontal: args[1]?.$value ?? BorderSide.none, | ||
)); | ||
} | ||
|
||
@override | ||
final Border $value; | ||
|
||
@override | ||
Border get $reified => $value; | ||
|
||
@override | ||
int get $runtimeType => throw UnimplementedError(); | ||
|
||
@override | ||
$Value? $getProperty(Runtime runtime, String identifier) { | ||
return _superclass.$getProperty(runtime, identifier); | ||
} | ||
|
||
@override | ||
void $setProperty(Runtime runtime, String identifier, $Value value) { | ||
_superclass.$setProperty(runtime, identifier, value); | ||
} | ||
} |
Oops, something went wrong.