Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions android/local.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sdk.dir=/Users/denny.deng/Library/Android/sdk
flutter.sdk=/Users/denny.deng/fvm/versions/3.29.0
sdk.dir=/Users/praneethm/Library/Android/sdk
flutter.sdk=/Users/praneethm/Downloads/flutter_sdk/flutter
flutter.versionName=0.0.2
8 changes: 4 additions & 4 deletions ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/Users/denny.deng/fvm/versions/3.29.0"
export "FLUTTER_APPLICATION_PATH=/Users/denny.deng/Work/Projects/dynamic_widget"
export "FLUTTER_ROOT=/Users/praneethm/Downloads/flutter_sdk/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/praneethm/forked_projects/dynamic_widget"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_TARGET=lib/main.dart"
export "FLUTTER_BUILD_DIR=build"
export "FLUTTER_BUILD_NAME=5.0.0"
export "FLUTTER_BUILD_NUMBER=5.0.0"
export "FLUTTER_BUILD_NAME=6.0.0"
export "FLUTTER_BUILD_NUMBER=6.0.0"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=true"
export "TREE_SHAKE_ICONS=false"
Expand Down
3 changes: 2 additions & 1 deletion lib/dynamic_widget/basic/appbar_widget_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class AppBarWidgetParser extends WidgetParser {
"centerTitle": realWidget.centerTitle,
"backgroundColor": realWidget.backgroundColor == null
? null
: realWidget.backgroundColor!.toARGB32().toRadixString(16),
: realWidget.backgroundColor!.value.toRadixString(16),
};
}

Expand Down Expand Up @@ -58,3 +58,4 @@ class AppBarWidgetParser extends WidgetParser {
@override
Type get widgetType => AppBar;
}

24 changes: 10 additions & 14 deletions lib/dynamic_widget/basic/button_widget_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,14 @@ class ElevatedButtonParser extends WidgetParser {
: null;
return <String, dynamic>{
"type": widgetName,
"foregroundColor":
color != null ? color.toARGB32().toRadixString(16) : null,
"foregroundColor": color != null ? color.value.toRadixString(16) : null,
"backgroundColor": backgroundColor != null
? backgroundColor.toARGB32().toRadixString(16)
: null,
"overlayColor": overlayColor != null
? overlayColor.toARGB32().toRadixString(16)
? backgroundColor.value.toRadixString(16)
: null,
"overlayColor":
overlayColor != null ? overlayColor.value.toRadixString(16) : null,
"shadowColor":
shadowColor != null ? shadowColor.toARGB32().toRadixString(16) : null,
shadowColor != null ? shadowColor.value.toRadixString(16) : null,
"elevation": elevation,
"padding": edgeInsetsGeometry != null
? "${edgeInsetsGeometry.left},${edgeInsetsGeometry.top},${edgeInsetsGeometry.right},${edgeInsetsGeometry.bottom}"
Expand Down Expand Up @@ -125,16 +123,14 @@ class TextButtonParser extends WidgetParser {
: null;
var map = <String, dynamic>{
"type": widgetName,
"foregroundColor":
color != null ? color.toARGB32().toRadixString(16) : null,
"foregroundColor": color != null ? color.value.toRadixString(16) : null,
"backgroundColor": backgroundColor != null
? backgroundColor.toARGB32().toRadixString(16)
: null,
"overlayColor": overlayColor != null
? overlayColor.toARGB32().toRadixString(16)
? backgroundColor.value.toRadixString(16)
: null,
"overlayColor":
overlayColor != null ? overlayColor.value.toRadixString(16) : null,
"shadowColor":
shadowColor != null ? shadowColor.toARGB32().toRadixString(16) : null,
shadowColor != null ? shadowColor.value.toRadixString(16) : null,
"elevation": elevation,
"padding": edgeInsetsGeometry != null
? "${edgeInsetsGeometry.left},${edgeInsetsGeometry.top},${edgeInsetsGeometry.right},${edgeInsetsGeometry.bottom}"
Expand Down
7 changes: 3 additions & 4 deletions lib/dynamic_widget/basic/card_widget_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ class CardParser extends WidgetParser {
Map<String, dynamic>? export(Widget? widget, BuildContext? buildContext) {
if (widget != null && widget is Card) {
final EdgeInsets? margin = widget.margin as EdgeInsets?;
final String? color = widget.color != null
? widget.color!.toARGB32().toRadixString(16)
: null;
final String? color =
widget.color != null ? widget.color!.value.toRadixString(16) : null;
final String? shadowColor = widget.shadowColor != null
? widget.shadowColor!.toARGB32().toRadixString(16)
? widget.shadowColor!.value.toRadixString(16)
: null;
final double? elevation = widget.elevation;
final bool borderOnForeground = widget.borderOnForeground;
Expand Down
2 changes: 1 addition & 1 deletion lib/dynamic_widget/basic/container_widget_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class ContainerWidgetParser extends WidgetParser {
? "${padding.left},${padding.top},${padding.right},${padding.bottom}"
: null,
"color": realWidget.color != null
? realWidget.color!.toARGB32().toRadixString(16)
? realWidget.color!.value.toRadixString(16)
: null,
"margin": margin != null
? "${margin.left},${margin.top},${margin.right},${margin.bottom}"
Expand Down
2 changes: 1 addition & 1 deletion lib/dynamic_widget/basic/divider_widget_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class DividerWidgetParser extends WidgetParser {
"indent": realWidget.indent,
"endIndent": realWidget.endIndent,
"color": realWidget.color != null
? realWidget.color!.toARGB32().toRadixString(16)
? realWidget.color!.value.toRadixString(16)
: null,
};
}
Expand Down
2 changes: 1 addition & 1 deletion lib/dynamic_widget/basic/icon_widget_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class IconWidgetParser extends WidgetParser {
"data": exportIconGuessFavorMaterial(realWidget.icon),
"size": realWidget.size,
"color": realWidget.color != null
? realWidget.color!.toARGB32().toRadixString(16)
? realWidget.color!.value.toRadixString(16)
: null,
"semanticLabel": realWidget.semanticLabel,
"textDirection": realWidget.textDirection != null
Expand Down
6 changes: 3 additions & 3 deletions lib/dynamic_widget/basic/image_widget_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class AssetImageWidgetParser extends WidgetParser {
"width": realWidget.width,
"height": realWidget.height,
"color": realWidget.color != null
? realWidget.color!.toARGB32().toRadixString(16)
? realWidget.color!.value.toRadixString(16)
: null,
"colorBlendMode": realWidget.colorBlendMode != null
? exportBlendMode(realWidget.colorBlendMode)
Expand Down Expand Up @@ -128,7 +128,7 @@ class AssetImageWidgetParser extends WidgetParser {
"width": realWidget.width,
"height": realWidget.height,
"color": realWidget.color != null
? realWidget.color!.toARGB32().toRadixString(16)
? realWidget.color!.value.toRadixString(16)
: null,
"colorBlendMode": realWidget.colorBlendMode != null
? exportBlendMode(realWidget.colorBlendMode)
Expand Down Expand Up @@ -272,7 +272,7 @@ class NetworkImageWidgetParser extends WidgetParser {
"width": realWidget.width,
"height": realWidget.height,
"color": realWidget.color != null
? realWidget.color!.toARGB32().toRadixString(16)
? realWidget.color!.value.toRadixString(16)
: null,
"colorBlendMode": realWidget.colorBlendMode != null
? exportBlendMode(realWidget.colorBlendMode)
Expand Down
2 changes: 1 addition & 1 deletion lib/dynamic_widget/basic/placeholder_widget_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class PlaceholderWidgetParser extends WidgetParser {
var realWidget = widget as Placeholder;
return <String, dynamic>{
"type": widgetName,
"color": realWidget.color.toARGB32().toRadixString(16),
"color": realWidget.color.value.toRadixString(16),
"strokeWidth": realWidget.strokeWidth,
"fallbackWidth": realWidget.fallbackWidth,
"fallbackHeight": realWidget.fallbackHeight
Expand Down
2 changes: 1 addition & 1 deletion lib/dynamic_widget/basic/scaffold_widget_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ScaffoldWidgetParser extends WidgetParser {
"floatingActionButton": DynamicWidgetBuilder.export(
realWidget.floatingActionButton, buildContext),
"backgroundColor": realWidget.backgroundColor != null
? realWidget.backgroundColor!.toARGB32().toRadixString(16)
? realWidget.backgroundColor!.value.toRadixString(16)
: null,
};
}
Expand Down
4 changes: 2 additions & 2 deletions lib/dynamic_widget/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ Map<String, dynamic>? exportTextStyle(TextStyle? textStyle) {

return <String, dynamic>{
"color": textStyle.color != null
? textStyle.color!.toARGB32().toRadixString(16)
? textStyle.color!.value.toRadixString(16)
: null,
"debugLabel": textStyle.debugLabel,
"decoration": exportTextDecoration(textStyle.decoration),
Expand Down Expand Up @@ -1143,7 +1143,7 @@ Map<String, dynamic>? exportBorderSide(BorderSide borderSide) {
return null;
}
return <String, dynamic>{
"color": borderSide.color.toARGB32().toRadixString(16),
"color": borderSide.color.value.toRadixString(16),
"width": borderSide.width,
"style": borderSide.style.index,
};
Expand Down
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ dependencies:

logging: ^1.0.1

http: ^0.13.1


font_awesome_flutter: ^9.0.0
http: ^1.3.0

dev_dependencies:
flutter_test:
Expand Down