diff --git a/android/local.properties b/android/local.properties index de84822..e69ebe1 100644 --- a/android/local.properties +++ b/android/local.properties @@ -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 \ No newline at end of file diff --git a/ios/Flutter/flutter_export_environment.sh b/ios/Flutter/flutter_export_environment.sh index 4dac01c..dc5dad9 100755 --- a/ios/Flutter/flutter_export_environment.sh +++ b/ios/Flutter/flutter_export_environment.sh @@ -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" diff --git a/lib/dynamic_widget/basic/appbar_widget_parser.dart b/lib/dynamic_widget/basic/appbar_widget_parser.dart index 2927130..afa81be 100644 --- a/lib/dynamic_widget/basic/appbar_widget_parser.dart +++ b/lib/dynamic_widget/basic/appbar_widget_parser.dart @@ -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), }; } @@ -58,3 +58,4 @@ class AppBarWidgetParser extends WidgetParser { @override Type get widgetType => AppBar; } + diff --git a/lib/dynamic_widget/basic/button_widget_parser.dart b/lib/dynamic_widget/basic/button_widget_parser.dart index 489620e..7ace319 100644 --- a/lib/dynamic_widget/basic/button_widget_parser.dart +++ b/lib/dynamic_widget/basic/button_widget_parser.dart @@ -30,16 +30,14 @@ class ElevatedButtonParser extends WidgetParser { : null; return { "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}" @@ -125,16 +123,14 @@ class TextButtonParser extends WidgetParser { : null; var map = { "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}" diff --git a/lib/dynamic_widget/basic/card_widget_parser.dart b/lib/dynamic_widget/basic/card_widget_parser.dart index cd3e5a5..9780bce 100644 --- a/lib/dynamic_widget/basic/card_widget_parser.dart +++ b/lib/dynamic_widget/basic/card_widget_parser.dart @@ -14,11 +14,10 @@ class CardParser extends WidgetParser { Map? 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; diff --git a/lib/dynamic_widget/basic/container_widget_parser.dart b/lib/dynamic_widget/basic/container_widget_parser.dart index 2e88570..f5f7423 100644 --- a/lib/dynamic_widget/basic/container_widget_parser.dart +++ b/lib/dynamic_widget/basic/container_widget_parser.dart @@ -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}" diff --git a/lib/dynamic_widget/basic/divider_widget_parser.dart b/lib/dynamic_widget/basic/divider_widget_parser.dart index bbded51..ff39b4c 100644 --- a/lib/dynamic_widget/basic/divider_widget_parser.dart +++ b/lib/dynamic_widget/basic/divider_widget_parser.dart @@ -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, }; } diff --git a/lib/dynamic_widget/basic/icon_widget_parser.dart b/lib/dynamic_widget/basic/icon_widget_parser.dart index 967c4f3..3c5dff0 100644 --- a/lib/dynamic_widget/basic/icon_widget_parser.dart +++ b/lib/dynamic_widget/basic/icon_widget_parser.dart @@ -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 diff --git a/lib/dynamic_widget/basic/image_widget_parser.dart b/lib/dynamic_widget/basic/image_widget_parser.dart index 0db8dae..96f047d 100644 --- a/lib/dynamic_widget/basic/image_widget_parser.dart +++ b/lib/dynamic_widget/basic/image_widget_parser.dart @@ -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) @@ -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) @@ -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) diff --git a/lib/dynamic_widget/basic/placeholder_widget_parser.dart b/lib/dynamic_widget/basic/placeholder_widget_parser.dart index abb51a0..ed6c78c 100644 --- a/lib/dynamic_widget/basic/placeholder_widget_parser.dart +++ b/lib/dynamic_widget/basic/placeholder_widget_parser.dart @@ -29,7 +29,7 @@ class PlaceholderWidgetParser extends WidgetParser { var realWidget = widget as Placeholder; return { "type": widgetName, - "color": realWidget.color.toARGB32().toRadixString(16), + "color": realWidget.color.value.toRadixString(16), "strokeWidth": realWidget.strokeWidth, "fallbackWidth": realWidget.fallbackWidth, "fallbackHeight": realWidget.fallbackHeight diff --git a/lib/dynamic_widget/basic/scaffold_widget_parser.dart b/lib/dynamic_widget/basic/scaffold_widget_parser.dart index 7116609..b0f0fd5 100644 --- a/lib/dynamic_widget/basic/scaffold_widget_parser.dart +++ b/lib/dynamic_widget/basic/scaffold_widget_parser.dart @@ -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, }; } diff --git a/lib/dynamic_widget/utils.dart b/lib/dynamic_widget/utils.dart index a4c9f64..34204a7 100644 --- a/lib/dynamic_widget/utils.dart +++ b/lib/dynamic_widget/utils.dart @@ -259,7 +259,7 @@ Map? exportTextStyle(TextStyle? textStyle) { return { "color": textStyle.color != null - ? textStyle.color!.toARGB32().toRadixString(16) + ? textStyle.color!.value.toRadixString(16) : null, "debugLabel": textStyle.debugLabel, "decoration": exportTextDecoration(textStyle.decoration), @@ -1143,7 +1143,7 @@ Map? exportBorderSide(BorderSide borderSide) { return null; } return { - "color": borderSide.color.toARGB32().toRadixString(16), + "color": borderSide.color.value.toRadixString(16), "width": borderSide.width, "style": borderSide.style.index, }; diff --git a/pubspec.yaml b/pubspec.yaml index a5a8404..7ee11b5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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: